Markdown → songbooks.
bard is a songbook compiler that reads Markdown files and produces songbooks in PDF, HTML, and Hovorka.
bard reads files like this:
```Markdown
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 goG
together to pullC
wildG
mountainEm
thyme AllC
around theAm
bloomin'C
heather, will yeG
goC
lassieG
go? ```
... and creates output like this:
Check out the Example PDF and the Example project.
bard.toml
file defines inputs, outputs and
configuration options, similar to how many static site generators work.cargo install -f bard
.Packages for more OSes are hopefully Coming Soon™.
Additionally, to generate PDFs a TeX engine is needed.
Recommended options are:
- The xelatex
compiler from TeX Live, available on most Linux OSes.
- Tectonic, available on several UNIX OSes,
recently there's an early support for Windows as well (see their CI releases).
- MiKTeX for Windows.
A word of warning: bard's Windows support is largely untested so far.
To start a new songbook project, create a new directory, navigate in it with a command line and type:
bard init
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:
bard make
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:
bard watch
... 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 Ctrl
+ 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. Check out the Contributors page for details.