summaryrefslogtreecommitdiff
path: root/build-programs.py
diff options
context:
space:
mode:
Diffstat (limited to 'build-programs.py')
-rwxr-xr-xbuild-programs.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/build-programs.py b/build-programs.py
index 4de6cb0..8d46bf0 100755
--- a/build-programs.py
+++ b/build-programs.py
@@ -42,12 +42,18 @@ def piece(p):
return f'<li class="intermission">{p}</li>'
return f'<li>{html.escape(p)}</li>'
-def print_program(info):
- info['description'] = run(
+def pandoc(md):
+ return run(
('pandoc',),
- input=info['description'], capture_output=True, text=True, check=True
+ input=md, capture_output=True, text=True, check=True
).stdout
+def print_program(info):
+ info['name'] = re.sub(
+ '<p>(.+)</p>', r'\1', pandoc(info['name'])
+ )
+ info['description'] = pandoc(info['description'])
+
info['pieces'] = '\n'.join(
piece(p[2:]) # Assume p.startswith('- ').
for p in info['pieces'].splitlines()