1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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()])
|