Skip to content

Operating the Build Scripts

Jerrett Longworth edited this page Feb 28, 2024 · 2 revisions

The scripts are provided as a manual alternative to the automatic process using Docker listed within the docker/docker.md file of the project. These are used internally within the automatic process, but is available for reference or extended use.


All scripts can be found in the build/ folder in the project. To use the scripts, ensure that you have pandoc (and possible additional programs needed for the PDF output) set up.

Note: The build script is expected to run in a Unix-type environment.

Required Software and Dependencies:

Optional Software:

  • Python 3 library: premailer (Use pip install premailer)
    • This is only used when premailer is enabled when running md_to_html.sh.

  • The build_all.sh script will compile all .md files in the src/ folder.
    • To use it:
      • Open your command line into to the folder that contains the script.
      • Run ./build_all.sh.
    • For more help, run ./build_all.sh -h.
  • The md_to_html.sh script will compile a single .md file that you specify.
    • To use it:
      • Open your command line into the folder that contains the script.
      • Run ./md_to_html.sh <markdown file name>.
    • For more help, run ./md_to_html.sh.

Both scripts work by using a combination of pandoc and (optionally) a Python library called premailer to convert the markdown files to HTML, DOCX, and PDF. pandoc takes care of the conversion, and premailer will adjust the HTML output from pandoc into a format that can be copy-pasted into Webcourses without losing its formatting (Webcourses does not support the <style> tag).

Clone this wiki locally