|
@@ -8,6 +8,7 @@ import pystache
|
|
import shutil
|
|
import shutil
|
|
import sys
|
|
import sys
|
|
import tempfile
|
|
import tempfile
|
|
|
|
+from typing import Optional
|
|
import yaml
|
|
import yaml
|
|
|
|
|
|
class Datum:
|
|
class Datum:
|
|
@@ -39,6 +40,7 @@ class Work:
|
|
title: str
|
|
title: str
|
|
date: str
|
|
date: str
|
|
contents: str
|
|
contents: str
|
|
|
|
+ description: Optional[str] = None
|
|
|
|
|
|
class Path:
|
|
class Path:
|
|
OUTDIR=tempfile.TemporaryDirectory()
|
|
OUTDIR=tempfile.TemporaryDirectory()
|
|
@@ -194,7 +196,9 @@ def main():
|
|
# report other works in their own year
|
|
# report other works in their own year
|
|
copy = f'© Getty Ritter {w.date}'
|
|
copy = f'© Getty Ritter {w.date}'
|
|
|
|
|
|
- if slug in category_lookup:
|
|
|
|
|
|
+ if w.description is not None:
|
|
|
|
+ description = w.description
|
|
|
|
+ elif slug in category_lookup:
|
|
singular = category_lookup[slug]['singular']
|
|
singular = category_lookup[slug]['singular']
|
|
description = f'{w.title}: a {singular}'
|
|
description = f'{w.title}: a {singular}'
|
|
else:
|
|
else:
|