Transcription of song books in JSON.
The purpose of this project is to store a digital copy of the songbooks, separate data from presentation and facilitate generation of webpages/slides.
Think of it as Mail Merge in Microsoft Word using a Word template with recipients from an Excel spreadsheet - if there are any changes, just change these 2 files and run Mail Merge again, instead of changing 1000 manually typed out Word documents.
- References:
- See
data/songbook.schema.json
, which is based on JSON Schema. - Sample songbook document:
data/songbook-example.json
.
- Clone this repository or download the zip file.
- Open
html/songbook.webpage.html
in the browser. This can be run offline without Internet connection except that the links to play/stop the MIDI files will not work. - Pass the name of the songbook via the
book
query param to load the songbook, e.g.file:///C:/Users/Me/Downloads/songbooks/html/songbook.webpage.html?book=songbook-example
. This loads the JavaScript filedist/songbook-example.js
converted fromdata/songbook-example.json
to allow easier embedding in webpages without worrying about CORS issues, else the webpages must be hosted on a localhost/remote server and cannot be run offline. - The webpage also takes in query params
css
andjs
for loading of an additional stylesheet and script respectively. See the top docblock inhtml/songbook.webpage.html
for more details. - For convenience, open
html/index.html
in the browser, which lists all the songbooks in this project.
- The files in the
assets
folder, especiallyhymns.css
andhymns.js
, are site-specific (not generic) and hence not put in thehtml
folder. The MIDI files referenced inhymns.js
are not stored in this repository. - The
.js
files in thedist
folder are generated from the.json
files in thedata
folder, usingscripts/data2dist.sh
, for easier embedding in webpages without worrying about CORS.