Skip to main content

songbook and songsheet management for songsheets in ukedown format

Project description

udn-songbook

What'cha talkin' about, Willis?

udn-songbook is a class-based abstraction of a songbook, using the ukedown rendering engine. Long-term it is intended to replace most of the code from the ukebook-md tools. In the end, you should be able to take the code from here and create (and render) songbooks with it, producing PDFs and/or HTML (and possibly other formats, if I add them).

Requirements

Python packages

  • ukedown (markdown extensions)
  • weasyprint (PDF generation)
  • pychord (chord management)

development requirements - for future project enhancements

  • python-fretboard (chord generation)

The TL;DR

How to use the current functionality

(it only does basic things at the moment)

from udn_songbook import Song
s = song('/path/to/filename')

# list the unique chords in the song
s.chords

# save it to disk
s.save(outputfile)

# transpose by an arbitrary number of semitones
s.transpose(semitones)

# generate a PDF from the current song, using built-in templates
s.pdf()

And to build a songbook, use the SongBook class, with a directory of UDN-format songsheets

from udn_songbook import SongBook
mybook = SongBook(inputs=['directory1', 'directory2', 'someotherfile.udn'])

Songbooks have an index auto-generated, and do not support mutiple songs with the same ID (which is essentially "Title - Artist").

If your inputs include multiple songs in this way, the last one imported will be used. So name them carefully.

A Songbook in this context is a collection of song objects with additional metadata, such as an index.

Tools

The pip package also installs 2 commandline tools, aimed at managing individual songsheets:

udn_transpose, which allows in-place (or optionally to a new file) transposing of an existing songsheet by an arbitrary number of semitones. The transposition is added to metadata

udn_songsheet, which renders a UDN songsheet to a file in either PDF (default) or HTML format. it also supports in-place transposition, without affecting the original input file.

what you need to use this:

  • a directory full of UDN-format files.
  • templates:
    • index.html.j2
    • song.html.j2
  • stylesheets (up to you, you can pass their names and location to the methods)
    • pdf.css
    • ukedown.css

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

udn_songbook-1.4.6.tar.gz (82.8 kB view details)

Uploaded Source

Built Distribution

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

udn_songbook-1.4.6-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file udn_songbook-1.4.6.tar.gz.

File metadata

  • Download URL: udn_songbook-1.4.6.tar.gz
  • Upload date:
  • Size: 82.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for udn_songbook-1.4.6.tar.gz
Algorithm Hash digest
SHA256 053cc152a0a981969f83aee2d3a1aa665d22f4398957b10b605f564859004626
MD5 ff370bb0ce9ecb1c3b160d4fdce92e8b
BLAKE2b-256 fe13aa3d49cc5538afb30e5b15e2d8af552fb6a47800396678356ccccdc3161e

See more details on using hashes here.

Provenance

The following attestation bundles were made for udn_songbook-1.4.6.tar.gz:

Publisher: release.yml on lanky/udn-songbook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file udn_songbook-1.4.6-py3-none-any.whl.

File metadata

  • Download URL: udn_songbook-1.4.6-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for udn_songbook-1.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a689c3630d88d3ec7dec4ec56ed41396b4aa38053dc9d8d7957d453f41fc69cb
MD5 b4e25d013ab1184a5fb524c77cadd471
BLAKE2b-256 a9ceedd4daff03b48b1851c43cfadf8a2ea975d8a8ff1ce424d8f0f5f91d626e

See more details on using hashes here.

Provenance

The following attestation bundles were made for udn_songbook-1.4.6-py3-none-any.whl:

Publisher: release.yml on lanky/udn-songbook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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