beets plugin to handle yaml playlists
Project description
beets-yapl
beets plugin to parse a yaml playlist format and compile it into the near universally supported M3U format.
M3U playlists are inherently fragile, breaking at the slightest change in a file's path. This plugin utilises beetDreamers' queries to define playlists in a simple yaml format, where you can provide precisely the level of detail required to unambiguously find the song you're after.
A playlist can be written as:
name: Christmas
tracks:
# The library only contains one version of this song, so this is enough.
- title: Christmas (Baby Please Come Home)
artist: Darlene Love
# The library contains multiple recordings of this track, so let's include
# the year to get the right version.
- artist: Withered Hand
title: Real Snow
year: 2013
# Typing Japanese characters is finicky, so let's just use the track's
# MusicBrainz ID
- mb_trackid: dafff56a-f327-4de5-ab35-633c8863857f
which will be compiled into an M3U playlist looking something like:
#EXTM3U
#PLAYLIST:Christmas
#EXTINF:166, Darlene Love - Christmas (Baby Please Come Home)
../Darlene Love/Non-Album/Christmas (Baby Please Come Home).flac
#EXTINF:202, Withered Hand - Real Snow
../Withered Hand/Non-Album/Real Snow.flac
#EXTINF:266, クレイジーケンバンド - クリスマスなんて、大嫌い!!なんちゃって
../クレイジーケンバンド/Non-Album/クリスマスなんて、大嫌い!!なんちゃって.m4a
Getting Started
Installation
To install via pip: Run pip install beets-yapl.
If you're on an Arch-based distro, you can install it from the AUR as beets-yapl-git.
Configuration
Enable the plugin by adding it to your plugin option in the beets configuration and configure the plugin.
plugins:
- ...
- yapl
yapl:
input_path: /home/nichobi/Music/playlists/
output_path: /home/nichobi/Music/playlists/
relative: true
input_path: path decides what directory yapl will search for yapl files.
output_path: path decides where to output the compiled m3u files. Can be the same as input_path.
relative: bool controls whether to use absolute or relative filepaths in the outputted M3U files.
Run
Once configured, run beet yapl to compile all the playlists in your input_path directory. Warnings will be issued for any ambiguous or resultless queries and these tracks will be left out of the output.
$ beet yapl
Parsing christmas.yaml
Multiple results for query: ['artist:Withered Hand', 'title:Real Snow']
No results for query: ['artist:UNPOC', 'title:Icelandic Leopard Cat']
Writing christmas.m3u
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beets-yapl-0.1.2.tar.gz.
File metadata
- Download URL: beets-yapl-0.1.2.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef791fcf91a0519eb4c8bfe57e3e89af1d7a2b32397bb74107a2a901a34dcffc
|
|
| MD5 |
56d7a257bccfd031c0836b66b5efcc18
|
|
| BLAKE2b-256 |
6a151b3d914c58f3ca397828b66433eee70d254580d204b02eeec1cceb944a7d
|
File details
Details for the file beets_yapl-0.1.2-py3-none-any.whl.
File metadata
- Download URL: beets_yapl-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8969e9806ba7c409425eda9a92d4a8e41df56ebcd24005899ca0dce595df29c8
|
|
| MD5 |
cc524ea3d60aef0c3de257af3b9a5be3
|
|
| BLAKE2b-256 |
38b03ef8078f3da6ea68025fd2855b1a463bf7a49ba01df41bdff2903bd2d759
|