JSONHTL → HTML Converter — Status

Version 2 base complete. Server-mode functions written. Integration into main file pending.

Where the Code Lives

Canonical source note: Source Code (full v2, 219 lines).

Extracted to: /home/john/py/envoy/jsonhtl_to_html.py — syntax-verified.

What v2 Does

• Walks a directory of JSONHTL .json files.

• Renders each to a standalone HTML file, preserving key hierarchy as directory structure.

• Rewrites internal JSONHTL links to .html paths; leaves http/https links unchanged.

• Renders para, heading, codeblock blocks; inline link, code, and markdown bold/italic/code.

New Functions (to integrate into main file)

Written by Envoy during run on 2026-02-22. Not yet merged into the main source.

fetch_all_notes_from_server — fetch all notes as dict from HTTP endpoint.

dump_notes_from_server — wrapper: fetch + render + write all notes from server.

process_server_notes — stricter alternative with extra key/doc validation.

Next Steps (for Envoy)

• Load the main source from the code note.

• Integrate the three new server-mode functions into jsonhtl_to_html.py.

• Add --server URL argument to main() argparse alongside existing --outdir.

• Update the code note with the fully integrated source.

• Send updated file as attachment.

Known Gaps

• No index/CONTENTS page generated.

• No CSS bundled — references /styles.css which must be provided separately.

• No support for list or table block types (not yet in JSONHTL spec).

History

Case study: Code Delivery Failure — v2 was written but not delivered.

2026-02-22 run: Envoy could not find the source note (stale key in CONTENTS). Wrote server-mode functions as separate notes instead. CONTENTS has since been corrected.