-
Notifications
You must be signed in to change notification settings - Fork 0
/
generic_poems.py
92 lines (84 loc) · 2.15 KB
/
generic_poems.py
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
"""Utility file for producing cannibal corpse limerick book"""
from mypoem import Poem
GENERIC_POEM_TITLE_1 = 'TITLE1'
GENERIC_POEM_TITLE_2 = 'TITLE2'
generic_poem_body_1 = [
'LINE1-1',
'LINE1-2',
'LINE1-3',
'LINE1-4',
'LINE1-5',
]
generic_poem_body_2 = [
'LINE2-1',
'LINE2-2',
'LINE2-3',
'LINE2-4',
'LINE2-5',
]
GENERIC_POEM_IMAGE_1 = 'cache/GENERIC/GENERIC1.jpg'
GENERIC_POEM_IMAGE_2 = 'cache/GENERIC/GENERIC2.jpg'
#class Poem:
# def __init__(self):
# self.title = 'UNTITLED'
# self.body = []
# self.image = 'cache/GENERIC/noimage.jpg'
#
# def return_section(self):
# section_string = """% Layout ???
#\\begin{center}\includegraphics[width=5.0in,height=6.5in,keepaspectratio]{GENERIC/GENERIC1.jpg}
#\\end{center}
#\\begin{center}
#\\textbf{"""
# section_string += self.title
# section_string += """}\\\\
#\\vskip 0.2in
#"""
# for thisline in self.body:
# section_string += thisline
# section_string += """\\\\\n"""
# section_string += """\end{center}
#\pagebreak
#"""
# return section_string
#
# def return_web(self):
# section_string = """<!DOCTYPE html>
#<html>
#<head>
#<meta name="viewport" content="width=device-width, initial-scale=1">
#<link rel="stylesheet" href="mystyle.css">
#</head>
#<body>"""
# section_string += "<img src=\""
# section_string += "images/cancorps/GENERIC/noimage.jpg"
# section_string += "\">\n"
# section_string += "<H1>"
# section_string += "TITLE1"
# section_string += "</H1>\n"
# section_string += "<P>\n"
# for thisline in self.body:
# section_string += thisline
# section_string += "<BR>\n"
# section_string += """<P>
#</body>
#</html>
#"""
# return section_string
poem_1 = Poem()
poem_2 = Poem()
poem_1.title = GENERIC_POEM_TITLE_1
poem_2.title = GENERIC_POEM_TITLE_2
poem_1.body = generic_poem_body_1
poem_2.body = generic_poem_body_2
poem_1.image = GENERIC_POEM_IMAGE_1
poem_2.image = GENERIC_POEM_IMAGE_2
poem_list = []
poem_list.append(poem_1)
poem_list.append(poem_2)
for thispoem in poem_list:
print(thispoem.title)
poem_section = thispoem.return_section()
print(poem_section)
poem_webpage = thispoem.return_web()
print(poem_webpage)