Tool for compiling text files containing lyrics into a single PDF.
Project description
songbook
Tool for compiling text files containing lyrics into a single PDF.
How to run
This tool is designed with Linux systems bundling GNU roff (groff) on them. There are two primary ways to install this tool, but in either case, you will need to install the uv package manager:
Using uvx
The simplest way to run this tool is to use the uvx command. Installation is
handled in a temporary virtual environment behind the scenes.
uvx compile-songbook path/to/my/songs output/songbook.pdf --title="My songs" --author="Bob"
As a developer
If you are familiar with groff, the more hands-on method is to clone the code.
git clone https://github.com/clockback/songbook
cd songbook
You can then use uv to run the code like so:
uv run compile-songbook path/to/my/songs output/songbook.pdf --title="My songs" --author="Bob"
The source code is written in Python and easy to modify if you wish to apply further customization.
Formatting songs
When you provide an argument to identify your songs (e.g. path/to/my/songs), all files in that directory will need to follow the following format:
Title: Song of the Flamingos
This is the first verse,
These words are all I've got,
Do you like flamingos?
I most certainly do not...
Chorus
No I don't like flamingos,
I don't like them one jot,
They cause me so much trouble,
Yes I despise them such a lot...
This is the second verse,
It's no better than the first,
I'll desist from writing more verses,
They'll probably get worse.
Chorus
Chorus
The first line constitutes metadata for the song, and a number of optional fields may be provided, for example:
Title: Song of the Flamingos
Composers: Joseph Derbyshire
Lyricists: Colin Kirk
Language: English
Category: Comedy songs
Formatting: Compact
The Language field is not presently used. The Formatting field can be set
to Plain (default) or Compact, the latter of which will reduce the
paragraph spacing.
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 compile_songbook-0.1.0.tar.gz.
File metadata
- Download URL: compile_songbook-0.1.0.tar.gz
- Upload date:
- Size: 3.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01ac282b7ef96ab301f0dcf465ead6a0d54e467d36ddf8ebba263507004b4c6d
|
|
| MD5 |
c7d23f1716b6707c0075b832fec9a36e
|
|
| BLAKE2b-256 |
1b12d99e2f0d53f23be5f1992f26da8b0b1fd702c704a03a95307ac4bfec9fad
|
File details
Details for the file compile_songbook-0.1.0-py3-none-any.whl.
File metadata
- Download URL: compile_songbook-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c74fc9713b182988c3caf3ddbd094f218f3ff9862c9aea3748325cc9692c6b49
|
|
| MD5 |
f690230f3465e1b6a41ce17af8051318
|
|
| BLAKE2b-256 |
a1652531f719610fe1a6d40671f81fe2246d25cca551b6a6ebdc7730ba806459
|