Skip to main content

A beets plugin that adds inlining with common functions

Project description

InlinePlus plugin for Beets

This beets plugin is like the builtin inline plugin: it "lets you use Python to customize your path formats. Using it, you can define template fields in your beets configuration file and refer to them from your template strings in the paths: section."

However, inlineplus adds a fields_base: block where you can define python functions you want to use in multiple template fields.

Installation

Install the plugin into beets' Python environment with

pip install beets-inlineplus

(or the respective equivalent if you use e.g. pipx).

Usage

Add the inlineplus plugin to your config.

Then under a new fields_base: block write python functions and constants you want to use in your fielddefinition under item_fields: or album_fields:. Python function can be used in both of these section. Example:

You want to use a function anartist() both in the item field myiteminfo and in the album fields myartistinfo. Define this function in your config.yaml like this:

fields_base: |
  def anartist():
    return "AnArtist"

Then you can refer to it the item and album fields for example liek this:

item_fields:
  myiteminfo: anartist()

album_fields:
  myartistinfo: |
    return "Artist_" + anartist().upper()

and then in the paths section you can use your new fields:

paths:
    default: $albumartist/$album%aunique{}/$track $title $myiteminfo
    singelton: $myartistinfo/$title

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

beets_inlineplus-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beets_inlineplus-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file beets_inlineplus-0.1.0.tar.gz.

File metadata

  • Download URL: beets_inlineplus-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for beets_inlineplus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2c22fb0dd444d602c02a51c99614c3108df7e7443bf255f68d870d672a6a6e0
MD5 3594f294b7c94bcd50e1b3a9ab756fe9
BLAKE2b-256 479bac77cd335ebca279c2554c34cb5a7d68a9729a57ddf42f65ee0988d4eff5

See more details on using hashes here.

File details

Details for the file beets_inlineplus-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for beets_inlineplus-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2db055681ec850100006d339b85966431e81a604260109441c86b1306bf264c4
MD5 da6a666c88896714db913ea9184d16b4
BLAKE2b-256 2a346425e3404f3960063346aa59331c29af1daa03f4f8c79458c80abdbbe3b4

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