This PHP code is used to produce static HTML pages using JSON files as a data source.
The resulting HTML pages are given ARK identifiers as filenames. The ARKs are gathered from the JSON metadata. The HTML pages are then stored in a pairtree_root directory structure.
BASH files are used to direct regeneration of pages by collections/title.
CSV files for loading into a MySQL database are also created.