Skip to main content

A script to automatically find a song's info.

Project description

Audfill

A python script to find song's info and rename them by looking them up on audd.io.

An API token is required to do more than 10 requests per day.

Installation

Requirements

  • Python >= 3.7
  • FFmpeg must be installed on the system and in the PATH
  • Python modules:
    • click
    • requests
    • validators
    • pydub

PIP

python -m pip install audfill

Local Installation

Run inside Audfill directory.

python -m pip install -e .

Usage

A sound file must always be specified. Most sound files are supported (anything that FFmpeg and Pydub supports).

Specifiying no options will send the request, but not do anything with the response.

An example to print information about a song:

audfill song.mp3 -i

Wildcards

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.

audfill *.mp3 -i

Sources

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).

API Token

An API key can be specified with the option -t or can be read automatically with the environment variable AUDDIOKEY.

audfill song.mp3 -k exampleToken123

File naming

For use with renaming files or downloading art and previews. File extension will automatically be added, do not add your own extension.

  • Percent Symbol: %%
  • Filename: %f
  • Artist(s) %a
  • Composer: %c
  • Album: %b
  • Genre(s): %g
  • Title: %T
  • Short Title: %t
  • Explicit: %x
  • ISRC: %i
  • Disk Number: %k
  • Track Number: %#
  • Release Date:
    • Capital letters represent extended (ex. 1997, 03), lowercase letters represent short dates (ex. 97, 3)
      • %Y, %y
      • %M, %m
      • %D, %d

Example (Renames to Artist - Title.mp3):

audfill song.mp3 -r '%a - %T'

Running with Python

python audfill.py [filename] [options]

Running with Python PIP

python -m audfill [filename] [options]

Running executable

audfill [filename] [options]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Audfill-1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Audfill-1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file Audfill-1.0.tar.gz.

File metadata

  • Download URL: Audfill-1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for Audfill-1.0.tar.gz
Algorithm Hash digest
SHA256 c49e9b97459a66d06a42ae30f192b6fa6c1bc96197fd6ff0795c56f1dbced4e9
MD5 58e39dfeebfe82ec4a809a8a89e5969a
BLAKE2b-256 9315c97be124de13d50a58f23298e4e8019f98ca8ae1b8968e72a5b1445d79cc

See more details on using hashes here.

File details

Details for the file Audfill-1.0-py3-none-any.whl.

File metadata

  • Download URL: Audfill-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for Audfill-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51a919263d4a62f3be6561b1d34cfdbf6e920db67d209e7e425255227facaa9
MD5 2813e940ad884649fa3b445feafcc3f6
BLAKE2b-256 9028dc71870f6e9b839a7adf2a4f244a2eadd0c8940c37170ae135127281eb89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page