Update readme

This commit is contained in:
Nguyễn Anh Khoa 2018-09-27 02:23:31 +07:00
parent 735081db41
commit 6321b16510

View File

@ -1,42 +1,64 @@
# musipy
## Usage
python musipy.py -s source/dir/ -o output/dir/ -attr attribute -m sort
### -s, --source=
The source directory to scan for files, default to current directory when you run this script
### -o, --output=
The output directory, default to source/dir/output
### -attr, --attribute=
The attribute to use when sort, this could either be 'genre' or 'album'
### -m, --mode=
The mode to use, currently only 'sort' and 'playlist' is able to use. In future update:
+ [X] 'sort' for sorting files in source/dir by attribute
+ [ ] 'backup' for backing up files structure in a source/dir
+ [ ] 'restore' for restoring files in source/dir to a backup flash
+ [ ] 'rename' for rename multiple files names (Track1.mp3, Track2.mp3... or similar) using a file input of Titles, Artist, Genre, Album, Disk
+ [X] 'playlist' for creating playlist file by any config in source/dir
#### PLay list configuration
When the playlist mode is chosen, you will need to provide the name of the output file through `--playlistname`. The place of the playlist will be at sourcedir, which is 'current working directory' by default.
A tool to organize your music files.
## Why I create this
I have a very big folder of files, and searching through files is hard for me, also, the structure when I first place them in is hard to navigate. I want to create a script to move files using tag and organize them. And create a playlist with the options I prefer.
I have a very big folder of music files, and searching through files is hard for me, also, the placement was hard to navigate. I want to create a script to move files using tag and organize them.
## When will I deploy?
Then comes a few more use case.
I do not know, I just create for myself. Hosting on Git is to keep my project organized, and hope to get some collaborators.
## Usage
```sh
python run.py --help
Usage: run.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
format
playlist
sort
```
### Sort
Take all files in `src` arrange them by `attr` and move the files to `dst/attr`. I currently use this to re-arrange my files by album.
### Playlist
Take all files in `src` by `attr` and output a `m3u` playlist file. I use VLC to open `m3u`, a request for another format is always helpful, just ping me a request.
### Format
/// Not implement yet
Rename the files in `src` and follow the format `fmt`.
## Development
### The command line - core
Using 2 foreign library `click` to handle CLI commands; `TinyTag` to parse info from music files. Then the arguments are passed to `CommandHandler` to validate the argument. After that, arguments are taken to `CommandExecutioner` specific class to handle the job.
### The GUI
Hopefully in the future updates. Provide basic GUI to select task, set arguments and make a call to core.
### Testing
Right now just plain testing is being done.
### Coding guidelines
I work on python3 with flake8 and mypy for linting.
### Bug and feature request
Just open a new issue.
## License