showoff 0.12.1 → 0.12.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0547aee458c3417a677758cdf70ea8a063e2d89
4
- data.tar.gz: ecb30bc4b56493533a5b70327cedec5b75d2475f
3
+ metadata.gz: ec76aa0788c47474cae17e4e7fd001f5f59528fb
4
+ data.tar.gz: 672f97f4f81b725f1f0d68418b5a292f3061d58d
5
5
  SHA512:
6
- metadata.gz: 58700ccb6dd6d381acb170486ceb0723150a4b6b3e1fd4e8d9be4cb8aa20f10b63c6edc37c4e66a69da546759f5bbbf0e81aaafe949c7c5ba76abd56afea370c
7
- data.tar.gz: 1100e728e8f85fdba9966c861d2ada537967cd3f985290774958a2058562b959a72c5f9f682b56fe4ce9184ef6eadf5b3294bc009e5d6076a00fbbb435250a49
6
+ metadata.gz: 46464828f157e75fd4783ef28628ff404573f57f69d3fa87da500a5cf4be46ce62a9e9639e695cf3f451eca27ec423ab9be48137ffc75fb45317b104c2218204
7
+ data.tar.gz: 6e3c5444159ce33d30e273de6de19da2357bec6b1aa82da65a7d7b4d5cad118bd472fba0289109c5a70eb0efd2184f080e64ec443aa0823f048445351acca284
data/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # Showoff Presenter
2
+
3
+ Showoff is a slideshow presentation tool with a twist. It runs as a web application,
4
+ with audience interactivity features. This means that your audience can follow along
5
+ in their own browsers, can download supplemental materials, can participate in quizzes
6
+ or polls, post questions for the presenter, etc. By default, their slideshows will
7
+ synchronize with the presenter, but they can switch to self-navigation mode.
8
+
9
+ ![Presenter view](images/presenter.png)
10
+
11
+ Showoff allows you to author your presentation slides in Markdown, then organize
12
+ them with a `showoff.json` file. This file also contains metadata about
13
+ the presentation, such as the title, any password protection, etc.
14
+
15
+ Then you just run `showoff serve` in the presentation directory and open
16
+ a browser window.
17
+
18
+
19
+ ## Functionality
20
+
21
+ Beyond the standard presentation functionality, Showoff provides:
22
+
23
+ * Live presenter tools:
24
+ * presenter view that display notes, tree representation of presentation, and other tools
25
+ * execute code in many languages (Javascript, Ruby, Python, Puppet, etc) live and display results
26
+ * show a pre-show slideshow while you wait to start
27
+ * let audience members download slides, code samples or other supplementary material
28
+ * show a countdown timer to help keep you on pace.
29
+ * show synchronized, hidden notes on another browser (like an iphone)
30
+
31
+ * Live audience tools:
32
+ * audience can pull up the presentation on their own browsers
33
+ * presentation is synchronized to track the presenter's
34
+ * call up a menu of sections/slides at any time to navigate directly to slides
35
+ * independent navigation so that audience members can go back or catch up as you talk
36
+ * allow the audience to provide pace feedback and ask questions of the presenter
37
+ * allow the audience to provide content feedback on the material
38
+
39
+ * Content creation and distribution functionality:
40
+ * generate supplemental material based on slide tags
41
+ * generate printed versions of the presentation including handout notes
42
+ * password protect any URL path to keep control over different views of content
43
+ * automatically generate a Table of Contents
44
+ * provide buttons for one-click issue reporting for presentation materials
45
+ * open the current slide in a Markdown editor
46
+ * open the current slide in an online editor such as Github's repository editor
47
+ * track how much time audience members spend on specific slides
48
+ * generate a static form of the presentation and upload it to Github Pages
49
+ * generate a Heroku app to serve your presentation from
50
+ * automatically generate presentations from an outline
51
+
52
+ Due to it being plain text, you can easily version control it, you can easily move
53
+ sections between presentations, and you can rearrange or remove sections easily.
54
+
55
+
56
+ ## Installation
57
+
58
+ Showoff is distributed as a RubyGem. Simply install it like any other gem. Showoff
59
+ will run out of the box on OS X and most Linux distributions. To install on Windows,
60
+ you'll need to install both Ruby and the Ruby DevKit for compiling native extensions.
61
+
62
+ gem install showoff
63
+
64
+
65
+ ## Documentation
66
+
67
+ Please see the [documentation](./documentation) section for further information.
68
+
69
+ You can generate a nice & pretty local copy of the documentation by running
70
+ `rake doc` in your clone of the repository. The generated HTML will be saved in
71
+ the `docs` directory.
72
+
73
+
74
+ ## Contributing
75
+
76
+ See the [CONTRIB.md](CONTRIB.md) file for how to contribute to this project
data/bin/showoff CHANGED
@@ -50,11 +50,10 @@ command [:create,:init] do |c|
50
50
  c.action do |global_options,options,args|
