An open API service indexing awesome lists of open source software.

https://github.com/dan-sazonov/id3-editor

๐ŸŽถโš™ The simplest console tool for batch editing of mp3 metadata
https://github.com/dan-sazonov/id3-editor

cli-tools id3 id3-parser id3-reader id3-writer metadata parser

Last synced: about 1 hour ago
JSON representation

๐ŸŽถโš™ The simplest console tool for batch editing of mp3 metadata

Awesome Lists containing this project

README

          

# ID3 Editor
![OpenSource](https://img.shields.io/badge/Open%20Source-%E2%99%A5-red)
![Apache 2.0](https://img.shields.io/github/license/dan-sazonov/id3-editor)
![Tested on linux, Win10](https://img.shields.io/badge/tested%20on-Linux%20|%20Win10-blue)
[![Change language](https://img.shields.io/badge/%D0%AF%D0%B7%D1%8B%D0%BA%20%D1%80%D0%B8%D0%B4%D0%BC%D0%B8-Ru-9cf)](README_ru.md)

**The simplest console tool for batch editing of mp3 metadata in interactive or manual mode**

> Now this version of the project is in the active stage of refactoring. A roadmap of planned changes will be added later. If you want to contribute to the project already at this stage, please contact the author.

## ๐Ÿ“ฆ Installation
Clone this repo, change the directory and install the necessary requirements:
```
$ git clone https://github.com/dan-sazonov/id3-editor.git
$ cd id3-editor
$ python3 -m pip install -r requirements.txt
```
_note: you may need to enter_ `python` _instead of_ `python3`.

The program was tested on Win10 x64 and Ubuntu 20.04 x64 on Python 3.9.0. I do not know if everything will work fine on other os, and it will be great if you share
your experience of using it and tell me about the found bugs.

## โš™ Usage
The easiest way to start is just:
```
$ python3 main.py
```
After that, the program will ask for the path to the directory where the tracks need to be edited. Then change the value of each parameter
for each file. If you want to apply the value from the brackets, press \[Enter\]. You can use a parser to search for the album name. Just enter \[\!] instead of the album name. Also, the name of the band and track are copied to the clipboard. It looks like this:

Main process screenshot

Default Parameters

If there is a same values for each tracks in this folder, you can predefine it by specifying one of the flags when starting the program (see below). The value of this
parameter will be asked once at start, and will be applied to all tracks. It looks like this:

Usage with the presets of some data screenshot



Flags:


  • '-T', '--title' - title for all tracks;


  • '-R', '--artist' - artist for all tracks;


  • '-A', '--album' - album for all tracks;


  • '-N', '--number' - number for all tracks;


  • '-G', '--genre' - genre for all tracks;


  • '-D', '--date' - date for all tracks.

Logging and manual mode

The log will be saved if the program was terminated with an error. You can also save a json log with the metadata of the edited files. To do this, run the program with flags
`-l` or `--log'. By the path stored in the `LOG_PATH` variable in the file `config.py `, a file of the following format will be created:
```json
{
"file-name.mp3": {
"data": ["value"]
}
}
```
You can restore metadata based on information from any log file. For example, this may be useful if you have the same files in different directories, and you need to edit
them all. Run the program with the `-p` or `--parse` flag, set the log file and enter the path to the required directory. Any other flags except `-r` or `--rename` will be ignored.

Also, you can write the current unchanged metadata to a json file. To do this, run the program with the `-s` or `--scan` flag. I call this **manual mode** - at first you
create a json file with the unchanged metadata, then you edit them and apply it by running the program with the `-p` or `--parse` flag.

If you need to print artist-title pairs for all tracks, use the `--min_scan` flag. The output information will be copied to the clipboard. The `DO_OUTPUT_COPY` flag in the file `config.py` is responsible for this behavior.

More Features

- If the file contains information about the copyright holder, and you want to leave it, use the `-c` or `--copyright` flag.
- You can run the program in minimal mode with `-m` or `--minimal` flag. It will only ask for title, artist, album and genre. Other data will be cleared.
- Files could be renamed in the form of `artist_track-title.mp3`. Use the `-r` or `--rename` flag. Keep in mind that the information in the logs will be associated with the new name at the regular end of the program.
- You can also rename all files without changing the metadata. Run the program with the `--auto_rename` flag. Don't use other flags with this.
- If there are several files with the same name, a number in parentheses will be added to the end of it
- To remove all data from the tracks, run the program with the `-d` or `--delete` flag. Any other flags will be ignored.
- If you need to go back to editing the previous track in the interactive mode, enter the `^` character in any field.
- In interactive mode, two colons after the letters _a_, _o_ or _u_ will be replaced with this letter with an umlaut. For example, `Mo::tley Cru::e` will be replaced by `Mรถtley Crรผe`.
- To avoid bugs, the data entered by the user will be validated. To disable it, set the `SKIP_VALIDATION` variable in `config.py` to `True`. Be careful using it!
- You can specify metadata that does not need to be cleaned in minimal mode. Add their keys to the `LEAVE_THIS_DATA` list in the file `config.py `.
- To view the quick help, run the program with the `-h` or `--help` flag.

## ๐Ÿค Contributing
If you have any ideas or found any bugs here, plz open the [issue](https://github.com/dan-sazonov/id3-editor/issues)
or make a fork and offer a [pull request](https://github.com/dan-sazonov/id3-editor/pulls). And it will be
great if you tell me about these ideas, maybe I'm already working on them.

## ๐Ÿ‘จโ€๐Ÿ’ป Author
The author of this repository and code - [@dan-sazonov](https://github.com/dan-sazonov).

**Reach me:**

[โœˆ๏ธ Telegram](https://t.me/dan_sazonov)

[๐Ÿ“ง Email](mailto:p-294803@yandex.com)