Rewritten Musort for v1.0

This commit is contained in:
tdeerenberg
2023-11-25 01:10:06 +01:00
parent f243f6da08
commit fbc3c3aea3
10 changed files with 1750 additions and 187 deletions

View File

@ -1,12 +1,12 @@
https://user-images.githubusercontent.com/113618658/214463785-49c419e9-c959-4849-91d2-f3407ecaa73d.mp4
# Musort
Ogranize your music library. A Python3 program that renames all selected music/audio files in a folder with a specified naming convention. Names are generated from the metadata (ID3) from the audio files. Before using this program, use a metadata editor like MusicBrainz Picard, Beets or EasyTAG to add the correct metadata to the audio files.
Musort: Effortlessly organize your music library with this Python3 program. Rename selected music/audio files in a folder using a customizable naming convention based on metadata (ID3) from the audio files. Ensure accurate metadata by using popular tools like MusicBrainz Picard, Beets, or EasyTAG before running Musort. Simplify your music organization and enhance file names for a more enjoyable library experience.
## Features
* Rename many audio files at once
* Rename all files in subdirectories as well (recursive)
* Rename audio files in subdirectories as well (recursive)
* Choose the naming convention (ex. track.title.flac or artist.track.year.mp3)
* Give a separator for the naming of the file (ex. track.title.flac or track_title.flac)
* Works on all systems that can run Python
@ -21,13 +21,17 @@ Ogranize your music library. A Python3 program that renames all selected music/a
* AIFF/AIFF-C
## Dependencies
**Note: When using the install script, TinyTag will be automatically installed**
**Make sure to install these programs to be able to run Musort**
- [Python3](https://www.python.org/)
- [TinyTag](https://pypi.org/project/tinytag/) (Installable from Python Package Index)
- [Docker (Optional)](https://docker.com)
The Python3 library TinyTag is also used, but is already included in this repository. Therefore, there is no need to install TinyTag for only this project.
## Installation and Usage
### Method 1: Run installation script (Unix/Linux based OS only)
The installation script will move the python program to `~/.local/bin`. Make sure that `~/.local/bin` exists and that is added to $PATH.
The installation script will move the python program to `~/.local/bin`. The installation directory can be changed in the `install.sh` script. **Note: The installation directory should be added to $PATH**
``` Bash
git clone https://github.com/tdeerenberg/Musort.git
cd Musort.git
@ -35,7 +39,10 @@ chmod +x install.sh
./install.sh
```
After that, simply use the command `musort` to use the program.
<hr>
### Method 2: Clone repo and run manually (All Operating Systems)
Clone the repository and run the Python program
``` Bash
git clone https://github.com/tdeerenberg/Musort.git
@ -43,32 +50,42 @@ cd Musort
pip install requirements.txt
```
After that, run the program with `python3 musort.py`.
<hr>
### Method 3: Docker installation
``` Bash
git clone https://github.com/tdeerenberg/Musort.git
cd Musort
docker build -t musort .
```
After the docker installation is complete, musort can be run with: `docker run --name musort --rm -v "/:/HostMountedFS" -it musort`
> Tip: You could alias something like `alias musortd="docker run --name musort --rm -v "/:/HostMountedFS" -it musort"` then use `musortd` juse like `musort` usage is explained above
After the Docker installation/build is complete, Musort can be run with:
## Manual (options and arguments) `musort --help`
`docker run --name musort --rm -v "[music_directory_host]:[music_directory_container]" -it musort [music_directory_container]`
The music folder must be mounted to the Docker container, therefore the `-v` option must be used to mount the directory.
An example of running Musort in Docker, using `/home/user/music` as music folder:
`docker run --name musort --rm -v '/home/user/music:/music' -it musort /music`
## Manual with options and arguments (`musort --help`)
```
USAGE:
musort [DIRECTORY] [NAMING_CONVENTION] [OPTIONAL_OPTIONS]...
musort [DIRECTORY] [OPTIONAL_PARAMETERS]
USAGE EXAMPLES:
musort ~/music track.title.year -s _ -r
musort /local/music disc.artist.title.album -r
musort ~/my_music track.title
musort ~/music
musort /local/music -f disc.artist.title.album -r
musort ~/my_music -s _ -r
OPTIONAL OPTIONS:
-h, --help Show the help menu
-f, --format set the naming convention (see 'NAMING CONVENTION:' below)
-s, --separator Set the separator for the filename (ex. '-s .' -> 01.track.flac and '-s -' -> 01-track.mp3)
Default separator ( . ) will be used if none is given
Default separator '_' will be used if none is given
-r, --recursive Rename files in subdirectories as well
-v, --version Prints the version number
NAMING CONVENTION:
FORMAT_OPTION.FORMAT_OPTION... The amount of format options does not matter.
It can be one, two, three, even all of them.
@ -96,13 +113,13 @@ year year or date as string
## Possible features to add
* Rename single file
* Other installation methods (Like AUR, Docker, etc.)
* Other installation methods (e.g. via AUR)
* Open for suggestions!
* Feel free to open a pull request or issue!
## Authors
- [@tdeerenberg](https://www.github.com/tdeerenberg)
- [@tdeerenberg](https://github.com/tdeerenberg)
## License