51
51
  raise "dir_name is required" if args.empty?
52
52
  ShowOffUtils.create(args[0],!options[:n],options[:d])
53
- if !options[:n]
54
- puts "done. run 'showoff serve' in #{options[:d]}/ dir to see slideshow"
55
- else
56
- puts "done. add slides, modify #{ShowOffUtils.presentation_config_file} and then run 'showoff serve' in #{dirname}/ dir to see slideshow"
53
+ if options[:n]
54
+ puts "Add slides and update #{args[0]}/#{ShowOffUtils.presentation_config_file}"
57
55
  end
56
+ puts "Run 'showoff serve' in the #{args[0]} directory to see your new slideshow"
58
57
  end
59
58
  end
60
59
 
@@ -1,3 +1,3 @@
1
1
  # No namespace here since ShowOff is a class and I'd have to inherit from
2
2
  # Sinatra::Application (which we don't want to load here)
3
- SHOWOFF_VERSION = '0.12.1'
3
+ SHOWOFF_VERSION = '0.12.2'
data/lib/showoff_utils.rb CHANGED
@@ -32,22 +32,28 @@ class ShowOffUtils
32
32
  end
33
33
 
34
34
  def self.create(dirname,create_samples,dir='one')
35
- Dir.mkdir(dirname) if !File.exist?(dirname)
35
+ FileUtils.mkdir_p(dirname)
36
36
  Dir.chdir(dirname) do
37
37
  if create_samples
38
38
  # create section
39
- Dir.mkdir(dir)
39
+ FileUtils.mkdir_p(dir)
40
40
 
41
41
  # create markdown file
42
42
  File.open("#{dir}/01_slide.md", 'w+') do |f|
43
43
  f.puts make_slide("My Presentation")
44
+ end
45
+ File.open("#{dir}/02_slide.md", 'w+') do |f|
44
46
  f.puts make_slide("Bullet Points","bullets incremental",["first point","second point","third point"])
45
47
  end
46
48
  end
47
49
 
50
+ # Create asset directories
51
+ FileUtils.mkdir_p('_files/share')
52
+ FileUtils.mkdir_p('_images')
53
+
48
54
  # create showoff.json
49
55
  File.open(ShowOffUtils.presentation_config_file, 'w+') do |f|
50
- f.puts "{ \"name\": \"My Preso\", \"sections\": [ {\"section\":\"#{dir}\"} ]}"
56
+ f.puts JSON.pretty_generate({ "name" => "My Preso", "sections" => [ { "section" => dir } ]})
51
57
  end
52
58
  end
53
59
  end
@@ -58,6 +64,10 @@ class ShowOffUtils
58
64
  ShowOffUtils.presentation_config_file = File.basename(config)
59
65
  end
60
66
 
67
+ # Create asset directories
68
+ FileUtils.mkdir_p('_files/share')
69
+ FileUtils.mkdir_p('_images')
70
+
61
71
  self.showoff_sections('.').each do |filename|
