Create separate JSON file that contains all the terms
Closed this issue · 2 comments
kordwarshuis commented
REPO: https://github.com/blockchainbird/spec-up-t/
Create a separate JSON file that contains all the terms to improve the readability of the JSON files.
This is a follow-up of #145
To make this workable and practical, the following should be implemented:
- a test script that checks if the file name of every file in "spec_terms_directory" is present in "markdown_paths" and notifies the user if files are missing;
- a script that adds all file names of every file in "spec_terms_directory" to "markdown_paths" in the file system default order (if the author has no specific wishes related to term order and the author keeps file names and term names inside the file connected. The author can then decide to change the order but does not have to bother if every term is added since that is an automated process;
- move "markdown_paths" to its own file (as mentioned before) instead of inside specs.json
kordwarshuis commented
Plan:
- generate
terms.json
-> contains file names of all files in/terms-and-definitions
- keep these file names outside
specs.json
so this file will be manageable in size (not the case if we have, say, 500 terms) - generate
specs-generated.json
fromspecs.json
andterms.json
specs-generated.json
is now the input for the Spec-Up-T script instead ofspecs.json
- the user does not have to deal with keeping his terms files synced with
specs.json
, and the terms will have a default order - if the user wants to change the order of the terms, they can still do that by manually editing
terms.json
specs.json
andterms.json
are configuration files.specs-generated.json
however is a “system file” and will live in/output
and should not be edited by the user
kordwarshuis commented
Done. It has its own menu item, number 5 (npm run menu
):
Please choose one of the following options:
[1] Render specification
[2] Export to PDF
[3] Look up xrefs
[4] Validate config file
[5] Add new terms
[6] Open documentation website
[Q] Quit
See https://blockchainbird.github.io/spec-up-t-website/docs/cheat-sheet#start-command-line-menu