Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Simple python3 hello world

Project description

Build Status Github PyPi Python


RegexTagForMusic is a tool to tag mp3 files using regular expressions to extract ID3 tags the the file path. In other words, if the path matches a regex, you can use any matching group as ID3 tag.

I originally developed RegexTagForMusic to automatize tagging my music using eyeD3. ID3 tags are some metadata just like the way you store your files on your filesystem so I wanted a way to synchronize tags from the filesystem:

  • the album field is the parent folder of the file
  • the artist field is the parent folder of the album folder
  • the tracknumber field is the first digit of the filename
  • the title field is the rest of the filename


You can install RegexTagForMusic directly from PyPI using pip:

# Ensure pip is installed on the system
$ sudo apt install python3-pip
# You can install just for the current user
$ pip install --user RegexTagForMusic
# Or install it for all users
$ sudo pip install RegexTagForMusic

You can also build RegexTagForMusic from the sources:

$ git clone
$ cd RegexTagForMusic
$ make
$ pip install --user dist/RegexTagForMusic-*.whl

Try it

See the default configuration file and samples documentation.

$ cd samples/config/default
$ tree


Now verify that all the files are recognized using the filters from the configuration file:

$ rtfm --config ../default.json


Also check all the properties declared in the filters:

$ rtfm --config ../default.json --verbose


The command check verifies that the existing tags in the mp3 files are matching the properties extracted from the file path:

$ rtfm --config ../default.json -x check


In our example, the files are not tagged yet, so le's tag them:

$ rtfm --config ../default.json -x tag


The clean action removes all the tags present in the files:

$ rtfm --config ../default.json -x clean


Command line options and arguments

$ rtfm --help
usage: rtfm [-h] [-v] [-c CONFIG] [-l LIBRARY] [-r ROOT] [--folders]
            [-x ACTION] [-n] [--continue]
            [FILE [FILE ...]]

Simple hello world python sample

positional arguments:
  FILE                  files to process

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         be more verbose
  -c CONFIG, --config CONFIG
                        configuration file (default:
  -l LIBRARY, --library LIBRARY
                        library file
  -r ROOT, --root ROOT  make all paths relative to given folder (default is
                        current folder, $PWD)
  --folders             also process folders
  -x ACTION, --execute ACTION
                        action to perform
  -n, --dryrun          dryrun mode, do not modify files
  --continue            continue in case of error

Configuration file

See sample configuration files and samples documentation

Project details

Release history Release notifications

This version


Download files

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

Files for RegexTagForMusic, version 5.0.1
Filename, size File type Python version Upload date Hashes
Filename, size RegexTagForMusic-5.0.1-py3-none-any.whl (19.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size RegexTagForMusic-5.0.1.tar.gz (548.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page