dbm: Command-line interface

{return to main page}

Table of Contents

Using dbm from the command line

These instructions are slightly out-of-date. To see the list of available options, use python dbm.py –help (that is a double dash)

Basically, you use the -i and -o options to specify the locations of the input music library, and the output folder. So to run dbm, open a terminal window (aka command prompt), use the cd command to move into the directory containing the downloaded dbm files, and enter something like

python dbm.py -i E:\Music -o dbm-output-folder

on Windows, which might look like this on linux:

python dbm.py -i /media/ipod/Music -o dbm-output-folder

This example tells dbm to read a music library stored in a folder called Music on an external drive (e.g. an ipod), and create a bunch of output files and folders in a folder called dbm-output-folder. This output folder will be created in whatever folder you are in when you issue the command. If you've got a lot of music, it'll take some time to read the library and make the last.fm web queries for every artist. You'll get some output to look at, but I can't recommend doing that for long.

If there are no major problems, the output directory will contain the following folders:

  • Playlists – folders containing similar-music, single artist and all artists playlists
  • Similar – links to music folders of similar artists, for every artist
  • A-Z – an alphabetical directory of links to artist music folders
  • Recommended – browsable list of absent but similar artists, for every artist

There is an extra option that you can use to save time when repeating the run:

  • -u At the end of every run, dbm saves database files in a hidden directory called ='.dbm'= in the output folder. This option tells dbm to re-use those saved database files, rather than rescanning your music library, which can take a long time.

To use this extra option, just supply -u in addition to the -o option, e.g.

./dbm.py -u -o dbm-output-folder

If you run dbm without any options, or do something it doesn't understand, it will print out a help message like this

dbm version 0.30
Use -i and -o options to specify location of music library and output folder. E.g.

./dbm.py -i /media/ipod/music -o ~/music/ipod-dbm-output

If you want to re-use saved database files in an existing output
directory rather than scanning your music library again, use -u.

{return to main page}