This directory contains scripts that automatically generate artefacts.
-
generate_sampler.pypopulates thesampler/directory with sampler images in showing all of the glyphs of a particular type -
collate_glyphs.pypopulates theglyph_collections/[pdf|svg|png]directories with images of all glyphs in a particular format -
generate_table.pyupdatesSEPs/summary.csv, which summarises the SEP files -
rebuild_glyphs.pypopulatesspecification/glyphscript/, by converting the README files for individual glyphs into PDFs, and creating a.texfile for each type of glyph, including these PDFs -
generated_samples_appendix.pypopulatesspecification/apdx-examples.tex, and also an HTML file to be pushed toSynbioDex/SbolStandardWebsite
These scripts read data from JSON files:
glyph_list.jsonstores information about the glyphsexample-figures.jsonstores information about the example images. Note that thecaptionproperties should be unformatted text: any LaTeX markup will appear un-processed on the page of specification examples on the website.
The scripts are run by GitHub Actions, as defined by the YAML files in .github/workflows.
- When a PR is merged to master, the sampler images and SEP summary table are committed to the repository; the zip files containing glyphs, and a PDF of the complete specification are uploaded to GitHub as Build Artefacts, which are temporarily available to download.
- When a release is made, these assets are uploaded as Release Artefacts, which are permanently available to download.
- When the
update_website_specification_exmplesworkflow is manually triggered, an updated markdown page and set of PNG images are pushed toSynbioDex/SbolStandardWebsite. This triggers an action on that repo which automatically re-generates and publishes the website.
The PDF files for individual glyphs are generated as intermediates when building the specification PDF, but they are not automatically updated. You can generate them manually using:
npm install markdown-pdf
python3 scripts/rebuild_glyphs.pyIf you do this manually, the first run of this script will regenerate all PDFs (not just those for glyphs that have been modified), unless you used a tool like git-restore-mtime to set the mtime of each file to the time when they were last modified, rather than the time that they were checked-out using Git.
Note that npm can install packages either globally (if the -g argument is provided) or locally.
The rebuild_glyphs.py script expects markdown-pdf to be installed in the top-level of the repository.
This should regenerate only the updated PDFs in specifications/glyphscript/Glyphs/, and update the .tex files in specifications/glyphscript/.
Similarly, apdx-examples.tex is automatically regenerated (based on example-figures.json) when the specification is built, but the new files is not committed.
You can re-generate it manually using
python3 scripts/generated_samples_appendix.py