Clone the repo
git clone https://github.com/psdkjoon/mdit.git
run the Installition script
./install.sh
Run the script from the directory containing the .mp3 files you want to edit.
mdit [options]
| Option | Name | Description |
|---|---|---|
| (No Option) | Interactive Mode | The default. Interactively asks you to select which MP3s to modify. |
-s |
Show | Lists the Title, Artist, and Album for all .mp3 files and exits. No changes are made. |
-ss |
ShowSmall | Lists the Title, Artist, and Album in a Small format for all .mp3 files and exits. No changes are made. |
-a |
All | Automatically selects all .mp3 files in the directory for modification, skipping the interactive selection. |
-e |
Each | After selecting files, this prompts you for each file individually, asking what tag to change and what to change it to. |
-i |
In-place | DANGER: Replaces your original files with the modified ones. By default, the script saves new files in a new mdit_output folder and leaves your originals untouched. |
-h |
Help | Displays a help message and exits. |
This is the most common workflow. You run the script with no options, select your files, and then perform a single "find and replace" action on all of them.
-
Run the script:
mdit -
The script will clear the screen and list your first MP3 file:
Some Title by Some Artist from Some Album change? [Y/n/f] _ -
Press:
y,Y, orEnter: To mark the file for changes.norN: To skip this file.forF: To finish selecting and move to the editing step.
-
After you press
f, the script will ask what tag you want to change for all the files you marked:t for Titles a for Albums r for artists What to change? [T/a/r] _ -
After selecting a tag (e.g.,
afor Album), it will ask for a "search" and "replace" term.Enter a search term: (Can use RegEx) Unknown Album Enter a replacement term: My Awesome Mixtape -
The script will process all marked files, applying this change. New, modified files will appear in a folder named
mdit_output. Your original files are safe.
Use this if you need to make unique changes to each file.
-
Run the script with the
-eflag:mdit -e -
Select your files as shown in Workflow 1 (press
y,n, orf). -
After finishing selection, the script will loop through each file you marked.
-
For each file, it will ask:
Some Title by Some Artist from Some Album t for Titles a for Albums r for artists What to change? [T/a/r] _ -
After you choose a tag (e.g.,
t), it will prompt you for the new value, pre-filling the old one for easy editing:New Title: Some Title_ -
You will be asked to confirm. This repeats for every file you marked. New files are saved in
mdit_output.
Use the -i flag with caution. This flag modifies your original files. It is highly recommended to back up your music first.
The -i flag can be combined with other flags.
mdit -i: Interactive selection, changes replace original files.mdit -e -i: Edit each file individually, changes replace original files.mdit -a -i: Edit ALL files with one batch rule, changes replace original files.
Process:
- The script still creates new files in
mdit_outputfirst. - At the very end, it deletes the original files you selected.
- It then moves the new files from
mdit_outputinto your current directory. - It removes the (now empty)
mdit_outputdirectory.
This is a read-only operation.
-
Run the script with the
-sflag:mdit -s -
The script will print a formatted list of all MP3s and their tags, then exit.
============================= Track 1 by Cool Artist from Best Album ============ Title: Track 1 Album: Best Album Artist: Cool Artist ============================= Track 2 by Cool Artist from Best Album ============ Title: Track 2 Album: Best Album Artist: Cool Artist =============================
-
Run the script with the
-sflag:mdit -ss -
The script will print a Small formatted list of all MP3s and their tags, then exit.
============================= Track 1 by Cool Artist from Best Album ============================= Track 2 by Cool Artist from Best Album =============================