62
72
  next if File.exist? filename
63
73
 
@@ -138,8 +148,8 @@ class ShowOffUtils
138
148
  # [content] slide content. Currently, if this is an array, it will make a bullet list. Otherwise
139
149
  # the string value of this will be put in the slide as-is
140
150
  def self.make_slide(title,classes="",content=nil)
141
- slide = "!SLIDE #{classes}\n"
142
- slide << "# #{title} #\n"
151
+ slide = "<!SLIDE #{classes}>\n"
152
+ slide << "# #{title}\n"
143
153
  slide << "\n"
144
154
  if content
145
155
  if content.kind_of? Array
@@ -152,13 +162,13 @@ class ShowOffUtils
152
162
  end
153
163
 
154
164
  TYPES = {
155
- :default => lambda { |t,size,source,type| make_slide(t,"#{size} #{type}",source) },
156
- 'title' => lambda { |t,size,dontcare| make_slide(t,size) },
157
- 'bullets' => lambda { |t,size,dontcare| make_slide(t,"#{size} bullets incremental",["bullets","go","here"])},
158
- 'smbullets' => lambda { |t,size,dontcare| make_slide(t,"#{size} smbullets incremental",["bullets","go","here","and","here"])},
159
- 'code' => lambda { |t,size,src| make_slide(t,size,blank?(src) ? " @@@ Ruby\n code_here()" : src) },
160
- 'commandline' => lambda { |t,size,dontcare| make_slide(t,"#{size} commandline"," $ command here\n output here")},
161
- 'full-page' => lambda { |t,size,dontcare| make_slide(t,"#{size} full-page","![Image Description](image/ref.png)")},
165
+ :default => lambda { |t,size,source,type| make_slide(t,"#{size} #{type}",source) },
166
+ 'title' => lambda { |t,size,dontcare| make_slide(t,size) },
167
+ 'bullets' => lambda { |t,size,dontcare| make_slide(t,"#{size} bullets incremental",["bullets","go","here"])},
168
+ 'smbullets' => lambda { |t,size,dontcare| make_slide(t,"#{size} smbullets incremental",["bullets","go","here","and","here"])},
169
+ 'code' => lambda { |t,size,src| make_slide(t,size,blank?(src) ? " @@@ Ruby\n code_here()" : src) },
170
+ 'commandline' => lambda { |t,size,dontcare| make_slide(t,"#{size} commandline"," $ command here\n output here")},
171
+ 'full-page' => lambda { |t,size,dontcare| make_slide(t,"#{size} full-page","![Image Description](image/ref.png)")},
162
172
  }
163
173
 
164
174
 
@@ -187,7 +197,7 @@ class ShowOffUtils
187
197
  type = options[:type] || :default
188
198
  slide = TYPES[type].call(title,size,source)
189
199
 
190
- if options[:dir]
200
+ if options[:name]
191
201
  filename = determine_filename(options[:dir],options[:name],options[:number])
192
202
  write_file(filename,slide)
193
203
  else
@@ -233,27 +243,29 @@ class ShowOffUtils
233
243
  end
234
244
 
235
245
  def self.determine_filename(slide_dir,slide_name,number)
236
- filename = "#{slide_dir}/#{slide_name}.md"
246
+ raise "Slide name is required" unless slide_name
247
+
237
248
  if number
238
- max = find_next_number(slide_dir)
239
- filename = "#{slide_dir}/#{max}_#{slide_name}.md"
249
+ next_num = find_next_number(slide_dir)
250
+ slide_name = "#{next_num}_#{slide_name}"
240
251
  end
252
+
253
+ if slide_dir
254
+ filename = "#{slide_dir}/#{slide_name}.md"
255
+ else
256
+ filename = "#{slide_name}.md"
257
+ end
258
+
241
259
  filename
242
260
  end
243
261
 
