Scratch exercises made with scratch-LN.
Write scratch exercises in markdown.
The exercises are then avaible in web form or in pdf form.
Scripts for: markdown -> html -> pdf
- pandoc
- recent version of node (I used v8.11.1)
- puppeteer, (
npm install puppeteer -g) - I used cygwin to run scripts
You first have to generate the html with pandoc, next you can use the puppeteer script to make a pdf. Some script are provided but might need some adjustments to work for you.
The file create-web.sh generates a html file using pandoc. Give as argument the 'name' of one or more files in the markdown-directory, this is without extension, it will output a html file in the web-directory. The html file contains the header defined in head.html. This header contains the reference to scratch-LN. If the option -a is provided all files in the markdown-directory will be generated.
verify in the create-web.sh:
- how you run pandoc
This script can be runned as
./create-web.sh -a./create-web.sh test./create-web.sh test test2
The file makePDF.js generates the pdf using puppeteer. No arguments generates all files in the web-directory, the name(s) (same as above without extension) of selected files is also possible.
verify in the makePDF.js:
- module.paths
- directory const
This script can be runned as
node makePDF.jsnode makePDF.js testnode makePDF.js test test2
- Ellen Vanhove - [email protected]