This is a simple singlue use, mostly vibe coded tool. built using lua 5.5
lua main.lua -doc [-map ] [flags]
No flags:
-
doc only:
- scans tokens
- prints counts + syntax validation
-
map only:
- prints structured map contents
-
doc + map:
- scans tokens
- shows resolved values
- validates syntax
-sub Substitute template values only. Output = raw text with tokens resolved. No numbering, no structure changes.
-addr Inject address tags. Output uses (A:...) markers.
-addr_raw Structural numbering without substitution. Output: - keeps markdown headers (#) - applies numbering (e.g. 19.0, A., etc.) - applies [FORMAT] rules
-strip Removes address tags only.
-compile Full pipeline: 1. substitute 2. normalize structure 3. apply numbering 4. apply [FORMAT]
Output: - no address tags - no markdown headers (#) - final contract format
Map file is plain text, section-based:
[DATE] [OWNER] [LOGGER] [AGENT] [STRINGS] [PERMIT] [FORMAT]
Used for:
- resolving template tokens
- controlling output formatting
Controls rendering behavior:
NoParagraphNumbers: Section Name NoSectionNumbers: CompactSubHeaders: Section Name
Rules:
- keys are case-insensitive
- section names matched loosely (normalized)
- multiple entries allowed per key
-out Write result to file. Otherwise prints to stdout.