Rockuefort "compiles" your playlists. It indexes your music
directory and then searches through the metadata to locate the files
corresponding to the entries in your playlist. This keeps your playlist
decoupled from the actual paths and filenames of your music library.
Rockuefort can build your playlist and copy or link the songs into a
destination directory. It uses rsync
to copy so that only new or
changed files need to be copied.
-
Install
rsync
if you want to use thecopy
mode. -
Obtain the latest Rockuefort source.
$ git clone https://github.com/kalgynirae/rockuefort.git $ cd rockuefort
-
Set up a virtual environment and install the required dependencies.
$ python3 -m venv env $ env/bin/pip install -e .
-
Put the installed Rockuefort script on your path.
# Assuming ~/bin is in your $PATH $ ln -s --relative env/bin/rockuefort ~/bin/rockuefort
Scan the /var/music
directory:
$ rockuefort index --add /var/music
$ rockuefort scan
List the files that match the entries in the file chiptunes
:
$ rockuefort list chiptunes
Link those files into the muzic/blerg/
directory:
$ rockuefort link chiptunes muzic/blerg/
Copy those files into the muzic/wheeeeeeee/
directory:
$ rockuefort copy chiptunes muzic/wheeeeeeee/
Play the playlist with VLC:
$ rockuefort list chiptunes | xargs -d '\n' vlc
Queue songs using mpc
(mpc
only likes relative paths):
$ rockuefort list --strip '/var/music/' chiptunes | mpc add
Rockuefort playlists are text files with one query per line. Blank lines
and lines starting with #
are ignored.
A query takes the following format:
[O][N:]TAG=VALUE[|TAG=VALUE...]
O
: zero or more special option characters (defaults to nothing)N
: the number of files this query is expected to match (defaults to1
)TAG
: one oftitle
,artist
,album
,genre
, orcrop
(see Cropping below)VALUE
: a substring of the value to match. It can contain any character except|
. Matching files will have this as a substring of the real tag value. It can be surrounded with double quotes to perform an exact match (instead of substring).
@
: fixed position: this query will not move when reordering tracks (e.g., with the--shuffle
option)|
: grouped: consecutive queries with this option will be treated as a single unit when reordering tracks-
: lower volume: lower the volume of this track (can be specified multiple times; affectsrender
command only)+
: raise volume: raise the volume of this track (can be specified multiple times; affectsrender
command only)
The format of a crop tag is
crop=TIME[,TIME...]
where TIME
is a string like 2:13.5 (two minutes, 13.5 seconds) or 90 (90
seconds).
Rockuefort is named after Roquefort cheese.