Skip to main content

Workflow abstraction

Starting point

We start with a collection of markdown files containing terms and definitions. We want to create a “specification” from these markdownfiles. This is going to be an index.html file.

User Entry Point is a Command Line Menu:

  ,---.                  .   .        --.--
`---.,---.,---.,---. | |,---. |
|| ||---'| ---| || |--- |
`---'|---'`---'`---' `---'|---' `
| |


Please choose one of the following options:

[0] Add content
[1] Render specification
[2] Export to PDF
[3] Update new xrefs
[4] Update all xrefs
[5] Add, remove or view xref source
[6] Configure
[7] Open documentation website
[8] Freeze specification
[Q] Quit

An xref is a reference to another repository.

Enter your choice:

End result

The end result is an index.html file that is “self containing”, in this case meaning that it has all the styling (CSS) and behaviour (JS) and data (a JS variable) inside.

Steps:

SummaryDescriptionwhere
1: InitializeNot yet activein init.js
2: Create term index based on the files containing termsMake an ordered list (JSON) of all terms markdown filesin create-term-index.js
3: Insert term index into the system config filebased on user config file and term indexinsert-term-index.js
4: Create a version index.This page lists all available snapshots of this Spec-Up-T specificationin create-versions-index.js
5: Prepare the markdown files that contain '[[tref]]'s as a definitionA '[[tref]]' is a term defined in another (“remote”) specification. The definition (already locally stored in JSON) is inserted in the filein prepare-tref.js
6: Fix the markdown in the term filesOne blank line between paragraphs, prepend ~ to lines, etcin fix-markdown-files.js
7: Create a <script> object that contains external dataA local copy of external data are inserted in the index.htmlin index.js
Work in progress