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
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 udn_songbook-1.5.2.tar.gz.
File metadata
- Download URL: udn_songbook-1.5.2.tar.gz
- Upload date:
- Size: 85.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a899ed09d780ad242ee5071c62b9a0ab61ee4f4dce57d91430658b573105e7b7
|
|
| MD5 |
059be3bccccb490d0822f3d7316b8436
|
|
| BLAKE2b-256 |
695c9c4102d1676f3acfd138941e86c448f70a77b693cf6d53757b509976f51f
|
Provenance
The following attestation bundles were made for udn_songbook-1.5.2.tar.gz:
Publisher:
release.yml on lanky/udn-songbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
udn_songbook-1.5.2.tar.gz -
Subject digest:
a899ed09d780ad242ee5071c62b9a0ab61ee4f4dce57d91430658b573105e7b7 - Sigstore transparency entry: 402251762
- Sigstore integration time:
-
Permalink:
lanky/udn-songbook@66f751a667adaa938773589ccd6b9d182d191b77 -
Branch / Tag:
refs/tags/v1.5.2 - Owner: https://github.com/lanky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@66f751a667adaa938773589ccd6b9d182d191b77 -
Trigger Event:
push
-
Statement type:
File details
Details for the file udn_songbook-1.5.2-py3-none-any.whl.
File metadata
- Download URL: udn_songbook-1.5.2-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f3c7ff01fad62918ad223ca90cd5b8d897c650dd3070d300a5808c4df11ff33
|
|
| MD5 |
4fe71586797bf8a3252f0a80456146d6
|
|
| BLAKE2b-256 |
f617b16325d7afa2633cbebc5e44084aa54f6ea6c469fa134730e874a3d9ef79
|
Provenance
The following attestation bundles were made for udn_songbook-1.5.2-py3-none-any.whl:
Publisher:
release.yml on lanky/udn-songbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
udn_songbook-1.5.2-py3-none-any.whl -
Subject digest:
9f3c7ff01fad62918ad223ca90cd5b8d897c650dd3070d300a5808c4df11ff33 - Sigstore transparency entry: 402251791
- Sigstore integration time:
-
Permalink:
lanky/udn-songbook@66f751a667adaa938773589ccd6b9d182d191b77 -
Branch / Tag:
refs/tags/v1.5.2 - Owner: https://github.com/lanky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@66f751a667adaa938773589ccd6b9d182d191b77 -
Trigger Event:
push
-
Statement type: