songleaf.songbook¶
A songbook: several songs in one PDF, with a table of contents, page numbers and bookmarks.
render_songbook(songs, output) renders each song through the same renderer
a single sheet uses (so each is at its fitted size), puts a table of contents
in front, stamps “page n of N” at the foot of every page and adds one PDF
bookmark per song. The renderer is a seam, as in songleaf.tools.sheet().
Functions
|
Render |
- songleaf.songbook.render_songbook(songs, output, *, title='Songbook', renderer=None, page_size='A4', toc_size=12.0, footer_size=8.0)[source]¶
Render
songs((key, song)pairs, in set-list order) as one PDF tooutput.outputis a path or a binary file object.rendereris a(song, output) -> dictrenderer (default: the dense layout). Returns{"path", "title", "pages", "songs": [{"key", "title", "artist", "page"}]}wherepageis the song’s first page in the book.- Return type: