Expand description
Stanhope, named after the Stanhope Printing Press that improved upon Gutenberg’s design by using sturdy iron and steel parts and hand levers to increase printing speed and quality.
This application takes an input argument file in a specific markup and produces a static, printable HTML page based on the markup file’s contents.
The real power in this application is the markup language, which has these features:
- Single-purpose: just for writing processes that can be printed as documents
- General: suitable for writing any process
- Consistent: output branding and style is centrally controlled for 100% consistent processes in an organization’s library
- Visually flexible: custom templates can mold the look/feel of the HTML produced
- Format rigid: we want process authors to think carefully to help operators in the field, and Stanhope forces authors to conform to pre-thought out process language and structure that solves this
Modules§
- read_
csv 🔒 - Interpret a well-formatted CSV file into a set of initialized Process structs, one for each row
- read_
ebml 🔒 - Read a markup file and return a robust Process struct
- write_
ebml 🔒 - Write an EBML file using a prototype, and some basic information about a new process
- write_
html 🔒 - Write a single HTML file from a single EBML file input
- write_
script 🔒 - Write various kinds of script files into a Process folder from the Commands
- write_
webmenu 🔒 - Write a single HTML file that serves as a Web Menu for all processes in a Process Library
Structs§
- Stanhope
Args 🔒 - Command Line Interface (CLI) argument structure
Functions§
- archive_
single_ 🔒process - Perform OS functions to stash a copy of all working material for a process
- attempt_
fallbacks 🔒 - Gracefully cycle through ordered OS commands until one of them works
- copy_
dir_ 🔒all - Recursive copy of all contents in one folder to another
- copy_
files_ 🔒all - Copy everything that ISN’T a directory… just the files
- globify_
document_ number - Accept wildcard statements describing a subset of process folders, and return all matches
- list_
directories_ 🔒to_ cleanup - File management: return a vector of directories eligible to delete as a “cleanup” operation
- main 🔒
- Run Stanhope in one of (or more!) of its modes
- print_
filename_ 🔒audit_ to_ stdout - Look into each process folder, read the EBML, find the Number and Title, check consistency, print findings to stdout
- print_
graphics_ 🔒audit_ to_ stdout - Look into each process folder, read the EBML, find the images, and check to see if they exist, print findings to stdout
- print_
title_ 🔒block_ to_ stdout - Utility function to print a box outline around text in stdout, perhaps for a title