Crate stanhope

Source
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 to files in a Process folder, based on the “Command” lines in that process’s EBML file.
write_webmenu 🔒
Write a single HTML file that serves as a Web Menu for all processes in a Process Library

Structs§

StanhopeArgs 🔒
Command Line Interface (CLI) argument structure

Functions§

archive_single_process 🔒
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 🔒
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, each with specific input and expected file generation output.