petit-felix 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/version.rb +1 -1
- data/lib/worker/pdf_writer.rb +1 -1
- data/lib/worker/templater/methods.rb +17 -7
- data/templates/zine-single-custom.json +806 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50f47d2c720a284d85f9251453a099bbc6cfa7b99bdbd3e617121506a90030d3
|
4
|
+
data.tar.gz: '04498d346a54b8b57319e56223b2277029bc550fd9bf49f0d38af99bae665456'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdfbff2e5456015dfdaf76882f7bfe4f2b53d518b2d342ff9eae03ac27d3b76432fe6aae9646a1189557a61d8a0a085bc7ea6e209c4f614687ad5e7875412fe8
|
7
|
+
data.tar.gz: 1200c6f11c71e5ae51a70f663ee65b2e100898c4752ad469b5d24f6702dc0f0a6d08c1222e3aeddd7f4a8ffc2fffb716d6a900a27bb59e867f9eb790ec31ac97
|
data/lib/version.rb
CHANGED
data/lib/worker/pdf_writer.rb
CHANGED
@@ -483,23 +483,33 @@ module PetitFelix
|
|
483
483
|
@variables["paginator_end"] = args[:page_finish]
|
484
484
|
|
485
485
|
if page_mode == :alternate
|
486
|
-
|
486
|
+
|
487
487
|
odd_options = odd_array.merge(args)
|
488
488
|
|
489
489
|
even_options = even_array.merge(args)
|
490
490
|
|
491
|
+
if @variables["paginator_switch"].to_s.downcase == "true"
|
491
492
|
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
493
|
+
odd_options[:start_count_at] += 1
|
494
|
+
|
495
|
+
even_options[:page_filter] = ->(pg) { pg > @variables["paginator_start"] && (pg < @variables["paginator_end"] || @variables["paginator_end"] <= -1) && pg % 2 == 1 }
|
496
|
+
odd_options[:page_filter] = ->(pg) { pg > @variables["paginator_start"] && (pg < @variables["paginator_end"] || @variables["paginator_end"] <= -1) && pg % 2 == 0 }
|
497
|
+
|
498
|
+
else
|
499
|
+
|
500
|
+
even_options[:start_count_at] += 1
|
501
|
+
|
502
|
+
odd_options[:page_filter] = ->(pg) { pg > @variables["paginator_start"] && (pg < @variables["paginator_end"] || @variables["paginator_end"] <= -1) && pg % 2 == 1 }
|
503
|
+
even_options[:page_filter] = ->(pg) { pg > @variables["paginator_start"] && (pg < @variables["paginator_end"] || @variables["paginator_end"] <= -1) && pg % 2 == 0 }
|
504
|
+
|
505
|
+
|
506
|
+
end
|
497
507
|
|
498
508
|
string = replace_variable args[:text]
|
499
509
|
|
500
510
|
number_pages string, odd_options
|
501
511
|
number_pages string, even_options
|
502
|
-
|
512
|
+
|
503
513
|
else
|
504
514
|
|
505
515
|
odd_array = {
|
@@ -0,0 +1,806 @@
|
|
1
|
+
{
|
2
|
+
"fonts": {
|
3
|
+
"default": {
|
4
|
+
"normal": "${font_normal}",
|
5
|
+
"italic": "${font_italic}",
|
6
|
+
"bold": "${font_bold}",
|
7
|
+
"bold_italic": "${font_bold_italic}"
|
8
|
+
},
|
9
|
+
"front_title": {
|
10
|
+
"normal": "${front_title_font_normal}",
|
11
|
+
"italic": "${front_title_font_italic}",
|
12
|
+
"bold": "${front_title_font_bold}",
|
13
|
+
"bold_italic": "${front_title_font_bold_italic}"
|
14
|
+
},
|
15
|
+
"front_author": {
|
16
|
+
"normal": "${front_author_font_normal}",
|
17
|
+
"italic": "${front_author_font_italic}",
|
18
|
+
"bold": "${front_author_font_bold}",
|
19
|
+
"bold_italic": "${front_author_font_bold_italic}"
|
20
|
+
},
|
21
|
+
"front_date": {
|
22
|
+
"normal": "${front_date_font_normal}",
|
23
|
+
"italic": "${front_date_font_italic}",
|
24
|
+
"bold": "${front_date_font_bold}",
|
25
|
+
"bold_italic": "${front_date_font_bold_italic}"
|
26
|
+
},
|
27
|
+
"front_publish": {
|
28
|
+
"normal": "${front_publish_font_normal}",
|
29
|
+
"italic": "${front_publish_font_italic}",
|
30
|
+
"bold": "${front_publish_font_bold}",
|
31
|
+
"bold_italic": "${front_publish_font_bold_italic}"
|
32
|
+
},
|
33
|
+
"back_default": {
|
34
|
+
"normal": "${back_text_font_normal}",
|
35
|
+
"italic": "${back_text_font_italic}",
|
36
|
+
"bold": "${back_text_font_bold}",
|
37
|
+
"bold_italic": "${back_text_font_bold_italic}"
|
38
|
+
},
|
39
|
+
"back_author": {
|
40
|
+
"normal": "${back_author_font_normal}",
|
41
|
+
"italic": "${back_author_font_italic}",
|
42
|
+
"bold": "${back_author_font_bold}",
|
43
|
+
"bold_italic": "${back_author_font_bold_italic}"
|
44
|
+
},
|
45
|
+
"back_publish": {
|
46
|
+
"normal": "${back_publish_font_normal}",
|
47
|
+
"italic": "${back_publish_font_italic}",
|
48
|
+
"bold": "${back_publish_font_bold}",
|
49
|
+
"bold_italic": "${back_publish_font_bold_italic}"
|
50
|
+
},
|
51
|
+
"paginator": {
|
52
|
+
"normal": "${paginator_font_normal}",
|
53
|
+
"italic": "${paginator_font_italic}",
|
54
|
+
"bold": "${paginator_font_bold}",
|
55
|
+
"bold_italic": "${paginator_font_bold_italic}"
|
56
|
+
},
|
57
|
+
"header1": {
|
58
|
+
"normal": "${header1_font_normal}",
|
59
|
+
"italic": "${header1_font_normal}",
|
60
|
+
"bold": "${header1_font_normal}",
|
61
|
+
"bold_italic": "${header1_font_normal}"
|
62
|
+
},
|
63
|
+
"header2": {
|
64
|
+
"normal": "${header2_font_normal}",
|
65
|
+
"italic": "${header2_font_normal}",
|
66
|
+
"bold": "${header2_font_normal}",
|
67
|
+
"bold_italic": "${header2_font_normal}"
|
68
|
+
},
|
69
|
+
"header3": {
|
70
|
+
"normal": "${header3_font_normal}",
|
71
|
+
"italic": "${header3_font_normal}",
|
72
|
+
"bold": "${header3_font_normal}",
|
73
|
+
"bold_italic": "${header3_font_normal}"
|
74
|
+
},
|
75
|
+
"header4": {
|
76
|
+
"normal": "${header4_font_normal}",
|
77
|
+
"italic": "${header4_font_normal}",
|
78
|
+
"bold": "${header4_font_normal}",
|
79
|
+
"bold_italic": "${header4_font_normal}"
|
80
|
+
},
|
81
|
+
"header5": {
|
82
|
+
"normal": "${header5_font_normal}",
|
83
|
+
"italic": "${header5_font_normal}",
|
84
|
+
"bold": "${header5_font_normal}",
|
85
|
+
"bold_italic": "${header5_font_normal}"
|
86
|
+
},
|
87
|
+
"header6": {
|
88
|
+
"normal": "${header6_font_normal}",
|
89
|
+
"italic": "${header6_font_normal}",
|
90
|
+
"bold": "${header6_font_normal}",
|
91
|
+
"bold_italic": "${header6_font_normal}"
|
92
|
+
},
|
93
|
+
"quote": {
|
94
|
+
"normal": "${quote_font_normal}",
|
95
|
+
"italic": "${quote_font_italic}",
|
96
|
+
"bold": "${quote_font_bold}",
|
97
|
+
"bold_italic": "${quote_font_bold_italic}"
|
98
|
+
}
|
99
|
+
},
|
100
|
+
"default_variables": {
|
101
|
+
"header1_size": 32,
|
102
|
+
"header2_size": 28,
|
103
|
+
"header3_size": 20,
|
104
|
+
"header4_size": 18,
|
105
|
+
"header5_size": 16,
|
106
|
+
"header6_size": 14,
|
107
|
+
"header1_line_spacing": 0,
|
108
|
+
"header2_line_spacing": 0,
|
109
|
+
"header3_line_spacing": 0,
|
110
|
+
"header4_line_spacing": 0,
|
111
|
+
"header5_line_spacing": 0,
|
112
|
+
"header6_line_spacing": 0,
|
113
|
+
"quote_size": 18,
|
114
|
+
"quote_horizontal_margin" : 5,
|
115
|
+
"quote_vertical_margin" : 30,
|
116
|
+
"image_pad" : 5,
|
117
|
+
"header1_margin" : 10,
|
118
|
+
"header2_margin" : 10,
|
119
|
+
"header3_margin" : 10,
|
120
|
+
"header4_margin" : 10,
|
121
|
+
"header5_margin" : 10,
|
122
|
+
"header6_margin" : 10,
|
123
|
+
|
124
|
+
"font_normal": "./assets/font/Unageo-Regular.ttf",
|
125
|
+
"font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
126
|
+
"font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
127
|
+
"font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
128
|
+
"front_title_font_normal": "./assets/fonts/Fluox___.ttf",
|
129
|
+
"front_title_font_italic": "./assets/fonts/Fluox___.ttf",
|
130
|
+
"front_title_font_bold": "./assets/fonts/Fluox___.ttf",
|
131
|
+
"front_title_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
132
|
+
"front_author_font_normal": "./assets/fonts/Kingthings_Trypewriter_2.ttf",
|
133
|
+
"front_author_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
134
|
+
"front_author_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
135
|
+
"front_author_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
136
|
+
"front_date_font_normal": "./assets/font/Unageo-Regular.ttf",
|
137
|
+
"front_date_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
138
|
+
"front_date_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
139
|
+
"front_date_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
140
|
+
"front_publish_font_normal": "./assets/font/Unageo-Regular.ttf",
|
141
|
+
"front_publish_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
142
|
+
"front_publish_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
143
|
+
"front_publish_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
144
|
+
"back_text_font_normal": "./assets/font/Unageo-Regular.ttf",
|
145
|
+
"back_text_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
146
|
+
"back_text_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
147
|
+
"back_text_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
148
|
+
"back_author_font_normal": "./assets/font/Unageo-Regular.ttf",
|
149
|
+
"back_author_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
150
|
+
"back_author_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
151
|
+
"back_author_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
152
|
+
"back_publish_font_normal": "./assets/font/Unageo-Regular.ttf",
|
153
|
+
"back_publish_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
154
|
+
"back_publish_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
155
|
+
"back_publish_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
156
|
+
"paginator_font_normal": "./assets/fonts/veteran_typewriter.ttf",
|
157
|
+
"paginator_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
158
|
+
"paginator_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
159
|
+
"paginator_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
160
|
+
|
161
|
+
"quote_font_normal": "./assets/font/Unageo-Regular.ttf",
|
162
|
+
"quote_font_italic": "./assets/font/Unageo-Regular-Italic.ttf",
|
163
|
+
"quote_font_bold": "./assets/font/Unageo-ExtraBold.ttf",
|
164
|
+
"quote_font_bold_italic": "./assets/font/Unageo-ExtraBold-Italic.ttf",
|
165
|
+
"header1_font_normal": "./assets/font/Unageo-Regular.ttf",
|
166
|
+
"header2_font_normal": "./assets/font/Unageo-Regular.ttf",
|
167
|
+
"header3_font_normal": "./assets/font/Unageo-Regular.ttf",
|
168
|
+
"header4_font_normal": "./assets/font/Unageo-Regular.ttf",
|
169
|
+
"header5_font_normal": "./assets/font/Unageo-Regular.ttf",
|
170
|
+
"header6_font_normal": "./assets/font/Unageo-Regular.ttf",
|
171
|
+
|
172
|
+
"default_font_size" : 12,
|
173
|
+
"columns" : 1,
|
174
|
+
"alternates_pages" : true,
|
175
|
+
|
176
|
+
"front_cover" : false,
|
177
|
+
"front_extra_page" : true,
|
178
|
+
"front_extra_page_show" : true,
|
179
|
+
"front_extra_page_image" : "city.png",
|
180
|
+
"front_title_size" : 56,
|
181
|
+
"front_author_size" : 24,
|
182
|
+
"front_author" : "",
|
183
|
+
"front_date_size" : 14,
|
184
|
+
"front_date_text" : "Original Publication: ${publication_date}",
|
185
|
+
"publication_date" : "",
|
186
|
+
"front_publish_size" : 16,
|
187
|
+
"front_publish_text" : "",
|
188
|
+
"front_cover_show_image" : true,
|
189
|
+
"front_cover_image" : "",
|
190
|
+
|
191
|
+
"back_cover" : false,
|
192
|
+
"back_extra_page" : false,
|
193
|
+
"back_extra_page_show" : false,
|
194
|
+
"back_extra_page_image" : "",
|
195
|
+
"back_text_size" : 18,
|
196
|
+
"back_text" : "",
|
197
|
+
"back_text_line_spacing" : 0,
|
198
|
+
"back_cover_show_image" : true,
|
199
|
+
"back_cover_image" : "",
|
200
|
+
"back_author_size" : 14,
|
201
|
+
"back_author" : "",
|
202
|
+
"back_publish_size" : 12,
|
203
|
+
"back_publish_text" : "",
|
204
|
+
|
205
|
+
"paginator" : true,
|
206
|
+
"paginator_size" : 14,
|
207
|
+
"paginator_start" : 1,
|
208
|
+
"paginator_switch" : true,
|
209
|
+
"page_mode" : "alternate",
|
210
|
+
"paginator_align" : "right",
|
211
|
+
"paginator_odd_align" : "right",
|
212
|
+
"paginator_even_align" : "left",
|
213
|
+
"paginator_y" : 0,
|
214
|
+
|
215
|
+
"markdown_margin_array": "[{\"left\":10,\"right\":60,\"top\":30,\"bottom\":30},{\"left\":60,\"right\":10,\"top\":30,\"bottom\":30}]",
|
216
|
+
"back_text_margin": "[{\"left\":30, \"right\":30, \"top\":30, \"bottom\":30 }]"
|
217
|
+
},
|
218
|
+
"definition": {
|
219
|
+
|
220
|
+
"start_new_page_front": [
|
221
|
+
{
|
222
|
+
"cmd": "set",
|
223
|
+
"args": {
|
224
|
+
"var": "page_start_increment",
|
225
|
+
"val" : "${page_start_increment} + 1"
|
226
|
+
}
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"cmd" : "if",
|
230
|
+
"args" : {
|
231
|
+
"exp" : "${front_extra_page_show}",
|
232
|
+
"func" : "start_new_page_front_img"
|
233
|
+
}
|
234
|
+
},
|
235
|
+
{
|
236
|
+
"cmd": "start_new_page"
|
237
|
+
}
|
238
|
+
],
|
239
|
+
|
240
|
+
"start_new_page_front_img": [
|
241
|
+
{
|
242
|
+
"cmd" : "image",
|
243
|
+
"args" : {
|
244
|
+
"file" : "${front_extra_page_image}",
|
245
|
+
"vposition" : "center"
|
246
|
+
}
|
247
|
+
}
|
248
|
+
],
|
249
|
+
|
250
|
+
"start_new_page_back": [
|
251
|
+
{
|
252
|
+
"cmd": "set",
|
253
|
+
"args": {
|
254
|
+
"var": "page_end_increment",
|
255
|
+
"val" : "${page_end_increment} + 1"
|
256
|
+
}
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"cmd": "start_new_page"
|
260
|
+
},
|
261
|
+
{
|
262
|
+
"cmd" : "if",
|
263
|
+
"args" : {
|
264
|
+
"exp" : "${back_extra_page_show}",
|
265
|
+
"func" : "start_new_page_back_img"
|
266
|
+
}
|
267
|
+
}
|
268
|
+
],
|
269
|
+
|
270
|
+
"start_new_page_back_img": [
|
271
|
+
{
|
272
|
+
"cmd" : "image",
|
273
|
+
"args" : {
|
274
|
+
"file" : "${back_extra_page_image}"
|
275
|
+
}
|
276
|
+
}
|
277
|
+
],
|
278
|
+
|
279
|
+
"main_section": [
|
280
|
+
{
|
281
|
+
"cmd": "font",
|
282
|
+
"args": {
|
283
|
+
"val": "default"
|
284
|
+
}
|
285
|
+
},
|
286
|
+
{
|
287
|
+
"cmd": "font_size",
|
288
|
+
"args": {
|
289
|
+
"val": "${default_font_size}"
|
290
|
+
}
|
291
|
+
},
|
292
|
+
{
|
293
|
+
"cmd": "elif",
|
294
|
+
"args": {
|
295
|
+
"exp": "${columns} > 1",
|
296
|
+
"func": "main_section_multi",
|
297
|
+
"func_else": "main_section_single"
|
298
|
+
}
|
299
|
+
}
|
300
|
+
],
|
301
|
+
"main_section_single": [
|
302
|
+
{
|
303
|
+
"cmd": "bounding_box",
|
304
|
+
"args": {
|
305
|
+
"func": "main_section_markdown",
|
306
|
+
"at": "[0, ${cursor}]",
|
307
|
+
"width": "${bounds_width}",
|
308
|
+
"height": "${bounds_height}",
|
309
|
+
"margin": "${markdown_margin_array}"
|
310
|
+
}
|
311
|
+
}
|
312
|
+
],
|
313
|
+
"main_section_multi": [
|
314
|
+
{
|
315
|
+
"cmd": "column_box",
|
316
|
+
"args": {
|
317
|
+
"func": "main_section_markdown",
|
318
|
+
"columns": "${columns}",
|
319
|
+
"at": "[0, ${cursor}]",
|
320
|
+
"width": "${bounds_width}",
|
321
|
+
"height": "${bounds_height}",
|
322
|
+
"margin": "${markdown_margin_array}"
|
323
|
+
}
|
324
|
+
}
|
325
|
+
],
|
326
|
+
"main_section_markdown": [
|
327
|
+
{
|
328
|
+
"cmd": "markdown",
|
329
|
+
"args": {
|
330
|
+
"text": "${markdown_content}"
|
331
|
+
}
|
332
|
+
}
|
333
|
+
],
|
334
|
+
"front_cover": [
|
335
|
+
{
|
336
|
+
"cmd": "if",
|
337
|
+
"args": {
|
338
|
+
"exp": "${front_cover}",
|
339
|
+
"func": "front_cover_work"
|
340
|
+
}
|
341
|
+
}
|
342
|
+
],
|
343
|
+
"front_cover_work": [
|
344
|
+
{
|
345
|
+
"cmd": "bounding_box",
|
346
|
+
"args": {
|
347
|
+
"func": "front_cover_title_text",
|
348
|
+
"at": "[25, ${cursor}]",
|
349
|
+
"width": "${bounds_width} - 50",
|
350
|
+
"height": 200
|
351
|
+
}
|
352
|
+
},
|
353
|
+
{
|
354
|
+
"cmd": "bounding_box",
|
355
|
+
"args": {
|
356
|
+
"func": "front_cover_image1",
|
357
|
+
"at": [
|
358
|
+
40,
|
359
|
+
"${cursor} + 10"
|
360
|
+
],
|
361
|
+
"width": "${bounds_width} - 80",
|
362
|
+
"height": "${bounds_width} - 80"
|
363
|
+
}
|
364
|
+
},
|
365
|
+
{
|
366
|
+
"cmd": "bounding_box",
|
367
|
+
"args": {
|
368
|
+
"func": "front_cover_author_text",
|
369
|
+
"at": [
|
370
|
+
50,
|
371
|
+
"${cursor} - 20"
|
372
|
+
],
|
373
|
+
"width": "${bounds_width} - 100",
|
374
|
+
"height": "30"
|
375
|
+
}
|
376
|
+
},
|
377
|
+
{
|
378
|
+
"cmd": "bounding_box",
|
379
|
+
"args": {
|
380
|
+
"func": "front_cover_date_text",
|
381
|
+
"at": [
|
382
|
+
50,
|
383
|
+
"${cursor}"
|
384
|
+
],
|
385
|
+
"width": "${bounds_width} - 100",
|
386
|
+
"height": "30"
|
387
|
+
}
|
388
|
+
},
|
389
|
+
{
|
390
|
+
"cmd": "bounding_box",
|
391
|
+
"args": {
|
392
|
+
"func": "front_cover_publish_text",
|
393
|
+
"at": [
|
394
|
+
0,
|
395
|
+
"${cursor}"
|
396
|
+
],
|
397
|
+
"width": "${bounds_width}",
|
398
|
+
"height": "50"
|
399
|
+
}
|
400
|
+
},
|
401
|
+
{
|
402
|
+
"cmd": "start_new_page"
|
403
|
+
},
|
404
|
+
{
|
405
|
+
"cmd": "set",
|
406
|
+
"args": {
|
407
|
+
"var": "page_start_increment",
|
408
|
+
"val" : "${page_start_increment} + 1"
|
409
|
+
}
|
410
|
+
},
|
411
|
+
{
|
412
|
+
"cmd": "if",
|
413
|
+
"args": {
|
414
|
+
"exp": "${front_extra_page}",
|
415
|
+
"func": "start_new_page_front"
|
416
|
+
}
|
417
|
+
}
|
418
|
+
],
|
419
|
+
"front_cover_title_text": [
|
420
|
+
{
|
421
|
+
"cmd": "font",
|
422
|
+
"args": {
|
423
|
+
"val": "front_title"
|
424
|
+
}
|
425
|
+
},
|
426
|
+
{
|
427
|
+
"cmd": "font_size",
|
428
|
+
"args": {
|
429
|
+
"val": "${front_title_size}"
|
430
|
+
}
|
431
|
+
},
|
432
|
+
{
|
433
|
+
"cmd": "text_box",
|
434
|
+
"args": {
|
435
|
+
"text": "${title}",
|
436
|
+
"align": "center",
|
437
|
+
"valign": "center",
|
438
|
+
"style": "bold"
|
439
|
+
}
|
440
|
+
}
|
441
|
+
],
|
442
|
+
"front_cover_date_text": [
|
443
|
+
{
|
444
|
+
"cmd": "font",
|
445
|
+
"args": {
|
446
|
+
"val": "front_date"
|
447
|
+
}
|
448
|
+
},
|
449
|
+
{
|
450
|
+
"cmd": "font_size",
|
451
|
+
"args": {
|
452
|
+
"val": "${front_date_size}"
|
453
|
+
}
|
454
|
+
},
|
455
|
+
{
|
456
|
+
"cmd": "text_box",
|
457
|
+
"args": {
|
458
|
+
"text": "${front_date_text}",
|
459
|
+
"align": "center",
|
460
|
+
"valign": "center",
|
461
|
+
"style": "bold"
|
462
|
+
}
|
463
|
+
}
|
464
|
+
],
|
465
|
+
"front_cover_publish_text": [
|
466
|
+
{
|
467
|
+
"cmd": "font",
|
468
|
+
"args": {
|
469
|
+
"val": "front_publish"
|
470
|
+
}
|
471
|
+
},
|
472
|
+
{
|
473
|
+
"cmd": "font_size",
|
474
|
+
"args": {
|
475
|
+
"val": "${front_publish_size}"
|
476
|
+
}
|
477
|
+
},
|
478
|
+
{
|
479
|
+
"cmd": "text_box",
|
480
|
+
"args": {
|
481
|
+
"text": "${front_publish_text}",
|
482
|
+
"align": "center",
|
483
|
+
"valign": "center",
|
484
|
+
"style": "bold"
|
485
|
+
}
|
486
|
+
}
|
487
|
+
],
|
488
|
+
"front_cover_image1": [
|
489
|
+
{
|
490
|
+
"cmd": "if",
|
491
|
+
"args": {
|
492
|
+
"exp": "${front_cover_show_image}",
|
493
|
+
"func": "front_cover_image2"
|
494
|
+
}
|
495
|
+
}
|
496
|
+
],
|
497
|
+
"front_cover_image2": [
|
498
|
+
{
|
499
|
+
"cmd": "image",
|
500
|
+
"args": {
|
501
|
+
"file": "${front_cover_image}",
|
502
|
+
"width": "${bounds_width}",
|
503
|
+
"height": "${bounds_width}"
|
504
|
+
}
|
505
|
+
}
|
506
|
+
],
|
507
|
+
"front_cover_author_text": [
|
508
|
+
{
|
509
|
+
"cmd": "font",
|
510
|
+
"args": {
|
511
|
+
"val": "front_author"
|
512
|
+
}
|
513
|
+
},
|
514
|
+
{
|
515
|
+
"cmd": "font_size",
|
516
|
+
"args": {
|
517
|
+
"val": "${front_author_size}"
|
518
|
+
}
|
519
|
+
},
|
520
|
+
{
|
521
|
+
"cmd": "text_box",
|
522
|
+
"args": {
|
523
|
+
"text": "${front_author}",
|
524
|
+
"align": "center"
|
525
|
+
}
|
526
|
+
}
|
527
|
+
],
|
528
|
+
|
529
|
+
|
530
|
+
"back_cover": [
|
531
|
+
{
|
532
|
+
"cmd": "elif",
|
533
|
+
"args": {
|
534
|
+
"exp": "${back_cover}",
|
535
|
+
"func": "back_cover_work",
|
536
|
+
"func_else" : "back_cover_nope"
|
537
|
+
}
|
538
|
+
}
|
539
|
+
],
|
540
|
+
|
541
|
+
"back_cover_nope" : [
|
542
|
+
{
|
543
|
+
"cmd": "call",
|
544
|
+
"args": {
|
545
|
+
"func": "paginator"
|
546
|
+
}
|
547
|
+
}
|
548
|
+
],
|
549
|
+
|
550
|
+
"back_cover_work": [
|
551
|
+
{
|
552
|
+
"cmd": "call",
|
553
|
+
"args" : {
|
554
|
+
"func" : "start_new_page_back"
|
555
|
+
}
|
556
|
+
},
|
557
|
+
{
|
558
|
+
"cmd": "if",
|
559
|
+
"args": {
|
560
|
+
"exp": "${back_extra_page}",
|
561
|
+
"func": "start_new_page_back"
|
562
|
+
}
|
563
|
+
},
|
564
|
+
{
|
565
|
+
"cmd": "bounding_box",
|
566
|
+
"args": {
|
567
|
+
"func": "back_cover_text",
|
568
|
+
"at": [
|
569
|
+
0,
|
570
|
+
"${cursor}"
|
571
|
+
],
|
572
|
+
"width": "${bounds_width}",
|
573
|
+
"height": "275",
|
574
|
+
"margin": "${back_text_margin}"
|
575
|
+
}
|
576
|
+
},
|
577
|
+
{
|
578
|
+
"cmd": "bounding_box",
|
579
|
+
"args": {
|
580
|
+
"func": "back_cover_image1",
|
581
|
+
"at": [
|
582
|
+
"${bounds_width} * 0.5 - 256",
|
583
|
+
"${cursor}+50"
|
584
|
+
],
|
585
|
+
"width": "${bounds_width} - 512",
|
586
|
+
"height": "512"
|
587
|
+
}
|
588
|
+
}
|
589
|
+
],
|
590
|
+
"back_cover_text": [
|
591
|
+
{
|
592
|
+
"cmd": "font",
|
593
|
+
"args": {
|
594
|
+
"val": "back_default"
|
595
|
+
}
|
596
|
+
},
|
597
|
+
{
|
598
|
+
"cmd": "font_size",
|
599
|
+
"args": {
|
600
|
+
"val": "${back_text_size}"
|
601
|
+
}
|
602
|
+
},
|
603
|
+
{
|
604
|
+
"cmd": "markdown",
|
605
|
+
"args": {
|
606
|
+
"text": "${back_text}",
|
607
|
+
"leading" : "${back_text_line_spacing}",
|
608
|
+
"align" : "center"
|
609
|
+
}
|
610
|
+
}
|
611
|
+
],
|
612
|
+
"back_cover_image1": [
|
613
|
+
{
|
614
|
+
"cmd": "if",
|
615
|
+
"args": {
|
616
|
+
"exp": "${back_cover_show_image}",
|
617
|
+
"func": "back_cover_image2"
|
618
|
+
}
|
619
|
+
}
|
620
|
+
],
|
621
|
+
"back_cover_image2": [
|
622
|
+
{
|
623
|
+
"cmd": "image",
|
624
|
+
"args": {
|
625
|
+
"file": "${back_cover_image}",
|
626
|
+
"width": "512",
|
627
|
+
"height": "512"
|
628
|
+
}
|
629
|
+
}
|
630
|
+
],
|
631
|
+
"back_cover_author": [
|
632
|
+
{
|
633
|
+
"cmd": "font",
|
634
|
+
"args": {
|
635
|
+
"val": "back_author"
|
636
|
+
}
|
637
|
+
},
|
638
|
+
{
|
639
|
+
"cmd": "font_size",
|
640
|
+
"args": {
|
641
|
+
"val": "${back_author_size}"
|
642
|
+
}
|
643
|
+
},
|
644
|
+
{
|
645
|
+
"cmd": "text_box",
|
646
|
+
"args": {
|
647
|
+
"text": "${back_author}",
|
648
|
+
"align" : "center"
|
649
|
+
}
|
650
|
+
}
|
651
|
+
],
|
652
|
+
"back_cover_publish": [
|
653
|
+
{
|
654
|
+
"cmd": "font",
|
655
|
+
"args": {
|
656
|
+
"val": "back_publish"
|
657
|
+
}
|
658
|
+
},
|
659
|
+
{
|
660
|
+
"cmd": "font_size",
|
661
|
+
"args": {
|
662
|
+
"val": "${back_publish_size}"
|
663
|
+
}
|
664
|
+
},
|
665
|
+
{
|
666
|
+
"cmd": "text_box",
|
667
|
+
"args": {
|
668
|
+
"text": "${back_publish_text}",
|
669
|
+
"align" : "center"
|
670
|
+
}
|
671
|
+
}
|
672
|
+
],
|
673
|
+
|
674
|
+
"paginator": [
|
675
|
+
{
|
676
|
+
"cmd": "if",
|
677
|
+
"args": {
|
678
|
+
"exp" : "${paginator}",
|
679
|
+
"func": "paginator_work"
|
680
|
+
}
|
681
|
+
}
|
682
|
+
],
|
683
|
+
|
684
|
+
"paginator_work" : [
|
685
|
+
{
|
686
|
+
"cmd": "font",
|
687
|
+
"args": {
|
688
|
+
"val": "paginator"
|
689
|
+
}
|
690
|
+
},
|
691
|
+
{
|
692
|
+
"cmd": "font_size",
|
693
|
+
"args": {
|
694
|
+
"val": "${paginator_size}"
|
695
|
+
}
|
696
|
+
},
|
697
|
+
{
|
698
|
+
"cmd": "bounding_box",
|
699
|
+
"args": {
|
700
|
+
"func": "number_my_pages",
|
701
|
+
"at": [
|
702
|
+
"0",
|
703
|
+
"50"
|
704
|
+
],
|
705
|
+
"width": "${bounds_width}",
|
706
|
+
"height": "40"
|
707
|
+
}
|
708
|
+
}
|
709
|
+
],
|
710
|
+
|
711
|
+
"number_my_pages" : [
|
712
|
+
{
|
713
|
+
"cmd": "number_pages",
|
714
|
+
"args": {
|
715
|
+
"text" : "${title}: <page>",
|
716
|
+
"page_mode" : "${page_mode}",
|
717
|
+
"start_count_at" : "1",
|
718
|
+
"page_start" : "${page_start_increment}",
|
719
|
+
"page_finish" : "${pages} - ${page_end_increment} + 1",
|
720
|
+
"odd_at" : ["0","-10+${paginator_y}"],
|
721
|
+
"even_at" : ["0", "-10+${paginator_y}"],
|
722
|
+
"odd_align" : "${paginator_odd_align}",
|
723
|
+
"even_align" : "${paginator_even_align}",
|
724
|
+
"width" : "${bounds_width}",
|
725
|
+
"height" : "${bounds_height}"
|
726
|
+
}
|
727
|
+
}
|
728
|
+
],
|
729
|
+
|
730
|
+
"alternate_output" : [
|
731
|
+
{
|
732
|
+
"cmd" : "alternate_pages"
|
733
|
+
}
|
734
|
+
],
|
735
|
+
|
736
|
+
"set_alternate_output" : [
|
737
|
+
{
|
738
|
+
"cmd" : "set_alternate_pages",
|
739
|
+
"args" : {
|
740
|
+
"val" : true
|
741
|
+
}
|
742
|
+
}
|
743
|
+
],
|
744
|
+
|
745
|
+
"main": [
|
746
|
+
{
|
747
|
+
"cmd" : "if",
|
748
|
+
"args" : {
|
749
|
+
"exp" : "${alternates_pages}",
|
750
|
+
"func" : "set_alternate_output"
|
751
|
+
}
|
752
|
+
},
|
753
|
+
{
|
754
|
+
"cmd": "set",
|
755
|
+
"args": {
|
756
|
+
"var": "page_start_increment",
|
757
|
+
"val" : "0"
|
758
|
+
}
|
759
|
+
},
|
760
|
+
{
|
761
|
+
"cmd": "set",
|
762
|
+
"args": {
|
763
|
+
"var": "page_end_increment",
|
764
|
+
"val" : "0"
|
765
|
+
}
|
766
|
+
},
|
767
|
+
{
|
768
|
+
"cmd": "read_markdown",
|
769
|
+
"args": {
|
770
|
+
"file": "${filename}"
|
771
|
+
}
|
772
|
+
},
|
773
|
+
{
|
774
|
+
"cmd": "call",
|
775
|
+
"args": {
|
776
|
+
"func": "front_cover"
|
777
|
+
}
|
778
|
+
},
|
779
|
+
{
|
780
|
+
"cmd": "call",
|
781
|
+
"args": {
|
782
|
+
"func": "main_section"
|
783
|
+
}
|
784
|
+
},
|
785
|
+
{
|
786
|
+
"cmd": "call",
|
787
|
+
"args": {
|
788
|
+
"func": "back_cover"
|
789
|
+
}
|
790
|
+
},
|
791
|
+
{
|
792
|
+
"cmd": "call",
|
793
|
+
"args": {
|
794
|
+
"func": "paginator"
|
795
|
+
}
|
796
|
+
},
|
797
|
+
{
|
798
|
+
"cmd" : "if",
|
799
|
+
"args" : {
|
800
|
+
"exp" : "${alternates_pages}",
|
801
|
+
"func" : "alternate_output"
|
802
|
+
}
|
803
|
+
}
|
804
|
+
]
|
805
|
+
}
|
806
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: petit-felix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PunishedFelix
|
@@ -35,14 +35,14 @@ dependencies:
|
|
35
35
|
requirements:
|
36
36
|
- - "~>"
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 0.1.
|
38
|
+
version: 0.1.16
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
43
|
- - "~>"
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.1.
|
45
|
+
version: 0.1.16
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: eqn
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- lib/worker/templater/font.rb
|
107
107
|
- lib/worker/templater/methods.rb
|
108
108
|
- lib/worker/templater/validation.rb
|
109
|
+
- templates/zine-single-custom.json
|
109
110
|
- templates/zine-single.json
|
110
111
|
homepage: https://github.com/badgernested/petit-felix
|
111
112
|
licenses:
|