244
262
  # Finds the next number in the given dir to
245
263
  # name a slide as the last slide in the dir.
246
264
  def self.find_next_number(slide_dir)
247
- max = 0
248
- Dir.open(slide_dir).each do |file|
249
- if file =~ /(\d+).*\.md/
250
- num = $1.to_i
251
- max = num if num > max
252
- end
253
- end
254
- max += 1
255
- max = "0#{max}" if max < 10
256
- max
265
+ slide_dir ||= '.'
266
+ next_num = Dir.glob("#{slide_dir}/*.md").size + 1
267
+
268
+ sprintf("%02d", next_num)
257
269
  end
258
270
 
259
271
  def self.determine_title(title,slide_name,code)
@@ -274,8 +286,8 @@ class ShowOffUtils
274
286
  size = "small" if lines > 15
275
287
  size = "smaller" if width > 57
276
288
  size = "smaller" if lines > 19
277
- puts "warning, some lines are too long and the code may be cut off" if width > 65
278
- puts "warning, your code is too long and the code may be cut off" if lines > 23
289
+ puts "WARNING: some lines are too long and might be truncated" if width > 65
290
+ puts "WARNING: your code is too long and may not fit on a slide" if lines > 23
279
291
  size
280
292
  end
281
293
 
@@ -330,10 +330,7 @@
330
330
  height: 100%;
331
331
  padding: 0 1em;
332
332
  display: block;
333
- }
334
-
335
- #notes > :first-child:before {
336
- display: none;
333
+ position: relative;
337
334
  }
338
335
 
339
336
  #notes ul.section-selector {
