Use the odfpy api for `Openbaar Schrijver' book.
[openbaar_schrijver.git] / stylesheet.py
blobf7d03aba879329362b89dcdb8426cf77e46884fc
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 """
5 A possible use of odfpy for the `Openbaar Schrijver' book.
6 Written by Open Source Publishing.
8 http://ospublish.constantvzw.org/works/valentine-scripting
9 """
11 ## text
12 text_template = {
13 "brief" : {
14 "country" : "NL",
15 "language" : "nl",
17 "gedicht" : {
18 "country" : "NL",
19 "language" : "nl",
20 "hyphenate" : "no",
22 "verhaal" : {
23 "country" : "NL",
24 "language" : "nl",
25 "hyphenate" : "yes",
26 "hyphenationpushcharcount" : 3,
27 "hyphenationremaincharcount" : 2,
31 text_style = {
32 "brief" : {
33 "dromen" : {
34 "fontfamily" : "Libertinage",
35 #could not find fontsize in file
36 "fontsize" : "10.34pt",
38 "nevels" : {
39 "fontfamily" : "Cimatics_Dust",
40 "fontsize" : "10.34pt",
42 "oesters" : {
43 "fontfamily" : "whiskyjazz",
44 "fontsize" : "10pt",
46 "rivieren" : {
47 "fontfamily" : "Limousine",
48 "fontsize" : "10.34pt",
50 "toekan" : {
51 "fontfamily" : "diluvienne",
52 "fontsize" : "25.38pt",
54 "zon" : {
55 "fontfamily" : "NotCourierSans",
56 "fontsize" : "10pt",
59 "gedicht" : {
60 "golven" : {
61 "fontfamily" : "Cimatics_Noise",
62 "fontsize" : "13.16pt",
64 "octopus" : {
65 "fontfamily" : "diluvienne",
66 "fontsize" : "29.14pt",
68 # gui says something about shadows for rodepepers
69 # can't see where they come from!
70 "rodepepers" : {
71 "fontfamily" : "whiskyjazz",
72 "fontsize" : "13.16pt",
74 "souvenirs" : {
75 "fontfamily" : "Libertinage",
76 "fontsize" : "15.04pt",
78 "ster" : {
79 "fontfamily" : "NotCourierSans",
80 "fontsize" : "12.22pt",
82 # gui says something about vulkanen shadows
83 # can't see where they come from!
84 "vulkanen" : {
85 "fontfamily" : "Limousine",
86 "fontsize" : "14.10pt",
89 "verhaal" : {
90 # again something about shadows
91 "ijs" : {
92 "fontfamily" : "whiskyjazz",
93 "fontsize" : "8.93pt",
95 # shadows here too!
96 "maan" : {
97 "fontfamily" : "NotCourierSans",
98 "fontsize" : "8.46pt",
100 "panter" : {
101 "fontfamily" : "diluvienne",
102 "fontsize" : "25.38pt",
104 "stormen" : {
105 "fontfamily" : "Cimatics_Dust",
106 "fontsize" : "9pt",
108 "valleien" : {
109 "fontfamily" : "Limousine",
110 "fontsize" : "9.4pt",
112 "verlangens" : {
113 "fontfamily" : "Libertinage",
114 "fontsize" : "9.87pt",
119 paragraph_template = {
120 "brief" : {
121 "textalign" : "left",
122 "textindent" : "5mm",
123 "orphans" : 2,
125 "gedicht" : {
126 "textalign" : "left",
127 "textindent" : "-15mm",
128 # i think that marginleft in paragraphstyle = spacebeforetext in gui
129 "marginleft" : "15mm",
130 "orphans" : 2,
132 "verhaal" : {
133 "textalign" : "justify",
134 "textindent" : "8mm",
135 "orphans" : 2,
139 paragraph_style = {
140 "brief" : {
141 "dromen" : {
142 "lineheight" : "0.206in",
144 "nevels" : {
145 "lineheight" : "0.206in",
147 "oesters" : {
148 "lineheight" : "0.200in",
150 "rivieren" : {
151 "lineheight" : "0.206in",
153 "toekan" : {
154 "lineheight" : "0.253in",
156 "zon" : {
157 "lineheight" : "0.193in",
160 "gedicht" : {
161 "golven" : {
162 "lineheight" : "0.282in",
164 "octopus" : {
165 "lineheight" : "0.272in",
167 "rodepepers" : {
168 "lineheight" : "0.282in",
170 "souvenirs" : {
171 "lineheight" : "0.34in",
173 "ster" : {
174 "lineheight" : "0.272in",
176 "vulkanen" : {
177 "lineheight" : "0.3in",
180 "verhaal" : {
181 "ijs" : {
182 "lineheight" : "0.178in",
184 "maan" : {
185 "lineheight" : "0.169in",
187 "panter" : {
188 "lineheight" : "0.235in",
190 "stormen" : {
191 "lineheight" : "0.17in",
193 "valleien" : {
194 "lineheight" : "0.169in",
196 "verlangens" : {
197 "lineheight" : "0.169in",