Skip to main content

A simple CLI audio tagger.

Project description

audiotag

Audiotag is a command line audio tagger written in python3. It uses TagLib to write the metadata. It features a very simple to use interactive mode which lets you tag a single album as fast as possible.

Installation

You can install audiotag directly from PyPI.

pip install audiotag

Usage

Audiotag offers different subcommands:

Usage:
  audiotag print FILE...
  audiotag interactive FILE...
  audiotag set [--artist=ARTIST|--noartist] [--title=TITLE|--notitle]
               [--album=ALBUM|--noalbum] [--date=DATE|--nodate]
               [--genre=GENRE|--nogenre]
               [--tracknumber=TRACKNUMBER|--notracknumber]
               [--tracktotal=TRACKTOTAL|--notracktotal]
               [--discnumber=DISCNUMBER|--nodiscnumber]
               [--disctotal=DISCTOTAL|--nodisctotal] FILE...
  audiotag clean FILE...
  audiotag rename [--pattern=PATTERN] FILE...

Print

The print subcommand prints all tags. Multiple values per tag will be printed as a list.

$ audiotag print *.flac
Filename: /path/to/files/1 - At Giza.flac
ALBUM: ['Conference of the Birds']
ARTIST: ['Om']
DATE: ['2006']
DISCNUMBER: ['1']
DISCTOTAL: ['1']
ENCODER: ['Lavf58.12.100']
GENRE: ['Doom Metal']
TITLE: ['At Giza']
TRACKNUMBER: ['1']
TRACKTOTAL: ['2']

Filename: /path/to/files/2 - Flight of the Eagle.flac
ALBUM: ['Conference of the Birds']
ARTIST: ['Om']
DATE: ['2006']
DISCNUMBER: ['1']
DISCTOTAL: ['1']
ENCODER: ['Lavf58.12.100']
GENRE: ['Doom Metal']
TITLE: ['Flight of the Eagle']
TRACKNUMBER: ['2']
TRACKTOTAL: ['2']

Interactive

The interactive subcommand interprets all given files as a single album and asks for all the necessary information. If the Number of discs value is anything greater than 1, audiotag will ask you which disk you are currently tagging. Otherwise the DISCNUMBER tag will also be set to 1. Number of songs is used to determine the number of leading zeros when you use the rename subcommand.

$ audiotag interactive *.flac
Artist: Om
Albumtitle: Conference of the Birds
Genre: Doom Metal
Year: 2006
Number of songs: 2
Number of discs: 1
/path/to/files/1 - At Giza.flac
Title: At Giza
/path/to/files/2 - Flight of the Eagle.flac
Title: Flight of the Eagle

Set

If you want to set the tags in a non-interactive way you can use the set command. You can choose from these options:

  • --artist="Example"
  • --title="Example"
  • --album="Example"
  • --date=2000
  • --genre="Example"
  • --tracknumber=1
  • --discnumber=2
  • --tracktotal=10
  • --disctotal=2

If you want to remove tags you can choose these options:

  • --noartist
  • --notitle
  • --noalbum
  • --nodate
  • --nogenre
  • --notracknumber
  • --nodiscnumber
  • --notracktotal
  • --nodisctotal

You can combine these options as you like. Here is an example:

$ audiotag set --artist=Om --album="Conference of the Birds" --nodiscnumber 01-at_giza.flac  

Clean

The clean subcommand removes all tags from the file except the ENCODER tag.

Rename

The rename subcommand lets you rename files based on the audio tags. You have to provide a pattern for renaming. The pattern may contain a combination of these placeholders:

  • {A}: Artist
  • {T}: Title
  • {L}: Album
  • {Y}: Date
  • {G}: Genre
  • {N}: Tracknumber
  • {D}: Discnumber
  • {NT}: Tracktotal
  • {DT}: Disctotal

If you don't specify a pattern, audiotag will use {N} - {T} if the Disctotal tag is set to 1 or {D}-{N} - {T} if the Disctotal tag is set to something else or missing. You do not have to add the extension to the pattern. Audiotag adds the extension to the output file name for you.

$ ls
01-at_giza.flac  02-flight_of_the_eagle.flac

$ audiotag rename *.flac

$ ls
'1 - At Giza.flac'  '2 - Flight of the Eagle.flac'

Dependencies

The following dependencies are needed to run audiotag:

  • docopt: For parsing command line arguments
  • pytaglib: Python wrapper for accessing TagLib

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

audiotag-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

audiotag-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file audiotag-0.1.1.tar.gz.

File metadata

  • Download URL: audiotag-0.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

File hashes

Hashes for audiotag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2211ec8d19371b7639308a0f3d375e9a1823371f18cce1968005a5d9fabcb99e
MD5 acf8ec9c57bbe4d2370ffab7be7262a8
BLAKE2b-256 b677558277ca86e16ca673c57d307ef7af254fc45f8272eb0182ed0041cbbee8

See more details on using hashes here.

File details

Details for the file audiotag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: audiotag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

File hashes

Hashes for audiotag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9b31986d27414138739b3f55b6e89bbe8836bac5c47952e85689cfddffdd9a7
MD5 d468cf46e3ccb362fe3028155680dc9e
BLAKE2b-256 b20cd6c761c5c397b2aaf7244c1891aac66ab4997a4e8b6dec10e8382792f772

See more details on using hashes here.

Supported by

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