Skip to main content

Utilities to help you groom your music collection

Project description

Music toolbox

This is a small toolbox of utilities written in Python 2 that help users groom their music collection.

What's in the box

The box contains a number of utilities. The main one is syncplaylists.

syncplaylists: the playlist synchronizer

syncplaylists takes a number of file lists / playlists in the command line, and a destination directory, then synchronizes all the songs in the playlists to the destination directory, with optional modifications to the files and their names as they are copied to the destination directory. syncplaylists preserves your music collection's directory structure, and allows you to define what formats you want your music to be transcoded to.

Run syncplaylists --help for more information.

syncplaylists accepts a simple YAML file in your home directory, by default read from file transcoding.yaml in $HOME/.config/musictoolbox (although you can change which file to use with the -c command line parameter). The file must say how you want things to be transcoded (documentation on the config format is forthcoming):

# cat ~/.config/musictoolbox/transcoding.yaml
policies:
- source: ogg
  # Ogg Vorbis and Ogg Opus files to be copied directly
  pipeline: [copy]
- source: *
  # Everything else to transcode to MP3.  MP3 files
  # themselves will be copied since the copy transcoder
  # is the one with the cheapest "cost".
  target: mp3

Once you've created the YAML config file, here's the quickstart version of how you actually use the tool:

[user@laptop ~/Music]$ syncplaylists -vd Playlists/*.m3u /mnt/usbdrive/Music/

That will copy all songs listed in all M3U playlists within your ~/Music/Playlists folder directly into /mnt/usbdrive/Music, preserving the directory structure you have.

Any playlist you specify as parameter can also be a symlink. If they are, then any relative paths within the playlist will be resolved in relation to the target of the symlink, rather than the symlink itself. This lets you symlink album playlists to a folder with favorite playlists of yours, and then use syncplaylists directly with those symlinked favorites.

genplaylist: the playlist generator

genplaylist generates playlists. Run genplaylist --help for more information.

Requirements / dependencies

This is a list of requirements for most of these utilities to work:

  • python3-packaging
  • python3-networkx
  • python3-pyxdg
  • python3-psutil
  • python3-mutagen
  • ffmpeg
  • GStreamer

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

musictoolbox-0.0.87.tar.gz (46.1 kB view details)

Uploaded Source

File details

Details for the file musictoolbox-0.0.87.tar.gz.

File metadata

  • Download URL: musictoolbox-0.0.87.tar.gz
  • Upload date:
  • Size: 46.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for musictoolbox-0.0.87.tar.gz
Algorithm Hash digest
SHA256 7c2835166dce7e1e50c14bffe07c70f87113ce296080745b7824b715fa40277c
MD5 0075b468def045a8fdee5aa6fcc09af3
BLAKE2b-256 daab92302180643986476708f6397573dded4db7179b070c008cad255bea8a34

See more details on using hashes here.

Supported by

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