5 releases (3 stable)
|1.0.2||Apr 10, 2021|
|1.0.1||Apr 7, 2021|
|1.0.0||Apr 2, 2021|
|0.9.0-alpha||Jul 30, 2020|
|0.1.0||Apr 9, 2020|
#64 in Text processing
Markdown → songbooks.
bard is a songbook compiler that reads Markdown files and produces songbooks in PDF, HTML, and Hovorka.
bard reads files like this:
# Wild Mountain Thyme ## Irish & Scottish traditional 1. Oh the `G`summer `C`time `G`has come And the `C`trees are sweetly `G`bloomin' And the `C`wild `G`mountain `Em`thyme Grows `C`around the `Am`bloomin' `C`heather Will ye `G`go `C`lassie `G`go? > And we'll `C`all go `G`together to pull `C`wild `G`mountain `Em`thyme All `C`around the `Am`bloomin' `C`heather, will ye `G`go `C`lassie `G`go?
... and creates output like this:
- bard is project-oriented: A single
bard.tomlfile defines inputs, outputs and configuration options, similar to how many static site generators work.
- Easy to use input format, you probably already understand it.
- Output formats:
- PDF via TeX
- Hovorka XML
- JSON (for machine processing)
- Transposition and notation conversion
- Optionally with a secondary chord set
- Templating: Outputs are fully customizable with Handlebars templates.
There are no packages yet. For now, you'll probably have to compile from sources using Rust toolchain:
cargo install -f bard
Windows executables are available, but they were not tested yet.
Improvements to this situation are Coming Soon™.
To start a new songbook project, create a new directory, navigate in it with a command line and type:
This will create a skeleton project with a
bard.toml file and a
songs subdirectory with one example Markdown song file.
To compile the project and generate output files type:
While editing the
bard.toml file or song source files, it would become annoying to have to type
bard make every time there's a change. For this reason there's another command:
... which will make bard run continuously, watching for changes in sources files.
It will then re-compile the songbook every time there's a change. Use
C to stop it.
The default layout is optimized for songbooks that are fairly portable (A5 format) and yet offer hopefully fairly good legibility at that size. They are meant to handle travel and outdoor situations as well as possible. This is why the font is fairly large, the chords in bold and color, and generally the page real estate tends to be used as much as possible.
I've tried reading a songbook illuminated only by a campfire or a half-working flashlight over someone's shoulder way too many times to tolerate small fonts and mostly empty pages.
As a matter of fact, yes, this tool was made by less than three developers. It's really just me so far.