@@ -820,33 +820,41 @@ form .element {
820
820
  *** Callouts ***
821
821
  **********************/
822
822
 
823
- .callout {
824
- padding: 12px;
825
- line-height: 1.6em;
826
- border: 1px solid #222;
827
- border-radius: 4px;
828
- background-color: transparent; /* because there's a warning class with a red background */
829
- }
830
-
831
- .callout:before {
832
- font-family: FontAwesome;
833
- font-style: normal;
834
- font-weight: normal;
835
- font-size: 2em;
836
- text-decoration: inherit;
837
- padding: 0 8px 100% 8px;
838
- float: left;
839
- }
840
-
841
- .callout.info:before { content: "\f05a"; } /* fa-info-circle */
842
- .callout.warning:before { content: "\f071"; } /* fa-exclamation-triangle */
843
- .callout.question:before { content: "\f059"; } /* fa-question-circle */
844
- .callout.exercise:before { content: "\f41b"; } /* fa-pencil-square */
845
- .callout.stop:before { content: "\f05e"; } /* fa-ban */
823
+ .callout {
824
+ padding: 1em;
825
+ line-height: 1.2em;
826
+ border: 1px solid #222;
827
+ border-radius: 4px;
828
+ background-color: transparent; /* because there's a warning class with a red background */
829
+ }
846
830
 
847
- /**********************
848
- *** end callouts ***
849
- **********************/
831
+ .callout:before {
832
+ font-family: FontAwesome;
833
+ font-style: normal;
834
+ font-weight: normal;
835
+ font-size: 2em;
836
+ text-decoration: inherit;
837
+ position: absolute;
838
+ left: 1em;
839
+ }
840
+
841
+ .callout.info,
842
+ .callout.warning,
843
+ .callout.question,
844
+ .callout.exercise,
845
+ .callout.stop {
846
+ padding-left: 3em;
847
+ }
848
+
849
+ .callout.info:before { content: "\f05a"; } /* fa-info-circle */
850
+ .callout.warning:before { content: "\f071"; } /* fa-exclamation-triangle */
851
+ .callout.question:before { content: "\f059"; } /* fa-question-circle */
852
+ .callout.exercise:before { content: "\f41b"; } /* fa-pencil-square */
853
+ .callout.stop:before { content: "\f05e"; } /* fa-ban */
854
+
855
+ /**********************
856
+ *** end callouts ***
857
+ **********************/
850
858
 
851
859
 
852
860
  /* Tiny mobile devices. Larger devices scale automatically. */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2016-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -180,7 +180,7 @@ executables:
180
180
  extensions: []
181
181
  extra_rdoc_files: []
182
182
  files:
183
- - README.rdoc
183
+ - README.md
184
184
  - Rakefile
185
185
  - LICENSE
186
186
  - bin/showoff
data/README.rdoc DELETED
@@ -1,128 +0,0 @@
1
- = Showoff Presentation Software
2
-
3
- Showoff is a Sinatra web app that reads simple configuration files for a
4
- presentation. It is sort of like a Keynote web app engine - think S5 +
5
- Slidedown. I am using it to do all my talks in 2010, because I have a deep
6
- hatred in my heart for Keynote and yet it is by far the best in the field.
7
-
8
- Showoff allows you to author your presentation slides in Markdown, then organize
9
- them with a <tt>showoff.json</tt> file. This file also contains metadata about
10
- the presentation, such as the title, any password protection, etc.
11
-
12
- Then you just run <tt>showoff serve</tt> in the presentation directory and open
13
- a browser window.
14
-
15
- Showoff's capabilities include:
16
-
17
- * Display content on slides including:
18
- * formatted text and images
19
- * syntax highlighted code
20
- * bullets with incremental advancing
21
- * simple slide transitions (instant, fade, slide in)
22
- * replayed command line interactions
23
-
24
- * Live presenter tools:
25
- * presenter view that display notes, tree representation of presentation, and other tools
26
- * execute Javascript, Coffeescript or Ruby live and display results
27
- * show a pre-show slideshow while you wait to start
28
- * let audience members download slides, code samples or other supplementary material
29
- * show a timer - elapsed / remaining
30
- * show synchronized, hidden notes on another browser (like an iphone)
31
-
32
- * Live audience tools:
33
- * audience can pull up the presentation on their own browsers
34
- * call up a menu of sections/slides at any time to jump around
35
- * independent navigation so that audience members can go back / catch up as you talk
36
- * allow viewers to set their view of the presentation to track the presenter's
37
- * allow the audience to provide pace feedback and ask questions of the presenter
38
- * allow the audience to provide contend feedback on the material
39
-
40
- * Content creation and distribution functionality:
41
- * generate supplemental material based on slide tags
42
- * generate printed versions of the presentation including handout notes
43
- * password protect any URL path to keep control over different views of content
44
- * Automatically generate a Table of Contents
45
-
46
- Due to it being plain text, you can easily version control it, you can easily move
47
- sections between presentations, and you can rearrange or remove sections easily.
48
-
49
- Please see the documentation in <tt>./documentation</tt> for further information.
50
-
51
- = Real World Usage
52
-
53
- So far, Showoff has been used in the following presentations (and many others):
54
-
55
- * LinuxConf.au 2010 - Wrangling Git - Scott Chacon
56
- http://github.com/schacon/showoff-wrangling-git
57
- * SF Ruby Meetup - Resque! - Chris Wanstrath
58
- http://github.com/defunkt/sfruby-meetup-resque
59
- * RORO Sydney Talk, Feb 2010 - Beyond Actions - Dave Bolton
60
- http://github.com/lightningdb/roro-syd-beyond-actions
61
- * LRUG's February meeting - Showing Off with Ruby - Joel Chippindale
62
- http://github.com/mocoso/showing-off-with-ruby
63
- * PyCon 2010 - Hg and Git; Can't we all just get along? - Scott Chacon
64
- http://github.com/schacon/pycon-hg-git
65
- * PdxJs Tech Talk - Asynchronous Coding For My Tiny Ruby Brain - Rick Olson
66
- http://github.com/technoweenie/pdxjs-twitter-node
67
- * RORO Perth Talk - Rails 3; A Brief Introduction Darcy Laycock
68
- http://github.com/Sutto/roro-perth-rails-3
69
- * PDXRB Tech Talk - Here's Sinatra - Jesse Cooke
70
- http://github.com/jc00ke/pdxrb_sinatra
71
- * Red Dirt Ruby Conference May 2010 - Plain Old Tokyo Storage - Jeremy Hinegardner
72
- http://github.com/copiousfreetime/plain-old-tokyo-storage-presentation
73
- http://plain-old-tokyo-storage.heroku.com/
74
- * Lambda Lounge and StrangeLoop 2010 - JavaScript Functions : The Good Parts - Idioms for Encapsulation and Inheritance - Scott Bale
75
- http://github.com/scottbale/JavaScript-Function-Idioms
76
- * Open Source Bridge 2010 - Creating a low-cost clustered virtualization environment w/ Ganeti - Lance Albertson
77
- http://github.com/ramereth/presentation-ganeti
78
- * RailsConf 2010 - Domain-driven Test-assisted Production Rails Crisis Interventions - Rick Bradley
79
- http://railsconf2010.rickbradley.com/ http://github.com/rick/presentation_railsconf_2010
80
- * WebWorkersCamp - 25 promising projects in 50 minutes - Bruno Michel
81
- http://github.com/nono/Presentations/tree/master/20100703_25_promising_projects_in_50_minutes/
82
- * 11th Libre Software Meeting 2010 - Ruby 1.9, The future of Ruby? - Bruno Michel
83
- http://github.com/nono/Presentations/tree/master/20100708_RMLL_Ruby_1.9/
84
- * Lone Star PHP 2011 - Drupal - Chris Christensen
85
- https://github.com/christianchristensen/Presentations/tree/master/20110611-lonestarphp-drupal
86
- * Railsbridge Open Workshops - Sarah Allen, Sarah Mei, and Alex Chaffee
87
- http://github.com/alexch/workshop
88
- * SDRuby Lightning Talk - Readable Regexps - Ian Young
89
- https://github.com/iangreenleaf/sdruby-lightningtalk-tregexp
90
- * Disney HTML5 Summit 2011 - Polyfills: Shims and Shivs - Josh Dzielak
91
- https://github.com/dzello/shims_and_shivs
92
- * All PuppetLabs training from Summer 2012 on and many internal & external presentations
93
-
94
-
95
- If you use it for something, please let me know so I can add it.
96
-
97
- = Future Plans
98
-
99
- I really want this to evolve into a dynamic presentation software server,
100
- that gives the audience a lot of interaction into the presentation -
101
- helping them decide dynamically what the content of the presentation is,
102
- ask questions without interupting the presenter, etc. I want the audience
103
- to be able to download a dynamically generated PDF of either the actual
104
- talk that was given, or all the available slides, plus supplementary
105
- material. And I want the presenter (me) to be able to push each
106
- presentation to Heroku or GitHub pages for archiving super easily.
107
-
108
- Potential future capabilities might include:
109
-
110
- * perform simple animations of images moving between keyframes
111
- * let audience members vote on sections (?)
112
- * broadcast itself on Bonjour
113
- * let you write on the slide with your mouse, madden-style via canvas
114
- * automatically resize text to fit screen [see Alex's shrink.js]
115
-
116
- = Why Not S5 or Slidy or Slidedown?
117
-
118
- S5 and Slidy are really cool, and I was going to use them, but mainly I wanted
119
- something more dynamic. I wanted Slidy + Slidedown, where I could write my
120
- slideshows in a structured format in sections, where the sections could easily
121
- be moved around and between presentations and could be written in Markdown. I
122
- also like the idea of having interactive presentation system and didn't need
123
- half the features of S5/Slidy (style based print view, auto-scaling, themes,
124
- etc).
125
-
126
- = Contributing
127
-
128
- See the CONTRIB.txt file for how to contribute to this project