summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-05-01 12:47:22 +0200
committerDanilo M. <danix@danix.xyz>2026-05-01 12:47:22 +0200
commitba5438abaa430358eeb69b1376737ce61a3d68dc (patch)
tree581baba65edf59a60ee6a069d381a747d123f6b4 /core
parentaec3c628fb6196dd2d3cbfba84fe70a66c727833 (diff)
downloadpublisher-ba5438abaa430358eeb69b1376737ce61a3d68dc.tar.gz
publisher-ba5438abaa430358eeb69b1376737ce61a3d68dc.zip
feat: Article dataclass and ARTICLE_TYPES
Diffstat (limited to 'core')
-rw-r--r--core/models.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/models.py b/core/models.py
new file mode 100644
index 0000000..3df2088
--- /dev/null
+++ b/core/models.py
@@ -0,0 +1,15 @@
+from __future__ import annotations
+from dataclasses import dataclass
+from pathlib import Path
+
+ARTICLE_TYPES = ["Life", "Photo", "Link", "Quote", "Tech"]
+
+
+@dataclass
+class Article:
+ slug: str
+ lang: str # "it" | "en"
+ path: Path
+ frontmatter: dict
+ has_translation: bool
+ translation_path: Path | None