refactor: Extract templating to model module

This commit is contained in:
Marty Oehme 2023-08-31 21:40:38 +02:00
parent e56f014136
commit 5450776eb2
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
4 changed files with 20 additions and 15 deletions

View file

@ -0,0 +1,16 @@
from dataclasses import dataclass
from typing import Protocol
@dataclass
class Templating(Protocol):
string: str
@dataclass
class Markdown:
string: str = (
"{{#tag}}#{{tag}}\n{{/tag}}"
"{{#quote}}> {{quote}}{{/quote}} {{#page}}[p. {{page}}]{{/page}}\n"
"{{#note}} NOTE: {{note}}{{/note}}"
)