Python tool for taking raw songs, and converting them to the Uke Wednesdays format. The hope is to prove that songs can be formatted totally automatically to fit on one page, including font-size and chord diagrams.
-
Install wkhtmltopdf, the webkit-based pdf rendering engine used by pdfkit:
sudo apt-get install wkhtmltopdf
-
If you need to use a virtual X server, follow these instructions https://github.com/JazzCore/python-pdfkit/wiki/Using-wkhtmltopdf-without-X-server
-
I'm using Conda to manage my python envionments. You can too, with this:
conda create -n form-exp . activate form-exp
-
Install dependencies
pip install -r requirements.txt
-
To run the demo:
python song_to_pdf.py
This should result in a song from the songs directory being formatting, and written out as both out.html and out.pdf.
python -m unittest
To be thought about. Good puzzle.
-
I'm writing this using the Windows Subsystem for Linux. The file permissions are resultantly a bit bananas. At some point I'll check out in real Linux and fix it. https://blogs.msdn.microsoft.com/commandline/2018/01/12/chmod-chown-wsl-improvements/
-
The .css was ripped straight out of https://fahran.net/uke-tool, and needs cleaning up.