powerpoint-pro 2.1.0.1
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 +7 -0
- data/.codeclimate.yml +9 -0
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +83 -0
- data/Rakefile +7 -0
- data/lib/powerpoint/compression.rb +25 -0
- data/lib/powerpoint/presentation.rb +118 -0
- data/lib/powerpoint/slide/collage.rb +47 -0
- data/lib/powerpoint/slide/comment.rb +39 -0
- data/lib/powerpoint/slide/concept.rb +48 -0
- data/lib/powerpoint/slide/custom.rb +50 -0
- data/lib/powerpoint/slide/dashboard.rb +45 -0
- data/lib/powerpoint/slide/dashboard_user.rb +40 -0
- data/lib/powerpoint/slide/extended_intro.rb +38 -0
- data/lib/powerpoint/slide/gallery.rb +42 -0
- data/lib/powerpoint/slide/intro.rb +36 -0
- data/lib/powerpoint/slide/multiple_image.rb +42 -0
- data/lib/powerpoint/slide/pictorial.rb +54 -0
- data/lib/powerpoint/slide/picture_description.rb +63 -0
- data/lib/powerpoint/slide/text_picture_split.rb +56 -0
- data/lib/powerpoint/slide/textual.rb +32 -0
- data/lib/powerpoint/util.rb +39 -0
- data/lib/powerpoint/version.rb +3 -0
- data/lib/powerpoint/views/app.xml.erb +51 -0
- data/lib/powerpoint/views/collage.xml.erb +211 -0
- data/lib/powerpoint/views/collage_rel.xml.erb +9 -0
- data/lib/powerpoint/views/comment.xml.erb +257 -0
- data/lib/powerpoint/views/comment_rel.xml.erb +6 -0
- data/lib/powerpoint/views/concept.xml.erb +271 -0
- data/lib/powerpoint/views/concept_rel.xml.erb +9 -0
- data/lib/powerpoint/views/content_type.xml.erb +31 -0
- data/lib/powerpoint/views/custom.xml.erb +174 -0
- data/lib/powerpoint/views/custom_rel.xml.erb +9 -0
- data/lib/powerpoint/views/dashboard.xml.erb +976 -0
- data/lib/powerpoint/views/dashboard_rel.xml.erb +9 -0
- data/lib/powerpoint/views/dashboard_user.xml.erb +221 -0
- data/lib/powerpoint/views/dashboard_user_rel.xml.erb +8 -0
- data/lib/powerpoint/views/extended_intro_slide.xml.erb +225 -0
- data/lib/powerpoint/views/extended_intro_slide_rel.xml.erb +3 -0
- data/lib/powerpoint/views/gallery.xml.erb +340 -0
- data/lib/powerpoint/views/gallery_rel.xml.erb +9 -0
- data/lib/powerpoint/views/intro_slide.xml.erb +74 -0
- data/lib/powerpoint/views/multiple_image.xml.erb +319 -0
- data/lib/powerpoint/views/multiple_image_rel.xml.erb +9 -0
- data/lib/powerpoint/views/pictorial_rel.xml.erb +5 -0
- data/lib/powerpoint/views/pictorial_slide.xml.erb +87 -0
- data/lib/powerpoint/views/picture_description_rels.xml.erb +5 -0
- data/lib/powerpoint/views/picture_description_slide.xml.erb +115 -0
- data/lib/powerpoint/views/presentation.xml.erb +124 -0
- data/lib/powerpoint/views/presentation.xml.rel.erb +11 -0
- data/lib/powerpoint/views/text_picture_split_rel.xml.erb +5 -0
- data/lib/powerpoint/views/text_picture_split_slide.xml.erb +114 -0
- data/lib/powerpoint/views/textual_rel.xml.erb +4 -0
- data/lib/powerpoint/views/textual_slide.xml.erb +78 -0
- data/lib/powerpoint.rb +25 -0
- data/powerpoint.gemspec +31 -0
- data/samples/images/sample_gif.gif +0 -0
- data/samples/images/sample_jpg.jpg +0 -0
- data/samples/images/sample_png.png +0 -0
- data/samples/pptx/sample.pptx +0 -0
- data/spec/extended_test_spec.rb +13 -0
- data/spec/ranking_spec.rb +13 -0
- data/spec/test_spec.rb +22 -0
- data/template/_rels/.rels +6 -0
- data/template/docProps/core.xml +7 -0
- data/template/ppt/_rels/.keep +0 -0
- data/template/ppt/media/.keep +0 -0
- data/template/ppt/presProps.xml +14 -0
- data/template/ppt/slideLayouts/_rels/slideLayout1.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout10.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout11.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout2.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout3.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout4.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout5.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout6.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout7.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout8.xml.rels +2 -0
- data/template/ppt/slideLayouts/_rels/slideLayout9.xml.rels +2 -0
- data/template/ppt/slideLayouts/slideLayout1.xml +242 -0
- data/template/ppt/slideLayouts/slideLayout10.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout11.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout2.xml +165 -0
- data/template/ppt/slideLayouts/slideLayout3.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout4.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout5.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout6.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout7.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout8.xml +2 -0
- data/template/ppt/slideLayouts/slideLayout9.xml +2 -0
- data/template/ppt/slideMasters/_rels/slideMaster1.xml.rels +2 -0
- data/template/ppt/slideMasters/_rels/slideMaster2.xml.rels +2 -0
- data/template/ppt/slideMasters/slideMaster1.xml +487 -0
- data/template/ppt/slideMasters/slideMaster2.xml +487 -0
- data/template/ppt/slides/_rels/.keep +0 -0
- data/template/ppt/tableStyles.xml +2 -0
- data/template/ppt/theme/theme1.xml +2 -0
- data/template/ppt/theme/theme2.xml +281 -0
- data/template/ppt/viewProps.xml +32 -0
- metadata +232 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
3
|
+
<Relationship Id="rId1" Target="slideMasters/slideMaster1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"/>
|
|
4
|
+
<Relationship Id="rId2" Target="presProps.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps"/>
|
|
5
|
+
<Relationship Id="rId3" Target="viewProps.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps"/>
|
|
6
|
+
<Relationship Id="rId4" Target="theme/theme2.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"/>
|
|
7
|
+
<Relationship Id="rId5" Target="tableStyles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"/>
|
|
8
|
+
<% slides.each_with_index do |slide, index| %>
|
|
9
|
+
<Relationship Id="rId<%= 5 + (index+1) %>" Target="slides/slide<%= index+1 %>.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"/>
|
|
10
|
+
<% end %>
|
|
11
|
+
</Relationships>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
3
|
+
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" Target="../slideLayouts/slideLayout<%= index %>.xml" />
|
|
4
|
+
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/<%= image_name %>" />
|
|
5
|
+
</Relationships>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
|
|
3
|
+
<p:cSld>
|
|
4
|
+
<p:spTree>
|
|
5
|
+
<p:nvGrpSpPr>
|
|
6
|
+
<p:cNvPr id="1" name=""/>
|
|
7
|
+
<p:cNvGrpSpPr/>
|
|
8
|
+
<p:nvPr/>
|
|
9
|
+
</p:nvGrpSpPr>
|
|
10
|
+
<p:grpSpPr>
|
|
11
|
+
<a:xfrm>
|
|
12
|
+
<a:off x="0" y="0"/>
|
|
13
|
+
<a:ext cx="0" cy="0"/>
|
|
14
|
+
<a:chOff x="0" y="0"/>
|
|
15
|
+
<a:chExt cx="0" cy="0"/>
|
|
16
|
+
</a:xfrm>
|
|
17
|
+
</p:grpSpPr>
|
|
18
|
+
<p:sp>
|
|
19
|
+
<p:nvSpPr>
|
|
20
|
+
<p:cNvPr id="2" name="Title 1"/>
|
|
21
|
+
<p:cNvSpPr>
|
|
22
|
+
<a:spLocks noGrp="1"/>
|
|
23
|
+
</p:cNvSpPr>
|
|
24
|
+
<p:nvPr>
|
|
25
|
+
<p:ph type="title"/>
|
|
26
|
+
</p:nvPr>
|
|
27
|
+
</p:nvSpPr>
|
|
28
|
+
<p:spPr/>
|
|
29
|
+
<p:txBody>
|
|
30
|
+
<a:bodyPr/>
|
|
31
|
+
<a:lstStyle/>
|
|
32
|
+
<a:p>
|
|
33
|
+
<a:r>
|
|
34
|
+
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
|
|
35
|
+
<a:t><%= title %></a:t>
|
|
36
|
+
</a:r>
|
|
37
|
+
<a:endParaRPr lang="en-US" dirty="0"/>
|
|
38
|
+
</a:p>
|
|
39
|
+
</p:txBody>
|
|
40
|
+
</p:sp>
|
|
41
|
+
<p:sp>
|
|
42
|
+
<p:nvSpPr>
|
|
43
|
+
<p:cNvPr id="3" name="Content Placeholder 2"/>
|
|
44
|
+
<p:cNvSpPr>
|
|
45
|
+
<a:spLocks noGrp="1"/>
|
|
46
|
+
</p:cNvSpPr>
|
|
47
|
+
<p:nvPr>
|
|
48
|
+
<p:ph sz="half" idx="1"/>
|
|
49
|
+
</p:nvPr>
|
|
50
|
+
</p:nvSpPr>
|
|
51
|
+
<p:spPr/>
|
|
52
|
+
<p:txBody>
|
|
53
|
+
<a:bodyPr/>
|
|
54
|
+
<a:lstStyle/>
|
|
55
|
+
<% content.each_with_index do |c, index| %>
|
|
56
|
+
<a:p>
|
|
57
|
+
<a:r>
|
|
58
|
+
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
|
|
59
|
+
<a:t><%= c %></a:t>
|
|
60
|
+
</a:r>
|
|
61
|
+
<% if content.length == (index + 1) %>
|
|
62
|
+
<a:endParaRPr lang="en-US"/>
|
|
63
|
+
<% end %>
|
|
64
|
+
</a:p>
|
|
65
|
+
<% end %>
|
|
66
|
+
</p:txBody>
|
|
67
|
+
</p:sp>
|
|
68
|
+
<p:pic>
|
|
69
|
+
<p:nvPicPr>
|
|
70
|
+
<p:cNvPr id="4" name="Content Placeholder 3"/>
|
|
71
|
+
<p:cNvPicPr>
|
|
72
|
+
<a:picLocks noGrp="1" noChangeAspect="1"/>
|
|
73
|
+
</p:cNvPicPr>
|
|
74
|
+
<p:nvPr>
|
|
75
|
+
<p:ph sz="half" idx="2"/>
|
|
76
|
+
</p:nvPr>
|
|
77
|
+
</p:nvPicPr>
|
|
78
|
+
<p:blipFill>
|
|
79
|
+
<a:blip r:embed="rId2">
|
|
80
|
+
<a:extLst>
|
|
81
|
+
<a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
|
|
82
|
+
<a14:useLocalDpi xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" val="0"/>
|
|
83
|
+
</a:ext>
|
|
84
|
+
</a:extLst>
|
|
85
|
+
</a:blip>
|
|
86
|
+
<a:stretch>
|
|
87
|
+
<a:fillRect/>
|
|
88
|
+
</a:stretch>
|
|
89
|
+
</p:blipFill>
|
|
90
|
+
<% if coords.any? %>
|
|
91
|
+
<p:spPr>
|
|
92
|
+
<a:xfrm>
|
|
93
|
+
<a:off x="<%= coords[:x].to_s %>" y="<%= coords[:y].to_s %>"/>
|
|
94
|
+
<a:ext cx="<%= coords[:cx].to_s %>" cy="<%= coords[:cy].to_s %>"/>
|
|
95
|
+
</a:xfrm>
|
|
96
|
+
<a:prstGeom prst="rect">
|
|
97
|
+
<a:avLst/>
|
|
98
|
+
</a:prstGeom>
|
|
99
|
+
</p:spPr>
|
|
100
|
+
<% else %>
|
|
101
|
+
<p:spPr/>
|
|
102
|
+
<% end %>
|
|
103
|
+
</p:pic>
|
|
104
|
+
</p:spTree>
|
|
105
|
+
<p:extLst>
|
|
106
|
+
<p:ext uri="{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}">
|
|
107
|
+
<p14:creationId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="1435759726"/>
|
|
108
|
+
</p:ext>
|
|
109
|
+
</p:extLst>
|
|
110
|
+
</p:cSld>
|
|
111
|
+
<p:clrMapOvr>
|
|
112
|
+
<a:masterClrMapping/>
|
|
113
|
+
</p:clrMapOvr>
|
|
114
|
+
</p:sld>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
3
|
+
<Relationship Id="rId1" Target="../slideLayouts/slideLayout<%= index %>.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"/>
|
|
4
|
+
</Relationships>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<p:sld 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:cSld>
|
|
4
|
+
<p:spTree>
|
|
5
|
+
<p:nvGrpSpPr>
|
|
6
|
+
<p:cNvPr id="1" name=""/>
|
|
7
|
+
<p:cNvGrpSpPr/>
|
|
8
|
+
<p:nvPr/>
|
|
9
|
+
</p:nvGrpSpPr>
|
|
10
|
+
<p:grpSpPr>
|
|
11
|
+
<a:xfrm>
|
|
12
|
+
<a:off x="0" y="0"/>
|
|
13
|
+
<a:ext cx="0" cy="0"/>
|
|
14
|
+
<a:chOff x="0" y="0"/>
|
|
15
|
+
<a:chExt cx="0" cy="0"/>
|
|
16
|
+
</a:xfrm>
|
|
17
|
+
</p:grpSpPr>
|
|
18
|
+
<p:sp>
|
|
19
|
+
<p:nvSpPr>
|
|
20
|
+
<p:cNvPr id="2" name="Title 1"/>
|
|
21
|
+
<p:cNvSpPr>
|
|
22
|
+
<a:spLocks noGrp="1"/>
|
|
23
|
+
</p:cNvSpPr>
|
|
24
|
+
<p:nvPr>
|
|
25
|
+
<p:ph type="title"/>
|
|
26
|
+
</p:nvPr>
|
|
27
|
+
</p:nvSpPr>
|
|
28
|
+
<p:spPr/>
|
|
29
|
+
<p:txBody>
|
|
30
|
+
<a:bodyPr/>
|
|
31
|
+
<a:lstStyle/>
|
|
32
|
+
<a:p>
|
|
33
|
+
<a:r>
|
|
34
|
+
<a:rPr dirty="0" lang="en-US" smtClean="0"/>
|
|
35
|
+
<a:t><%= title %></a:t>
|
|
36
|
+
</a:r>
|
|
37
|
+
<a:endParaRPr dirty="0" lang="en-US"/>
|
|
38
|
+
</a:p>
|
|
39
|
+
</p:txBody>
|
|
40
|
+
</p:sp>
|
|
41
|
+
<p:sp>
|
|
42
|
+
<p:nvSpPr>
|
|
43
|
+
<p:cNvPr id="3" name="Content Placeholder 2"/>
|
|
44
|
+
<p:cNvSpPr>
|
|
45
|
+
<a:spLocks noGrp="1"/>
|
|
46
|
+
</p:cNvSpPr>
|
|
47
|
+
<p:nvPr>
|
|
48
|
+
<p:ph idx="1"/>
|
|
49
|
+
</p:nvPr>
|
|
50
|
+
</p:nvSpPr>
|
|
51
|
+
<p:spPr/>
|
|
52
|
+
<p:txBody>
|
|
53
|
+
<a:bodyPr/>
|
|
54
|
+
<a:lstStyle/>
|
|
55
|
+
<% content.each_with_index do |c, index| %>
|
|
56
|
+
<a:p>
|
|
57
|
+
<a:r>
|
|
58
|
+
<a:rPr dirty="0" lang="en-US" smtClean="0"/>
|
|
59
|
+
<a:t><%= c %></a:t>
|
|
60
|
+
</a:r>
|
|
61
|
+
<% if content.length == (index + 1) %>
|
|
62
|
+
<a:endParaRPr lang="en-US"/>
|
|
63
|
+
<% end %>
|
|
64
|
+
</a:p>
|
|
65
|
+
<% end %>
|
|
66
|
+
</p:txBody>
|
|
67
|
+
</p:sp>
|
|
68
|
+
</p:spTree>
|
|
69
|
+
<p:extLst>
|
|
70
|
+
<p:ext uri="{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}">
|
|
71
|
+
<p14:creationId val="1231192379" xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main"/>
|
|
72
|
+
</p:ext>
|
|
73
|
+
</p:extLst>
|
|
74
|
+
</p:cSld>
|
|
75
|
+
<p:clrMapOvr>
|
|
76
|
+
<a:masterClrMapping/>
|
|
77
|
+
</p:clrMapOvr>
|
|
78
|
+
</p:sld>
|
data/lib/powerpoint.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require "powerpoint/version"
|
|
2
|
+
require 'powerpoint/util'
|
|
3
|
+
require 'powerpoint/slide/intro'
|
|
4
|
+
require 'powerpoint/slide/extended_intro'
|
|
5
|
+
require 'powerpoint/slide/multiple_image'
|
|
6
|
+
require 'powerpoint/slide/comment'
|
|
7
|
+
require 'powerpoint/slide/gallery'
|
|
8
|
+
require 'powerpoint/slide/concept'
|
|
9
|
+
require 'powerpoint/slide/collage'
|
|
10
|
+
require 'powerpoint/slide/custom'
|
|
11
|
+
require 'powerpoint/slide/textual'
|
|
12
|
+
require 'powerpoint/slide/pictorial'
|
|
13
|
+
require 'powerpoint/slide/text_picture_split'
|
|
14
|
+
require 'powerpoint/slide/picture_description'
|
|
15
|
+
require 'powerpoint/slide/dashboard_user'
|
|
16
|
+
require 'powerpoint/slide/dashboard'
|
|
17
|
+
require 'powerpoint/compression'
|
|
18
|
+
require 'powerpoint/presentation'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
module Powerpoint
|
|
22
|
+
ROOT_PATH = File.expand_path("../..", __FILE__)
|
|
23
|
+
TEMPLATE_PATH = "#{ROOT_PATH}/template/"
|
|
24
|
+
VIEW_PATH = "#{ROOT_PATH}/lib/powerpoint/views/"
|
|
25
|
+
end
|
data/powerpoint.gemspec
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'powerpoint/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "powerpoint-pro"
|
|
8
|
+
spec.version = Powerpoint::VERSION
|
|
9
|
+
spec.authors = ["pythonicrubyist", "prosenjit"]
|
|
10
|
+
spec.email = ["chongder.pro@gmail.com"]
|
|
11
|
+
spec.description = %q{A Ruby gem that can create a PowerPoint presentation.}
|
|
12
|
+
spec.summary = %q{powerpoint is a Ruby gem that can create a PowerPoint presentation based on a standard pptx template.}
|
|
13
|
+
spec.homepage = "https://github.com/prosenjit98/powerpoint_pro"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files`.split($/)
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.required_ruby_version = '>= 1.9.2'
|
|
22
|
+
|
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
|
24
|
+
spec.add_development_dependency "rake"
|
|
25
|
+
spec.add_development_dependency 'rspec', '~> 2.13.0'
|
|
26
|
+
spec.add_development_dependency 'pry'
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
spec.add_dependency 'rubyzip', '~> 1'
|
|
30
|
+
spec.add_dependency 'fastimage', '~> 1'
|
|
31
|
+
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'powerpoint'
|
|
2
|
+
|
|
3
|
+
describe 'Powerpoint parsing a sample PPTX file' do
|
|
4
|
+
before(:all) do
|
|
5
|
+
@deck = Powerpoint::Presentation.new
|
|
6
|
+
@deck.add_extended_intro 'Bicycle Of the Mind','samples/images/sample_png.png', 'created by Steve Jobs', 'created by bob'
|
|
7
|
+
@deck.save 'samples/pptx/sample.pptx' # Examine the PPTX file
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it 'Create a PPTX file successfully.' do
|
|
11
|
+
#@deck.should_not be_nil
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'powerpoint'
|
|
2
|
+
|
|
3
|
+
describe 'Powerpoint parsing a sample PPTX file' do
|
|
4
|
+
before(:all) do
|
|
5
|
+
@deck = Powerpoint::Presentation.new
|
|
6
|
+
@deck.add_ranking_slide 'Bicycle Of the Mind','samples/images/sample_png.png', nil
|
|
7
|
+
@deck.save 'samples/pptx/sample.pptx' # Examine the PPTX file
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it 'Create a PPTX file successfully.' do
|
|
11
|
+
#@deck.should_not be_nil
|
|
12
|
+
end
|
|
13
|
+
end
|
data/spec/test_spec.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require 'powerpoint'
|
|
2
|
+
|
|
3
|
+
describe 'Powerpoint parsing a sample PPTX file' do
|
|
4
|
+
before(:all) do
|
|
5
|
+
@deck = Powerpoint::Presentation.new
|
|
6
|
+
@deck.add_intro 'Bicycle Of the Mind', 'created by Steve Jobs'
|
|
7
|
+
@deck.add_textual_slide 'Why Mac?', ['Its cool!', 'Its light!']
|
|
8
|
+
@deck.add_textual_slide 'Why Iphone?', ['Its fast!', 'Its cheap!']
|
|
9
|
+
@deck.add_pictorial_slide 'JPG Logo', 'samples/images/sample_png.png'
|
|
10
|
+
@deck.add_text_picture_slide('Text Pic Split', 'samples/images/sample_png.png', content = ['Here is a string', 'here is another'])
|
|
11
|
+
@deck.add_pictorial_slide 'PNG Logo', 'samples/images/sample_png.png'
|
|
12
|
+
@deck.add_picture_description_slide('Pic Desc', 'samples/images/sample_png.png', content = ['Here is a string', 'here is another'])
|
|
13
|
+
@deck.add_picture_description_slide('JPG Logo', 'samples/images/sample_jpg.jpg', content = ['descriptions'])
|
|
14
|
+
@deck.add_pictorial_slide 'GIF Logo', 'samples/images/sample_gif.gif', {x: 124200, y: 3356451, cx: 2895600, cy: 1013460}
|
|
15
|
+
@deck.add_textual_slide 'Why Android?', ['Its great!', 'Its sweet!']
|
|
16
|
+
@deck.save 'samples/pptx/sample.pptx' # Examine the PPTX file
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
it 'Create a PPTX file successfully.' do
|
|
20
|
+
#@deck.should_not be_nil
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
3
|
+
<Relationship Id="rId1" Target="ppt/presentation.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"/>
|
|
4
|
+
<Relationship Id="rId2" Target="docProps/core.xml" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"/>
|
|
5
|
+
<Relationship Id="rId3" Target="docProps/app.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"/>
|
|
6
|
+
</Relationships>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
3
|
+
<dc:title>Powerpoint</dc:title>
|
|
4
|
+
<cp:lastModifiedBy>Nobody</cp:lastModifiedBy>
|
|
5
|
+
<cp:revision>1</cp:revision>
|
|
6
|
+
<dcterms:modified xsi:type="dcterms:W3CDTF">2015-07-15T00:51:18Z</dcterms:modified>
|
|
7
|
+
</cp:coreProperties>
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<p:presentationPr 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:extLst>
|
|
4
|
+
<p:ext uri="{E76CE94A-603C-4142-B9EB-6D1370010A27}">
|
|
5
|
+
<p14:discardImageEditData val="0" xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main"/>
|
|
6
|
+
</p:ext>
|
|
7
|
+
<p:ext uri="{D31A062A-798A-4329-ABDD-BBA856620510}">
|
|
8
|
+
<p14:defaultImageDpi val="220" xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main"/>
|
|
9
|
+
</p:ext>
|
|
10
|
+
<p:ext uri="{FD5EFAAD-0ECE-453E-9831-46B23BE46B34}">
|
|
11
|
+
<p15:chartTrackingRefBased val="0" xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"/>
|
|
12
|
+
</p:ext>
|
|
13
|
+
</p:extLst>
|
|
14
|
+
</p:presentationPr>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster2.xml"/></Relationships>
|