diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-11-06 23:53:00 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-11-06 23:53:00 +0100 |
commit | f5bd5efea9340c39c673d999d419a97bb6a20990 (patch) | |
tree | 5d725bbee6f3f554e14995f098c95467c872ee35 /html.py | |
parent | Initial commit. (diff) | |
download | man-http-master.tar.gz man-http-master.tar.xz |
Diffstat (limited to '')
-rwxr-xr-x | html.py | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +#!/usr/bin/env python3 + +import json +import unicodedata +from roff import ( + now, + roff_table, + section_heading, + title_heading, +) + +title_heading("HTML", 7, + footer_middle=f"{now():%Y-%m-%d}") + +with open('entities.json') as f: + data = json.load(f) + + +section_heading("entities") + + +roff_table([("Seq", "R"), + ("Char", "L"), + ("Formal Name", "L")], + ["code", "characters", "formal"], + [{"code": code, + "characters": data["characters"], + "formal": ", ".join(unicodedata.name(c, "[NONAME]") + for c in data["characters"])} + for (code, data) in data.items()]) |