ruby_slides 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e578fb2796af5721b2dac0f714008dc2931251a6
4
- data.tar.gz: 724e2a43e2290b97be58b812f56dd39d0d11f658
3
+ metadata.gz: e55eeb9eaa2c8bd93033fa06ca008876cc48a7bc
4
+ data.tar.gz: 6d8aa9e0f1bcb2e0797c4799279e5763bb3fee01
5
5
  SHA512:
6
- metadata.gz: f179ad0ea0e90b7b17e90012316a34f059ed9bbf2037382229ff3a1bc0775451dcc4deed0cdcbbc0d784e49017be45fe10dc6cba140c6337bce693185bc7498e
7
- data.tar.gz: edaa7a60d5bdaecc708a884bb3d3d2f6bafa1ef20bfc1ac45ddd7f10408c31d1b1420e6901e2933c76cef62aadf6cadff70abe42366512294753e367c5ed4ea8
6
+ metadata.gz: ed967f2d96a49f90eeea33915b60d110d2623a083202c5d6a52f3a825a98528b16774ca2e7ad70137180bf78bb5b719c693c6c08167ef240aedc8006648673fd
7
+ data.tar.gz: 36ab0738453f95a30243b0d61b36fa30cadef1d5744fe5e683b408696744e1624bbf4b0f2fe0fbd807860e8409e5453a3057c73825ed4d83e7ae9222889c8484
data/README.md CHANGED
@@ -24,9 +24,107 @@ Optionally use the latest code using:
24
24
  gem 'ruby_slides', git: "https://github.com/danielsousaio/ruby_slides.git"
25
25
  ```
26
26
 
27
- ## Usage
27
+ ## Getting started
28
28
 
29
29
 
30
+ Get started by creating a new object
31
+
32
+ ```ruby
33
+ @presentation = RubySlides::Presentation.new
34
+ ```
35
+
36
+ RubySlides offer various types of slide as described below. If you would like
37
+ to see an example of a powerpoint generated with RubySlides take a look at the
38
+ powerpoint in the example folder. That's the result of running the spec.
39
+
40
+
41
+ ### Introduction Slide
42
+
43
+ ```ruby
44
+ title = "Hello Universe!"
45
+ subtitle = "Powerpoints with ruby"
46
+ @presentation.introduction_slide title, subtitle
47
+ ```
48
+
49
+ ### Textual Slide
50
+
51
+ ```ruby
52
+ textual_title = "Textual Slide"
53
+ textual_items = ["Item 1", "Item 2", "Item 3"]
54
+ @presentation.textual_slide textual_title, textual_items
55
+ ```
56
+
57
+ ### Pictorial Slide
58
+
59
+ ```ruby
60
+ pictorial_title = "Image Slide"
61
+ picture_path = "example/ruby.png"
62
+ @presentation.pictorial_slide pictorial_title, picture_path
63
+ ```
64
+
65
+ ### Pictorial with coordinates
66
+
67
+ ```ruby
68
+ picture_coords = { x: 550 * 12700, y: 30 * 12700, # Picture Position
69
+ cx: 80 * 12700, cy: 60 * 12700 } # Picture Sizing
70
+ @presentation.pictorial_slide pictorial_title, picture_path, picture_coords
71
+ ```
72
+
73
+ ### Text Picture Slide
74
+
75
+ ```ruby
76
+ text_picture_title = "Text Picture Slide"
77
+ text_picture_content = [
78
+ "Picture size: 2MB",
79
+ "Picture author: Unknown Rubyist"
80
+ ]
81
+ @presentation.text_picture_slide text_picture_title, picture_path,
82
+ text_picture_content
83
+ ```
84
+
85
+ ### Picture Description Slide
86
+
87
+ ```ruby
88
+ picture_description_title = "Picture Description Slide"
89
+ picture_description_content = [
90
+ "Picture description, long text",
91
+ "Additional information"
92
+ ]
93
+ @presentation.picture_description_slide picture_description_title,
94
+ picture_path,
95
+ picture_description_content
96
+ ```
97
+
98
+ ### Table Slide
99
+
100
+ ```ruby
101
+ table_title = "Table Slide"
102
+ table_series = [
103
+ ["HeaderA", "HeaderB"],
104
+ ["ValueA", "ValueB"]
105
+ ]
106
+ @presentation.table_slide table_title, table_series
107
+ ```
108
+
109
+ ### Chart Slide
110
+
111
+ ```ruby
112
+ chart_title = "Chart Slide"
113
+ chart_series = [
114
+ {
115
+ column: "Col1",
116
+ rows: ["A", "B", "C", "D"],
117
+ values: ["1", "3", "5", "7"]
118
+ },
119
+ {
120
+ column: "Col2",
121
+ rows: ["A", "B", "C", "D"],
122
+ values: ["2", "4", "6", "8"]
123
+ }
124
+ ]
125
+ @presentation.chart_slide chart_title, chart_series
126
+ ```
127
+
30
128
  ## Development
31
129
 
32
130
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Binary file
@@ -1,3 +1,3 @@
1
1
  module RubySlides
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["mail@danielsousa.io"]
11
11
 
12
12
  spec.summary = "RubySlides"
13
- spec.description = "Create Powerpoint presentations in Ruby with elements like slides, text, images, tables and charts."
13
+ spec.description = "Create Powerpoint presentations in Ruby with tables, images and charts."
14
14
  spec.homepage = "https://github.com/danielsousaio/ruby_slides"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_slides
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Sousa
@@ -80,8 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1'
83
- description: Create Powerpoint presentations in Ruby with elements like slides, text,
84
- images, tables and charts.
83
+ description: Create Powerpoint presentations in Ruby with tables, images and charts.
85
84
  email:
86
85
  - mail@danielsousa.io
87
86
  executables: []