This is a small collection of command-line related music tools. Currently, the only really usable parts are pldc.py
and plc.py
, two programs that compiles an m3u playlist to and from (respectively) transport file format.
The idea is to make playlists portable by manipulating them into a set of search queries. The user can then run these queries against her music database (currently only Rhythmbox) and recieve an m3u file with locally valid file paths. Basically the format is just JSON, see playlist/transport.py for the valid implementation and test/reference.json for a reference playlist.
A whole system of xapian-backed music search/playback tools in the spirit of the notmuch mail reader for Emacs is also planned, but in the very early stages of implementation. The interesting parts are in db/xapian_music.py
and in the test suite at test/test.py
.
- mutagen
- python-levenshtein (for track matching)
- currently: a working rhythmbox database. Others might be supported in the future. There is strictly speaking an interface that supports walking through a music directory, but it’s hideously slow since all music files must be read and parsed, so it isn’t used by plc.py.
- nose tests (for testing)
- python Xapian bindings
Run tests:
nosetests
Decompile an .m3u to a transport playlist:
pldc.py playlist.m3u > portable.json
Compile a transport playlist into an m3u file:
plc.py portable.json playlist.m3u