-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTemplateElement.py
More file actions
43 lines (35 loc) · 1.04 KB
/
TemplateElement.py
File metadata and controls
43 lines (35 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
""" Common Interface expected to be implemented by the different TeX Sections (not to be
confused with \section's in actual TeX).
"""
from collections import namedtuple
Resource = namedtuple(
'Resource',
[
'filename',
'data'
]
)
class TemplateElement(object):
@property
def resources(self):
""" Requires the return of a list of `Resource` object providing
the filename the template is going to expect, and the data that
should be inside of it.
In case of none, return an empty list.
"""
return []
@property
def carta(self):
""" Create TeX Template for printable medium: "US Letter"
"""
raise NotImplementedError
@property
def oficio(self):
""" Create TeX Template for printable medium: "American Foolscap"
"""
raise NotImplementedError
@property
def thermal80mm(self):
""" Create TeX Template for printable medium: "Thermal endless 80mm width"
"""
raise NotImplementedError