rabbit-slide-aycabta-rubykaigi-2019 2019.04.18.0

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -0,0 +1,252 @@
1
+ include_theme('lightning-rabbit')
2
+ include_theme('body-background-image')
3
+
4
+ @headline_logo_image = "usa1.png"
5
+ include_theme("headline-logo")
6
+
7
+ def Kernel.log(msg)
8
+ open('log', 'w') { |f| f.puts msg.to_s }
9
+ end
10
+
11
+ match(TitleSlide) do |elements|
12
+ elements.prop_set('size', screen_size(7) * Pango::SCALE)
13
+ end
14
+
15
+ match('**', Text) do |elements|
16
+ elements.each do |text|
17
+ case text.text
18
+ when /Feature #/, /Show documents when completion/
19
+ text.prop_set('size', screen_size(4) * Pango::SCALE)
20
+ when /terminal techniques/
21
+ text.prop_set('size', screen_size(5) * Pango::SCALE)
22
+ when /may_req_ambiguous_char_width/
23
+ text.prop_set('size', screen_size(4.5) * Pango::SCALE)
24
+ when /docs\.microsoft\.com/
25
+ text.prop_set('size', screen_size(2.2) * Pango::SCALE)
26
+ end
27
+ end
28
+ end
29
+
30
+ match('**', BlockQuote) do |elements|
31
+ elements.prop_set('size', screen_size(5.0) * Pango::SCALE)
32
+ end
33
+
34
+ match('*', HeadLine) do |elements|
35
+ elements.each do |headline|
36
+ if headline.text.match?(/Design/)
37
+ headline.prop_set('size', screen_size(4.5) * Pango::SCALE)
38
+ else
39
+ headline.prop_set('size', screen_size(5.2) * Pango::SCALE)
40
+ end
41
+ end
42
+ end
43
+
44
+ match('**', ItemListItem) do |elements|
45
+ elements.prop_set('size', screen_size(5.0) * Pango::SCALE)
46
+ elements.padding_top = 0
47
+ elements.padding_bottom = 0
48
+ elements.margin_top = 0
49
+ elements.margin_bottom = 0
50
+ end
51
+
52
+ match('**', ItemListItem, '**', ItemListItem) do |elements|
53
+ elements.prop_set('size', screen_size(4.0) * Pango::SCALE)
54
+ elements.padding_top = 0
55
+ elements.padding_bottom = 0
56
+ elements.margin_top = 0
57
+ elements.margin_bottom = 0
58
+ end
59
+
60
+ match('**', ItemListItem, '**', ItemListItem, '**', ItemListItem) do |elements|
61
+ elements.prop_set('size', screen_size(3.3) * Pango::SCALE)
62
+ elements.padding_top = 0
63
+ elements.padding_bottom = 0
64
+ elements.margin_top = 0
65
+ elements.margin_bottom = 0
66
+ end
67
+
68
+ match('**', ItemListItem, '**', ItemListItem, '**', ItemListItem, '**', ItemListItem) do |elements|
69
+ elements.prop_set('size', screen_size(3) * Pango::SCALE)
70
+ elements.padding_top = 0
71
+ elements.padding_bottom = 0
72
+ elements.margin_top = 0
73
+ elements.margin_bottom = 0
74
+ elements.margin_left = screen_size(4)
75
+ end
76
+
77
+ match('**', ItemListItem) do |elements|
78
+ elements.select{ |e| e.text.match?(/Matsuda-san is/) }.each do |e|
79
+ e.prop_set('size', screen_size(3) * Pango::SCALE)
80
+ end
81
+ end
82
+
83
+ match('**', Image) do |images|
84
+ images.each do |image|
85
+ if image.caption&.match?(/strange.*arrows/)
86
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
87
+ unless @image_caption_font_size_backup
88
+ @image_caption_font_size_backup = @image_caption_font_size
89
+ @image_caption_font_size = screen_size(5) * Pango::SCALE
90
+ end
91
+ [x, y, w, h]
92
+ end
93
+ elsif image.caption&.match?(/Both.*culture/) or image.caption&.match?(/Elasticsearch/)
94
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
95
+ unless @image_caption_font_size_backup
96
+ @image_caption_font_size_backup = @image_caption_font_size
97
+ @image_caption_font_size = screen_size(4.5) * Pango::SCALE
98
+ end
99
+ [x, y, w, h]
100
+ end
101
+ elsif image.caption&.match?(/injured TFCC/)
102
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
103
+ unless @image_caption_font_size_backup
104
+ @image_caption_font_size_backup = @image_caption_font_size
105
+ @image_caption_font_size = screen_size(4.0) * Pango::SCALE
106
+ end
107
+ [x, y, w, h]
108
+ end
109
+ elsif image.caption&.match?(/I got right anterior cruciate ligament injury/)
110
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
111
+ unless @image_caption_font_size_backup
112
+ @image_caption_font_size_backup = @image_caption_font_size
113
+ @image_caption_font_size = screen_size(4.0) * Pango::SCALE
114
+ end
115
+ [x, y, w, h]
116
+ end
117
+ elsif image.caption&.match?(/Sometimes I use computer on the floor/)
118
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
119
+ unless @image_caption_font_size_backup
120
+ @image_caption_font_size_backup = @image_caption_font_size
121
+ @image_caption_font_size = screen_size(4.0) * Pango::SCALE
122
+ end
123
+ [x, y, w, h]
124
+ end
125
+ elsif image.caption&.match?(/New headache/)
126
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
127
+ unless @image_caption_font_size_backup
128
+ @image_caption_font_size_backup = @image_caption_font_size
129
+ @image_caption_font_size = screen_size(4.5) * Pango::SCALE
130
+ end
131
+ [x, y, w, h]
132
+ end
133
+ elsif image.caption&.match?(/Stiffness of/)
134
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
135
+ unless @image_caption_font_size_backup
136
+ @image_caption_font_size_backup = @image_caption_font_size
137
+ @image_caption_font_size = screen_size(4.5) * Pango::SCALE
138
+ end
139
+ [x, y, w, h]
140
+ end
141
+ elsif image.caption&.match?(/prosthetic finger/)
142
+ image.add_pre_draw_proc(:save_url) do |canvas, x, y, w, h, simulation|
143
+ unless @image_caption_font_size_backup
144
+ @image_caption_font_size_backup = @image_caption_font_size
145
+ @image_caption_font_size = screen_size(4.5) * Pango::SCALE
146
+ end
147
+ [x, y, w, h]
148
+ end
149
+ else
150
+ image.add_pre_draw_proc(:restore_url) do |canvas, x, y, w, h, simulation|
151
+ if @image_caption_font_size_backup
152
+ @image_caption_font_size = @image_caption_font_size_backup
153
+ @image_caption_font_size_backup = nil
154
+ end
155
+ [x, y, w, h]
156
+ end
157
+ end
158
+ end
159
+ end
160
+
161
+ match('*') do |elements|
162
+ elements.each do |slide|
163
+ if slide.title.match?(/fullimage/)
164
+ slide.each do |e|
165
+ if e.instance_of?(Body)
166
+ image = e.first
167
+ image.add_pre_draw_proc(:bbbb) do |canvas, x, y, w, h, simulation|
168
+ image.resize(canvas.width, canvas.height)
169
+ [0.0, 0.0, w, h]
170
+ end
171
+ end
172
+ end
173
+ elsif slide.title.match?(/notitle/)
174
+ slide.each do |e|
175
+ if e.instance_of?(HeadLine)
176
+ e.prop_set('size', screen_size(0) * Pango::SCALE)
177
+ end
178
+ end
179
+ elsif slide.title.match?(/Win32 API/)
180
+ slide.each do |e|
181
+ e.each do |inside|
182
+ if inside.instance_of?(ItemList)
183
+ inside.each do |item|
184
+ case item.text
185
+ when /GetStdHandle/, /SetConsoleCursorPosition/, /GetConsoleScreenBufferInfo/, /blah blah blah/
186
+ item.prop_set('size', screen_size(4) * Pango::SCALE)
187
+ end
188
+ end
189
+ end
190
+ end
191
+ end
192
+ elsif slide.title.match?(/Unicode support/)
193
+ slide.each do |e|
194
+ e.each do |inside|
195
+ if inside.instance_of?(ItemList)
196
+ inside.each do |item|
197
+ case item.text
198
+ when /combination plural/, /depending on the situation/, /blah blah blah/
199
+ item.prop_set('size', screen_size(3.5) * Pango::SCALE)
200
+ end
201
+ end
202
+ end
203
+ end
204
+ end
205
+ elsif slide.title.match?(/Line editing implementation/)
206
+ if (slide.any?{ |e| e.text.match?(/operation method list\(smaller\)/) })
207
+ slide.each do |e|
208
+ e.each do |inside|
209
+ if inside.instance_of?(ItemList)
210
+ inside.each do |item|
211
+ item.prop_set('size', screen_size(2) * Pango::SCALE)
212
+ item.find_all { |i| i.text.match?(/operation method list/) }.each { |i| i.prop_set('size', screen_size(4) * Pango::SCALE) }
213
+ end
214
+ end
215
+ end
216
+ end
217
+ elsif (slide.any?{ |e| e.text.match?(/operation method list\(smallest\)/) })
218
+ slide.each do |e|
219
+ e.each do |inside|
220
+ if inside.instance_of?(ItemList)
221
+ inside.each do |item|
222
+ item.prop_set('size', screen_size(1) * Pango::SCALE)
223
+ item.find_all { |i| i.text.match?(/operation method list/) }.each { |i| i.prop_set('size', screen_size(4) * Pango::SCALE) }
224
+ end
225
+ end
226
+ end
227
+ end
228
+ elsif (slide.any?{ |e| e.text.match?(/operation method list\(smallest\)/) })
229
+ slide.each do |e|
230
+ e.each do |inside|
231
+ if inside.instance_of?(ItemList)
232
+ inside.each do |item|
233
+ item.prop_set('size', screen_size(1) * Pango::SCALE)
234
+ item.find_all { |i| i.text.match?(/operation method list/) }.each { |i| i.prop_set('size', screen_size(4) * Pango::SCALE) }
235
+ end
236
+ end
237
+ end
238
+ end
239
+ elsif (slide.any?{ |e| e.text.match?(/operation and motion/) })
240
+ slide.each do |e|
241
+ e.each do |inside|
242
+ if inside.instance_of?(ItemList)
243
+ inside.each do |item|
244
+ item.prop_set('size', screen_size(2) * Pango::SCALE)
245
+ end
246
+ end
247
+ end
248
+ end
249
+ end
250
+ end
251
+ end
252
+ end
Binary file
Binary file
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-aycabta-rubykaigi-2019
3
+ version: !ruby/object:Gem::Version
4
+ version: 2019.04.18.0
5
+ platform: ruby
6
+ authors:
7
+ - ITOYANAGI Sakura
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-04-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rabbit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.2
27
+ description: ''
28
+ email:
29
+ - aycabta@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".rabbit"
35
+ - Anatomy_TFCC.jpg
36
+ - README.rd
37
+ - RIMG0301.jpg
38
+ - RIMG0350.jpg
39
+ - RIMG0471.jpg
40
+ - RIMG0488.jpg
41
+ - RMS_typing.jpg
42
+ - Rakefile
43
+ - Richard_Stallman.jpg
44
+ - X_mark.svg
45
+ - asakusarb.jpg
46
+ - bill-gates-desk-picture-with-injury.jpg
47
+ - bill-gates-desk-picture.jpg
48
+ - blackmontblanc.jpg
49
+ - both.png
50
+ - colored-text.png
51
+ - config.yaml
52
+ - double.png
53
+ - editors.png
54
+ - japan.png
55
+ - japan_fukuoka.png
56
+ - japan_fukuoka_nagasaki.png
57
+ - mannequin.jpg
58
+ - mannequin_1.jpg
59
+ - mannequin_2.jpg
60
+ - mannequin_3.jpg
61
+ - mannequin_4.jpg
62
+ - mannequin_gone.jpg
63
+ - pdf/rubykaigi-2019-terminal_editors.pdf
64
+ - reline.png
65
+ - rubykaigi2019.md
66
+ - setchan.jpg
67
+ - single.png
68
+ - terminal_editors.rab
69
+ - textbringer.png
70
+ - theme.rb
71
+ - usa1.png
72
+ - wrist.png
73
+ homepage: http://slide.rabbit-shocker.org/authors/aycabta/rubykaigi-2019/
74
+ licenses:
75
+ - CC-BY-SA-4.0
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubygems_version: 3.0.3
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: 'IRB Reboot: Modernize Implementation and Features'
96
+ test_files: []