pptx 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +57 -0
- data/lib/pptx.rb +24 -0
- data/lib/pptx/base.pptx/[Content_Types].xml +30 -0
- data/lib/pptx/base.pptx/docProps/app.xml +41 -0
- data/lib/pptx/base.pptx/docProps/core.xml +13 -0
- data/lib/pptx/base.pptx/docProps/thumbnail.jpeg +0 -0
- data/lib/pptx/base.pptx/ppt/_rels/presentation.xml.rels +9 -0
- data/lib/pptx/base.pptx/ppt/presProps.xml +11 -0
- data/lib/pptx/base.pptx/ppt/presentation.xml +105 -0
- data/lib/pptx/base.pptx/ppt/printerSettings/printerSettings1.bin +0 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout1.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout10.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout11.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout2.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout3.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout4.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout5.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout6.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout7.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout8.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/_rels/slideLayout9.xml.rels +4 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout1.xml +240 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout10.xml +168 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout11.xml +178 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout2.xml +168 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout3.xml +244 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout4.xml +286 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout5.xml +420 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout6.xml +116 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout7.xml +93 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout8.xml +275 -0
- data/lib/pptx/base.pptx/ppt/slideLayouts/slideLayout9.xml +251 -0
- data/lib/pptx/base.pptx/ppt/slideMasters/_rels/slideMaster1.xml.rels +15 -0
- data/lib/pptx/base.pptx/ppt/slideMasters/slideMaster1.xml +508 -0
- data/lib/pptx/base.pptx/ppt/tableStyles.xml +2 -0
- data/lib/pptx/base.pptx/ppt/theme/theme1.xml +318 -0
- data/lib/pptx/base.pptx/ppt/viewProps.xml +32 -0
- data/lib/pptx/generate_sample.rb +57 -0
- data/lib/pptx/opc.rb +14 -0
- data/lib/pptx/opc/base_part.rb +36 -0
- data/lib/pptx/opc/binary_part.rb +20 -0
- data/lib/pptx/opc/content_types.rb +18 -0
- data/lib/pptx/opc/file_part.rb +28 -0
- data/lib/pptx/opc/package.rb +115 -0
- data/lib/pptx/opc/package_streamer.rb +48 -0
- data/lib/pptx/opc/part.rb +27 -0
- data/lib/pptx/opc/relationships.rb +32 -0
- data/lib/pptx/opc/s3_object_part.rb +25 -0
- data/lib/pptx/presentation.rb +33 -0
- data/lib/pptx/shapes.rb +10 -0
- data/lib/pptx/shapes/filled_rectangle.rb +32 -0
- data/lib/pptx/shapes/picture.rb +40 -0
- data/lib/pptx/shapes/shape.rb +46 -0
- data/lib/pptx/shapes/slide_number.rb +39 -0
- data/lib/pptx/shapes/textbox.rb +95 -0
- data/lib/pptx/slide.rb +79 -0
- data/lib/pptx/version.rb +3 -0
- metadata +156 -0
@@ -0,0 +1,318 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<a:theme name="Office Theme" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
|
3
|
+
<a:themeElements>
|
4
|
+
<a:clrScheme name="Office">
|
5
|
+
<a:dk1>
|
6
|
+
<a:sysClr lastClr="000000" val="windowText"/>
|
7
|
+
</a:dk1>
|
8
|
+
<a:lt1>
|
9
|
+
<a:sysClr lastClr="FFFFFF" val="window"/>
|
10
|
+
</a:lt1>
|
11
|
+
<a:dk2>
|
12
|
+
<a:srgbClr val="1F497D"/>
|
13
|
+
</a:dk2>
|
14
|
+
<a:lt2>
|
15
|
+
<a:srgbClr val="EEECE1"/>
|
16
|
+
</a:lt2>
|
17
|
+
<a:accent1>
|
18
|
+
<a:srgbClr val="4F81BD"/>
|
19
|
+
</a:accent1>
|
20
|
+
<a:accent2>
|
21
|
+
<a:srgbClr val="C0504D"/>
|
22
|
+
</a:accent2>
|
23
|
+
<a:accent3>
|
24
|
+
<a:srgbClr val="9BBB59"/>
|
25
|
+
</a:accent3>
|
26
|
+
<a:accent4>
|
27
|
+
<a:srgbClr val="8064A2"/>
|
28
|
+
</a:accent4>
|
29
|
+
<a:accent5>
|
30
|
+
<a:srgbClr val="4BACC6"/>
|
31
|
+
</a:accent5>
|
32
|
+
<a:accent6>
|
33
|
+
<a:srgbClr val="F79646"/>
|
34
|
+
</a:accent6>
|
35
|
+
<a:hlink>
|
36
|
+
<a:srgbClr val="0000FF"/>
|
37
|
+
</a:hlink>
|
38
|
+
<a:folHlink>
|
39
|
+
<a:srgbClr val="800080"/>
|
40
|
+
</a:folHlink>
|
41
|
+
</a:clrScheme>
|
42
|
+
<a:fontScheme name="Office">
|
43
|
+
<a:majorFont>
|
44
|
+
<a:latin typeface="Calibri"/>
|
45
|
+
<a:ea typeface=""/>
|
46
|
+
<a:cs typeface=""/>
|
47
|
+
<a:font script="Jpan" typeface="MS Pゴシック"/>
|
48
|
+
<a:font script="Hang" typeface="맑은 고딕"/>
|
49
|
+
<a:font script="Hans" typeface="宋体"/>
|
50
|
+
<a:font script="Hant" typeface="新細明體"/>
|
51
|
+
<a:font script="Arab" typeface="Times New Roman"/>
|
52
|
+
<a:font script="Hebr" typeface="Times New Roman"/>
|
53
|
+
<a:font script="Thai" typeface="Angsana New"/>
|
54
|
+
<a:font script="Ethi" typeface="Nyala"/>
|
55
|
+
<a:font script="Beng" typeface="Vrinda"/>
|
56
|
+
<a:font script="Gujr" typeface="Shruti"/>
|
57
|
+
<a:font script="Khmr" typeface="MoolBoran"/>
|
58
|
+
<a:font script="Knda" typeface="Tunga"/>
|
59
|
+
<a:font script="Guru" typeface="Raavi"/>
|
60
|
+
<a:font script="Cans" typeface="Euphemia"/>
|
61
|
+
<a:font script="Cher" typeface="Plantagenet Cherokee"/>
|
62
|
+
<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
|
63
|
+
<a:font script="Tibt" typeface="Microsoft Himalaya"/>
|
64
|
+
<a:font script="Thaa" typeface="MV Boli"/>
|
65
|
+
<a:font script="Deva" typeface="Mangal"/>
|
66
|
+
<a:font script="Telu" typeface="Gautami"/>
|
67
|
+
<a:font script="Taml" typeface="Latha"/>
|
68
|
+
<a:font script="Syrc" typeface="Estrangelo Edessa"/>
|
69
|
+
<a:font script="Orya" typeface="Kalinga"/>
|
70
|
+
<a:font script="Mlym" typeface="Kartika"/>
|
71
|
+
<a:font script="Laoo" typeface="DokChampa"/>
|
72
|
+
<a:font script="Sinh" typeface="Iskoola Pota"/>
|
73
|
+
<a:font script="Mong" typeface="Mongolian Baiti"/>
|
74
|
+
<a:font script="Viet" typeface="Times New Roman"/>
|
75
|
+
<a:font script="Uigh" typeface="Microsoft Uighur"/>
|
76
|
+
<a:font script="Geor" typeface="Sylfaen"/>
|
77
|
+
</a:majorFont>
|
78
|
+
<a:minorFont>
|
79
|
+
<a:latin typeface="Calibri"/>
|
80
|
+
<a:ea typeface=""/>
|
81
|
+
<a:cs typeface=""/>
|
82
|
+
<a:font script="Jpan" typeface="MS Pゴシック"/>
|
83
|
+
<a:font script="Hang" typeface="맑은 고딕"/>
|
84
|
+
<a:font script="Hans" typeface="宋体"/>
|
85
|
+
<a:font script="Hant" typeface="新細明體"/>
|
86
|
+
<a:font script="Arab" typeface="Arial"/>
|
87
|
+
<a:font script="Hebr" typeface="Arial"/>
|
88
|
+
<a:font script="Thai" typeface="Cordia New"/>
|
89
|
+
<a:font script="Ethi" typeface="Nyala"/>
|
90
|
+
<a:font script="Beng" typeface="Vrinda"/>
|
91
|
+
<a:font script="Gujr" typeface="Shruti"/>
|
92
|
+
<a:font script="Khmr" typeface="DaunPenh"/>
|
93
|
+
<a:font script="Knda" typeface="Tunga"/>
|
94
|
+
<a:font script="Guru" typeface="Raavi"/>
|
95
|
+
<a:font script="Cans" typeface="Euphemia"/>
|
96
|
+
<a:font script="Cher" typeface="Plantagenet Cherokee"/>
|
97
|
+
<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
|
98
|
+
<a:font script="Tibt" typeface="Microsoft Himalaya"/>
|
99
|
+
<a:font script="Thaa" typeface="MV Boli"/>
|
100
|
+
<a:font script="Deva" typeface="Mangal"/>
|
101
|
+
<a:font script="Telu" typeface="Gautami"/>
|
102
|
+
<a:font script="Taml" typeface="Latha"/>
|
103
|
+
<a:font script="Syrc" typeface="Estrangelo Edessa"/>
|
104
|
+
<a:font script="Orya" typeface="Kalinga"/>
|
105
|
+
<a:font script="Mlym" typeface="Kartika"/>
|
106
|
+
<a:font script="Laoo" typeface="DokChampa"/>
|
107
|
+
<a:font script="Sinh" typeface="Iskoola Pota"/>
|
108
|
+
<a:font script="Mong" typeface="Mongolian Baiti"/>
|
109
|
+
<a:font script="Viet" typeface="Arial"/>
|
110
|
+
<a:font script="Uigh" typeface="Microsoft Uighur"/>
|
111
|
+
<a:font script="Geor" typeface="Sylfaen"/>
|
112
|
+
</a:minorFont>
|
113
|
+
</a:fontScheme>
|
114
|
+
<a:fmtScheme name="Office">
|
115
|
+
<a:fillStyleLst>
|
116
|
+
<a:solidFill>
|
117
|
+
<a:schemeClr val="phClr"/>
|
118
|
+
</a:solidFill>
|
119
|
+
<a:gradFill rotWithShape="1">
|
120
|
+
<a:gsLst>
|
121
|
+
<a:gs pos="0">
|
122
|
+
<a:schemeClr val="phClr">
|
123
|
+
<a:tint val="50000"/>
|
124
|
+
<a:satMod val="300000"/>
|
125
|
+
</a:schemeClr>
|
126
|
+
</a:gs>
|
127
|
+
<a:gs pos="35000">
|
128
|
+
<a:schemeClr val="phClr">
|
129
|
+
<a:tint val="37000"/>
|
130
|
+
<a:satMod val="300000"/>
|
131
|
+
</a:schemeClr>
|
132
|
+
</a:gs>
|
133
|
+
<a:gs pos="100000">
|
134
|
+
<a:schemeClr val="phClr">
|
135
|
+
<a:tint val="15000"/>
|
136
|
+
<a:satMod val="350000"/>
|
137
|
+
</a:schemeClr>
|
138
|
+
</a:gs>
|
139
|
+
</a:gsLst>
|
140
|
+
<a:lin ang="16200000" scaled="1"/>
|
141
|
+
</a:gradFill>
|
142
|
+
<a:gradFill rotWithShape="1">
|
143
|
+
<a:gsLst>
|
144
|
+
<a:gs pos="0">
|
145
|
+
<a:schemeClr val="phClr">
|
146
|
+
<a:tint val="100000"/>
|
147
|
+
<a:shade val="100000"/>
|
148
|
+
<a:satMod val="130000"/>
|
149
|
+
</a:schemeClr>
|
150
|
+
</a:gs>
|
151
|
+
<a:gs pos="100000">
|
152
|
+
<a:schemeClr val="phClr">
|
153
|
+
<a:tint val="50000"/>
|
154
|
+
<a:shade val="100000"/>
|
155
|
+
<a:satMod val="350000"/>
|
156
|
+
</a:schemeClr>
|
157
|
+
</a:gs>
|
158
|
+
</a:gsLst>
|
159
|
+
<a:lin ang="16200000" scaled="0"/>
|
160
|
+
</a:gradFill>
|
161
|
+
</a:fillStyleLst>
|
162
|
+
<a:lnStyleLst>
|
163
|
+
<a:ln algn="ctr" cap="flat" cmpd="sng" w="9525">
|
164
|
+
<a:solidFill>
|
165
|
+
<a:schemeClr val="phClr">
|
166
|
+
<a:shade val="95000"/>
|
167
|
+
<a:satMod val="105000"/>
|
168
|
+
</a:schemeClr>
|
169
|
+
</a:solidFill>
|
170
|
+
<a:prstDash val="solid"/>
|
171
|
+
</a:ln>
|
172
|
+
<a:ln algn="ctr" cap="flat" cmpd="sng" w="25400">
|
173
|
+
<a:solidFill>
|
174
|
+
<a:schemeClr val="phClr"/>
|
175
|
+
</a:solidFill>
|
176
|
+
<a:prstDash val="solid"/>
|
177
|
+
</a:ln>
|
178
|
+
<a:ln algn="ctr" cap="flat" cmpd="sng" w="38100">
|
179
|
+
<a:solidFill>
|
180
|
+
<a:schemeClr val="phClr"/>
|
181
|
+
</a:solidFill>
|
182
|
+
<a:prstDash val="solid"/>
|
183
|
+
</a:ln>
|
184
|
+
</a:lnStyleLst>
|
185
|
+
<a:effectStyleLst>
|
186
|
+
<a:effectStyle>
|
187
|
+
<a:effectLst>
|
188
|
+
<a:outerShdw blurRad="40000" dir="5400000" dist="20000" rotWithShape="0">
|
189
|
+
<a:srgbClr val="000000">
|
190
|
+
<a:alpha val="38000"/>
|
191
|
+
</a:srgbClr>
|
192
|
+
</a:outerShdw>
|
193
|
+
</a:effectLst>
|
194
|
+
</a:effectStyle>
|
195
|
+
<a:effectStyle>
|
196
|
+
<a:effectLst>
|
197
|
+
<a:outerShdw blurRad="40000" dir="5400000" dist="23000" rotWithShape="0">
|
198
|
+
<a:srgbClr val="000000">
|
199
|
+
<a:alpha val="35000"/>
|
200
|
+
</a:srgbClr>
|
201
|
+
</a:outerShdw>
|
202
|
+
</a:effectLst>
|
203
|
+
</a:effectStyle>
|
204
|
+
<a:effectStyle>
|
205
|
+
<a:effectLst>
|
206
|
+
<a:outerShdw blurRad="40000" dir="5400000" dist="23000" rotWithShape="0">
|
207
|
+
<a:srgbClr val="000000">
|
208
|
+
<a:alpha val="35000"/>
|
209
|
+
</a:srgbClr>
|
210
|
+
</a:outerShdw>
|
211
|
+
</a:effectLst>
|
212
|
+
<a:scene3d>
|
213
|
+
<a:camera prst="orthographicFront">
|
214
|
+
<a:rot lat="0" lon="0" rev="0"/>
|
215
|
+
</a:camera>
|
216
|
+
<a:lightRig dir="t" rig="threePt">
|
217
|
+
<a:rot lat="0" lon="0" rev="1200000"/>
|
218
|
+
</a:lightRig>
|
219
|
+
</a:scene3d>
|
220
|
+
<a:sp3d>
|
221
|
+
<a:bevelT h="25400" w="63500"/>
|
222
|
+
</a:sp3d>
|
223
|
+
</a:effectStyle>
|
224
|
+
</a:effectStyleLst>
|
225
|
+
<a:bgFillStyleLst>
|
226
|
+
<a:solidFill>
|
227
|
+
<a:schemeClr val="phClr"/>
|
228
|
+
</a:solidFill>
|
229
|
+
<a:gradFill rotWithShape="1">
|
230
|
+
<a:gsLst>
|
231
|
+
<a:gs pos="0">
|
232
|
+
<a:schemeClr val="phClr">
|
233
|
+
<a:tint val="40000"/>
|
234
|
+
<a:satMod val="350000"/>
|
235
|
+
</a:schemeClr>
|
236
|
+
</a:gs>
|
237
|
+
<a:gs pos="40000">
|
238
|
+
<a:schemeClr val="phClr">
|
239
|
+
<a:tint val="45000"/>
|
240
|
+
<a:shade val="99000"/>
|
241
|
+
<a:satMod val="350000"/>
|
242
|
+
</a:schemeClr>
|
243
|
+
</a:gs>
|
244
|
+
<a:gs pos="100000">
|
245
|
+
<a:schemeClr val="phClr">
|
246
|
+
<a:shade val="20000"/>
|
247
|
+
<a:satMod val="255000"/>
|
248
|
+
</a:schemeClr>
|
249
|
+
</a:gs>
|
250
|
+
</a:gsLst>
|
251
|
+
<a:path path="circle">
|
252
|
+
<a:fillToRect b="180000" l="50000" r="50000" t="-80000"/>
|
253
|
+
</a:path>
|
254
|
+
</a:gradFill>
|
255
|
+
<a:gradFill rotWithShape="1">
|
256
|
+
<a:gsLst>
|
257
|
+
<a:gs pos="0">
|
258
|
+
<a:schemeClr val="phClr">
|
259
|
+
<a:tint val="80000"/>
|
260
|
+
<a:satMod val="300000"/>
|
261
|
+
</a:schemeClr>
|
262
|
+
</a:gs>
|
263
|
+
<a:gs pos="100000">
|
264
|
+
<a:schemeClr val="phClr">
|
265
|
+
<a:shade val="30000"/>
|
266
|
+
<a:satMod val="200000"/>
|
267
|
+
</a:schemeClr>
|
268
|
+
</a:gs>
|
269
|
+
</a:gsLst>
|
270
|
+
<a:path path="circle">
|
271
|
+
<a:fillToRect b="50000" l="50000" r="50000" t="50000"/>
|
272
|
+
</a:path>
|
273
|
+
</a:gradFill>
|
274
|
+
</a:bgFillStyleLst>
|
275
|
+
</a:fmtScheme>
|
276
|
+
</a:themeElements>
|
277
|
+
<a:objectDefaults>
|
278
|
+
<a:spDef>
|
279
|
+
<a:spPr/>
|
280
|
+
<a:bodyPr/>
|
281
|
+
<a:lstStyle/>
|
282
|
+
<a:style>
|
283
|
+
<a:lnRef idx="1">
|
284
|
+
<a:schemeClr val="accent1"/>
|
285
|
+
</a:lnRef>
|
286
|
+
<a:fillRef idx="3">
|
287
|
+
<a:schemeClr val="accent1"/>
|
288
|
+
</a:fillRef>
|
289
|
+
<a:effectRef idx="2">
|
290
|
+
<a:schemeClr val="accent1"/>
|
291
|
+
</a:effectRef>
|
292
|
+
<a:fontRef idx="minor">
|
293
|
+
<a:schemeClr val="lt1"/>
|
294
|
+
</a:fontRef>
|
295
|
+
</a:style>
|
296
|
+
</a:spDef>
|
297
|
+
<a:lnDef>
|
298
|
+
<a:spPr/>
|
299
|
+
<a:bodyPr/>
|
300
|
+
<a:lstStyle/>
|
301
|
+
<a:style>
|
302
|
+
<a:lnRef idx="2">
|
303
|
+
<a:schemeClr val="accent1"/>
|
304
|
+
</a:lnRef>
|
305
|
+
<a:fillRef idx="0">
|
306
|
+
<a:schemeClr val="accent1"/>
|
307
|
+
</a:fillRef>
|
308
|
+
<a:effectRef idx="1">
|
309
|
+
<a:schemeClr val="accent1"/>
|
310
|
+
</a:effectRef>
|
311
|
+
<a:fontRef idx="minor">
|
312
|
+
<a:schemeClr val="tx1"/>
|
313
|
+
</a:fontRef>
|
314
|
+
</a:style>
|
315
|
+
</a:lnDef>
|
316
|
+
</a:objectDefaults>
|
317
|
+
<a:extraClrSchemeLst/>
|
318
|
+
</a:theme>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<p:viewPr lastView="sldThumbnailView" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
|
3
|
+
<p:normalViewPr>
|
4
|
+
<p:restoredLeft sz="15620"/>
|
5
|
+
<p:restoredTop sz="94660"/>
|
6
|
+
</p:normalViewPr>
|
7
|
+
<p:slideViewPr>
|
8
|
+
<p:cSldViewPr snapToGrid="0" snapToObjects="1">
|
9
|
+
<p:cViewPr varScale="1">
|
10
|
+
<p:scale>
|
11
|
+
<a:sx d="100" n="124"/>
|
12
|
+
<a:sy d="100" n="124"/>
|
13
|
+
</p:scale>
|
14
|
+
<p:origin x="-1512" y="-112"/>
|
15
|
+
</p:cViewPr>
|
16
|
+
<p:guideLst>
|
17
|
+
<p:guide orient="horz" pos="2160"/>
|
18
|
+
<p:guide pos="2880"/>
|
19
|
+
</p:guideLst>
|
20
|
+
</p:cSldViewPr>
|
21
|
+
</p:slideViewPr>
|
22
|
+
<p:notesTextViewPr>
|
23
|
+
<p:cViewPr>
|
24
|
+
<p:scale>
|
25
|
+
<a:sx d="100" n="100"/>
|
26
|
+
<a:sy d="100" n="100"/>
|
27
|
+
</p:scale>
|
28
|
+
<p:origin x="0" y="0"/>
|
29
|
+
</p:cViewPr>
|
30
|
+
</p:notesTextViewPr>
|
31
|
+
<p:gridSpacing cx="76200" cy="76200"/>
|
32
|
+
</p:viewPr>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
|
3
|
+
# Bundler setup instead of require and doing manual requires significantly speeds up startup
|
4
|
+
# as not the whole project's dependencies are loaded.
|
5
|
+
Bundler.setup(:default, 'development')
|
6
|
+
|
7
|
+
require_relative '../pptx'
|
8
|
+
|
9
|
+
|
10
|
+
def main
|
11
|
+
pkg = PPTX::OPC::Package.new
|
12
|
+
slide = PPTX::Slide.new(pkg)
|
13
|
+
|
14
|
+
# slide size: 25.4cm x 19.05
|
15
|
+
|
16
|
+
title_dimensions = PPTX::cm(2, 1, 22, 2)
|
17
|
+
date_dimensions = PPTX::cm(2, 2.8, 5, 2)
|
18
|
+
text_dimensions = PPTX::cm(14, 6, 10, 10)
|
19
|
+
image_dimensions = PPTX::cm(2, 5, 10, 10)
|
20
|
+
|
21
|
+
slide.add_textbox title_dimensions, 'Title :)', sz: 45*PPTX::POINT
|
22
|
+
slide.add_textbox date_dimensions, '18 Feb 2015'
|
23
|
+
slide.add_textbox text_dimensions,
|
24
|
+
"Text box text with long text that should be broken " +
|
25
|
+
"down into multiple lines.\n:)\nwith<stuff>&to<be>escaped\nYay!"
|
26
|
+
|
27
|
+
image = PPTX::OPC::FilePart.new(pkg, 'spec/fixtures/test_picture.png')
|
28
|
+
slide.add_picture image_dimensions, 'photo.jpg', image
|
29
|
+
slide.add_filled_rectangle(PPTX::cm(24.9, 0, 0.5, 19.05), '558ed5')
|
30
|
+
slide.add_slide_number(PPTX::cm(23.4, 17.5, 1, 0.8), 1, sz: 12*PPTX::POINT,
|
31
|
+
color: '4d4d4d',
|
32
|
+
align: 'r')
|
33
|
+
|
34
|
+
pkg.presentation.add_slide(slide)
|
35
|
+
|
36
|
+
slide2 = PPTX::Slide.new(pkg)
|
37
|
+
slide2.add_textbox title_dimensions,
|
38
|
+
'Very long title that should be broken up into multiple' +
|
39
|
+
'lines and possibly clipped', sz: 45*PPTX::POINT
|
40
|
+
slide2.add_textbox date_dimensions, '17 Feb 2015'
|
41
|
+
slide2.add_textbox text_dimensions,
|
42
|
+
"Text box text with long text that should be broken " +
|
43
|
+
"up into multiple lines and should overflow overflow" +
|
44
|
+
" overflowoverflowoverflowoverflowoverflowoverflow" +
|
45
|
+
" overflow overflow overflow overflow overflow overflow" +
|
46
|
+
" overflow overflow overflow overflow overflow overflow" +
|
47
|
+
" overflow overflow overflow overflow overflow overflow" +
|
48
|
+
" overflow overflow overflow overflow overflow overflow" +
|
49
|
+
" overflow overflow overflow overflow overflow overflow" +
|
50
|
+
" overflow overflow overflow overflow overflow overflow" +
|
51
|
+
" overflow overflow overflow overflow overflow overflow"
|
52
|
+
pkg.presentation.add_slide(slide2)
|
53
|
+
|
54
|
+
File.open('tmp/generated.pptx', 'wb') {|f| f.write(pkg.to_zip) }
|
55
|
+
end
|
56
|
+
|
57
|
+
main
|
data/lib/pptx/opc.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module PPTX
|
2
|
+
module OPC
|
3
|
+
end
|
4
|
+
end
|
5
|
+
|
6
|
+
require_relative 'opc/package'
|
7
|
+
require_relative 'opc/package_streamer'
|
8
|
+
require_relative 'opc/base_part'
|
9
|
+
require_relative 'opc/part'
|
10
|
+
require_relative 'opc/binary_part'
|
11
|
+
require_relative 'opc/file_part'
|
12
|
+
require_relative 'opc/s3_object_part'
|
13
|
+
require_relative 'opc/content_types'
|
14
|
+
require_relative 'opc/relationships'
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module PPTX
|
2
|
+
module OPC
|
3
|
+
# A part without relationships.
|
4
|
+
class BasePart
|
5
|
+
def initialize(package, part_name)
|
6
|
+
@package = package
|
7
|
+
@part_name = part_name
|
8
|
+
package.set_part(part_name, self, content_type)
|
9
|
+
end
|
10
|
+
|
11
|
+
def base_xml
|
12
|
+
nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def content_type
|
16
|
+
nil
|
17
|
+
end
|
18
|
+
|
19
|
+
def doc
|
20
|
+
@doc ||= Nokogiri::XML(template || base_xml)
|
21
|
+
end
|
22
|
+
|
23
|
+
def marshal
|
24
|
+
doc.to_s
|
25
|
+
end
|
26
|
+
|
27
|
+
def part_name
|
28
|
+
@part_name
|
29
|
+
end
|
30
|
+
|
31
|
+
def template
|
32
|
+
@package.template_part(@part_name)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|