|
1 | 1 | # Audfill |
2 | | -Find song's info and rename files. |
| 2 | + |
| 3 | +A python script to find song's info and rename them by looking them up on [audd.io](https://audd.io/). |
| 4 | + |
| 5 | +An [API token](https://docs.audd.io/#authentication-and-limits) is required to do more than 10 requests per day. |
| 6 | + |
| 7 | +## Installation |
| 8 | + |
| 9 | +### Requirements |
| 10 | + |
| 11 | +- Python >= 3.7 |
| 12 | +- FFmpeg must be installed on the system and in the PATH |
| 13 | +- Python modules: |
| 14 | + - click |
| 15 | + - requests |
| 16 | + - validators |
| 17 | + - pydub |
| 18 | + |
| 19 | +### PIP |
| 20 | + |
| 21 | +```bash |
| 22 | +python -m pip install audfill |
| 23 | +``` |
| 24 | + |
| 25 | +### Local Installation |
| 26 | + |
| 27 | +Run inside Audfill directory. |
| 28 | + |
| 29 | +```bash |
| 30 | +python -m pip install -e . |
| 31 | +``` |
| 32 | + |
| 33 | +## Usage |
| 34 | + |
| 35 | +A sound file must always be specified. Most sound files are supported (anything that FFmpeg and Pydub supports). |
| 36 | + |
| 37 | +Specifiying no options will send the request, but not do anything with the response. |
| 38 | + |
| 39 | +An example to print information about a song: |
| 40 | + |
| 41 | +```bash |
| 42 | +audfill song.mp3 -i |
| 43 | +``` |
| 44 | + |
| 45 | +### Wildcards |
| 46 | + |
| 47 | +Wildcards are supported and will loop though all files in a directory. The following example prints all the information about MP3s in the current directory. |
| 48 | + |
| 49 | +```bash |
| 50 | +audfill *.mp3 -i |
| 51 | +``` |
| 52 | + |
| 53 | +### Sources |
| 54 | + |
| 55 | +This script is also capable of getting additional data from Apple Music, Spotify, Napster, and Deezer. To explicitly get info from these sources, use ```-s [source]```. Data from sources listed first will be used for naming files. Sources will be implicitly added as necessary unless the minimum flag is specified (```-n```). |
| 56 | + |
| 57 | +### API Token |
| 58 | + |
| 59 | +An API key can be specified with the option ```-t``` or can be read automatically with the environment variable ```AUDDIOKEY```. |
| 60 | + |
| 61 | +```bash |
| 62 | +audfill song.mp3 -k exampleToken123 |
| 63 | +``` |
| 64 | + |
| 65 | +### File naming |
| 66 | + |
| 67 | +For use with renaming files or downloading art and previews. File extension will automatically be added, do not add your own extension. |
| 68 | + |
| 69 | +- Percent Symbol: %% |
| 70 | +- Filename: %f |
| 71 | +- Artist(s) %a |
| 72 | +- Composer: %c |
| 73 | +- Album: %b |
| 74 | +- Genre(s): %g |
| 75 | +- Title: %T |
| 76 | +- Short Title: %t |
| 77 | +- Explicit: %x |
| 78 | +- ISRC: %i |
| 79 | +- Disk Number: %k |
| 80 | +- Track Number: %# |
| 81 | +- Release Date: |
| 82 | + - Capital letters represent extended (ex. 1997, 03), lowercase letters represent short dates (ex. 97, 3) |
| 83 | + - %Y, %y |
| 84 | + - %M, %m |
| 85 | + - %D, %d |
| 86 | + |
| 87 | +Example (Renames to **Artist - Title.mp3**): |
| 88 | + |
| 89 | +```bash |
| 90 | +audfill song.mp3 -r '%a - %T' |
| 91 | +``` |
| 92 | + |
| 93 | +### Running with Python |
| 94 | + |
| 95 | +```bash |
| 96 | +python audfill.py [filename] [options] |
| 97 | +``` |
| 98 | + |
| 99 | +### Running with Python PIP |
| 100 | + |
| 101 | +```bash |
| 102 | +python -m audfill [filename] [options] |
| 103 | +``` |
| 104 | + |
| 105 | +### Running executable |
| 106 | + |
| 107 | +```bash |
| 108 | +audfill [filename] [options] |
| 109 | +``` |
0 commit comments