refactor: Extract templating to model module
This commit is contained in:
parent
e56f014136
commit
5450776eb2
4 changed files with 20 additions and 15 deletions
16
papis_extract/model/templating.py
Normal file
16
papis_extract/model/templating.py
Normal 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}}"
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue