showoff-alexch 0.7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/LICENSE +20 -0
  2. data/README.rdoc +558 -0
  3. data/Rakefile +27 -0
  4. data/bin/showoff +197 -0
  5. data/lib/commandline_parser.rb +67 -0
  6. data/lib/showoff.rb +510 -0
  7. data/lib/showoff_utils.rb +344 -0
  8. data/public/css/960.css +653 -0
  9. data/public/css/fg.menu.css +114 -0
  10. data/public/css/onepage.css +60 -0
  11. data/public/css/pdf.css +12 -0
  12. data/public/css/presenter.css +76 -0
  13. data/public/css/reset.css +53 -0
  14. data/public/css/sh_style.css +66 -0
  15. data/public/css/showoff.css +399 -0
  16. data/public/css/spinner_bar.gif +0 -0
  17. data/public/css/theme/images/ui-bg_diagonals-small_100_f0efea_40x40.png +0 -0
  18. data/public/css/theme/images/ui-bg_flat_35_f0f0f0_40x100.png +0 -0
  19. data/public/css/theme/images/ui-bg_glass_55_fcf0ba_1x400.png +0 -0
  20. data/public/css/theme/images/ui-bg_glow-ball_25_2e2e28_600x600.png +0 -0
  21. data/public/css/theme/images/ui-bg_highlight-soft_100_f0efea_1x100.png +0 -0
  22. data/public/css/theme/images/ui-bg_highlight-soft_25_327E04_1x100.png +0 -0
  23. data/public/css/theme/images/ui-bg_highlight-soft_25_5A9D1A_1x100.png +0 -0
  24. data/public/css/theme/images/ui-bg_highlight-soft_95_ffedad_1x100.png +0 -0
  25. data/public/css/theme/images/ui-bg_inset-soft_22_3b3b35_1x100.png +0 -0
  26. data/public/css/theme/images/ui-icons_808080_256x240.png +0 -0
  27. data/public/css/theme/images/ui-icons_8DC262_256x240.png +0 -0
  28. data/public/css/theme/images/ui-icons_cd0a0a_256x240.png +0 -0
  29. data/public/css/theme/images/ui-icons_e7e6e4_256x240.png +0 -0
  30. data/public/css/theme/images/ui-icons_eeeeee_256x240.png +0 -0
  31. data/public/css/theme/images/ui-icons_ffffff_256x240.png +0 -0
  32. data/public/css/theme/ui.accordion.css +9 -0
  33. data/public/css/theme/ui.all.css +2 -0
  34. data/public/css/theme/ui.base.css +9 -0
  35. data/public/css/theme/ui.core.css +37 -0
  36. data/public/css/theme/ui.datepicker.css +62 -0
  37. data/public/css/theme/ui.dialog.css +13 -0
  38. data/public/css/theme/ui.progressbar.css +4 -0
  39. data/public/css/theme/ui.resizable.css +13 -0
  40. data/public/css/theme/ui.slider.css +17 -0
  41. data/public/css/theme/ui.tabs.css +9 -0
  42. data/public/css/theme/ui.theme.css +245 -0
  43. data/public/favicon.ico +0 -0
  44. data/public/js/coffee-script.js +8 -0
  45. data/public/js/core.js +79 -0
  46. data/public/js/fg.menu.js +645 -0
  47. data/public/js/jTypeWriter.js +26 -0
  48. data/public/js/jquery-1.4.2.min.js +154 -0
  49. data/public/js/jquery-print.js +109 -0
  50. data/public/js/jquery.batchImageLoad.js +56 -0
  51. data/public/js/jquery.cookie.js +96 -0
  52. data/public/js/jquery.cycle.all.js +1284 -0
  53. data/public/js/jquery.doubletap-0.1.js +105 -0
  54. data/public/js/jquery.uuid.js +24 -0
  55. data/public/js/jquery.ws-0.3pre.js +201 -0
  56. data/public/js/onepage.js +5 -0
  57. data/public/js/presenter.js +193 -0
  58. data/public/js/sh_lang/sh_bison.min.js +1 -0
  59. data/public/js/sh_lang/sh_c.min.js +1 -0
  60. data/public/js/sh_lang/sh_caml.min.js +1 -0
  61. data/public/js/sh_lang/sh_changelog.min.js +1 -0
  62. data/public/js/sh_lang/sh_coffeescript.min.js +1 -0
  63. data/public/js/sh_lang/sh_cpp.min.js +1 -0
  64. data/public/js/sh_lang/sh_csharp.min.js +1 -0
  65. data/public/js/sh_lang/sh_css.min.js +1 -0
  66. data/public/js/sh_lang/sh_cucumber.min.js +2 -0
  67. data/public/js/sh_lang/sh_desktop.min.js +1 -0
  68. data/public/js/sh_lang/sh_diff.min.js +1 -0
  69. data/public/js/sh_lang/sh_erlang.min.js +1 -0
  70. data/public/js/sh_lang/sh_flex.min.js +1 -0
  71. data/public/js/sh_lang/sh_glsl.min.js +1 -0
  72. data/public/js/sh_lang/sh_haxe.min.js +1 -0
  73. data/public/js/sh_lang/sh_html.min.js +1 -0
  74. data/public/js/sh_lang/sh_java.min.js +1 -0
  75. data/public/js/sh_lang/sh_javascript.min.js +1 -0
  76. data/public/js/sh_lang/sh_javascript_dom.min.js +1 -0
  77. data/public/js/sh_lang/sh_latex.min.js +1 -0
  78. data/public/js/sh_lang/sh_ldap.min.js +1 -0
  79. data/public/js/sh_lang/sh_log.min.js +1 -0
  80. data/public/js/sh_lang/sh_lsm.min.js +1 -0
  81. data/public/js/sh_lang/sh_m4.min.js +1 -0
  82. data/public/js/sh_lang/sh_makefile.min.js +1 -0
  83. data/public/js/sh_lang/sh_oracle.min.js +1 -0
  84. data/public/js/sh_lang/sh_pascal.min.js +1 -0
  85. data/public/js/sh_lang/sh_perl.min.js +1 -0
  86. data/public/js/sh_lang/sh_php.min.js +1 -0
  87. data/public/js/sh_lang/sh_prolog.min.js +1 -0
  88. data/public/js/sh_lang/sh_properties.min.js +1 -0
  89. data/public/js/sh_lang/sh_python.min.js +1 -0
  90. data/public/js/sh_lang/sh_ruby.min.js +1 -0
  91. data/public/js/sh_lang/sh_scala.min.js +1 -0
  92. data/public/js/sh_lang/sh_sh.min.js +1 -0
  93. data/public/js/sh_lang/sh_slang.min.js +1 -0
  94. data/public/js/sh_lang/sh_sml.min.js +1 -0
  95. data/public/js/sh_lang/sh_spec.min.js +1 -0
  96. data/public/js/sh_lang/sh_sql.min.js +1 -0
  97. data/public/js/sh_lang/sh_tcl.min.js +1 -0
  98. data/public/js/sh_lang/sh_xml.min.js +1 -0
  99. data/public/js/sh_lang/sh_xorg.min.js +1 -0
  100. data/public/js/sh_main.min.js +4 -0
  101. data/public/js/showoff.js +643 -0
  102. data/public/js/showoffcore.js +13 -0
  103. data/views/header.erb +40 -0
  104. data/views/index.erb +46 -0
  105. data/views/onepage.erb +34 -0
  106. data/views/presenter.erb +70 -0
  107. metadata +245 -0
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Scott Chacon
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,558 @@
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
+ The idea is that you setup your markdown slide files in section subdirectories
9
+ and then startup the showoff server in that directory. It will read in your
10
+ <tt>showoff.json</tt> file for which sections go in which order and then will give
11
+ you a URL to present from.
12
+
13
+ It can:
14
+
15
+ * show simple text
16
+ * show images
17
+ * show syntax highlighted code
18
+ * bullets with incremental advancing
19
+ * re-enact command line interactions
20
+ * call up a menu of sections/slides at any time to jump around
21
+ * execute Javascript, Coffeescript or Ruby live and display results
22
+ * do simple transitions (instant, fade, slide in)
23
+ * show a pre-show slideshow while you wait to start
24
+
25
+ It might will can:
26
+
27
+ * show a timer - elapsed / remaining
28
+ * perform simple animations of images moving between keyframes
29
+ * show synchronized, hidden notes on another browser (like an iphone)
30
+ * show audience questions / comments (twitter or direct)
31
+ * let audience members go back / catch up as you talk
32
+ * let audience members vote on sections (?)
33
+ * broadcast itself on Bonjour
34
+ * let audience members download slides, code samples or other supplementary material
35
+ * let you write on the slide with your mouse, madden-style via canvas
36
+ * automatically resize text to fit screen [see Alex's shrink.js]
37
+
38
+ Some of the nice things are that you can easily version control it, you
39
+ can easily move sections between presentations, and you can rearrange or
40
+ remove sections easily.
41
+
42
+ = Usage
43
+
44
+ ShowOff is meant to be run in a ShowOff formatted repository - that means that
45
+ it has a <tt>showoff.json</tt> file and a number of sections (subdirectories) with
46
+ markdown files for the slides you're presenting.
47
+
48
+ $ gem install showoff
49
+ $ git clone (showoff-repo)
50
+ $ cd (showoff-repo)
51
+ $ showoff serve
52
+
53
+ If you run 'showoff' in the example subdirectory of ShowOff itself, it will
54
+ show an example presentation, so you can see what it's like.
55
+
56
+ You can also run 'showoff serve' inside a section subdirectory. If there is no
57
+ <tt>showoff.json</tt> file then it will make its best guess, creating a presentation
58
+ from all `.md` files in alphabetical order in the given (or current)
59
+ directory.
60
+
61
+ = Slide Format
62
+
63
+ You can break your slides up into sections of however many subdirectories deep
64
+ you need. ShowOff will recursively check all the directories mentioned in
65
+ your <tt>showoff.json</tt> file for any markdown files (.md). Each markdown file can
66
+ have any number of slides in it, separating each slide with the '!SLIDE'
67
+ keyword and optional slide styles.
68
+
69
+ For example, if you run 'showoff create my_new_pres' it will create a new
70
+ starter presentation for you with one .md file at one/slide.md which will have
71
+ the following contents:
72
+
73
+ !SLIDE
74
+
75
+ # My Presentation #
76
+
77
+ !SLIDE bullets incremental transition=fade
78
+
79
+ # Bullet Points #
80
+
81
+ * first point
82
+ * second point
83
+ * third point
84
+
85
+ That represents two slides, the first contains just a large title, and the
86
+ second is faded into view showing the title and three bullets that are then
87
+ incrementally shown. In order for ShowOff to see those slides, your
88
+ <tt>showoff.json</tt> file needs to look something like this:
89
+
90
+ {
91
+ "name": "Something",
92
+ "description": "Example Presentation",
93
+ "sections": [
94
+ {"section":"one"}
95
+ ]
96
+ }
97
+
98
+ If you have multiple sections in your talk, you can make this json array
99
+ include all the sections you want to show in which order you want to show
100
+ them.
101
+
102
+ Instead of a hash, you can use a plain string as an entry in the `sections`
103
+ section of `showoff.json`.
104
+
105
+ And if that plain string starts with '#' then it is interpreted not as a
106
+ filename, but as markdown. This is used for inserting interstitial slides
107
+ or notes -- for instance, Alex Chaffee's
108
+ [Ruby Notes](http://github.com/alexch/ruby_notes)
109
+ uses it to insert lab instructions between lecture slide sections, which may
110
+ vary from venue to venue.
111
+
112
+ If you want to keep the ability to emit an HTML document from your
113
+ Markdown source file -- say, for a TextMate preview or a GitHub rendering
114
+ -- you can use angle brackets around the `!SLIDE` keyword and styles, e.g.
115
+
116
+ <!SLIDE bullets incremental transition=fade>
117
+
118
+ Some useful styles for each slide are:
119
+
120
+ * center - centers images on a slide
121
+ * full-page - allows an image to take up the whole slide
122
+ * bullets - sizes and separates bullets properly (fits up to 5, generally)
123
+ * smbullets - sizes and separates more bullets (smaller, closer together)
124
+ * subsection - creates a different background for titles
125
+ * command - monospaces h1 title slides
126
+ * commandline - for pasted commandline sections (needs leading '$' for commands, then output on subsequent lines)
127
+ * code - monospaces everything on the slide
128
+ * incremental - can be used with 'bullets' and 'commandline' styles, will incrementally update elements on arrow key rather than switch slides
129
+ * small - make all slide text 80%
130
+ * smaller - make all slide text 70%
131
+ * execute - on Javascript, Coffeescript and Ruby highlighted code slides, you can click on the code to execute it and display the results on the slide
132
+
133
+ Check out the example directory included to see examples of most of these.
134
+
135
+ Transitions can be supplied through the use of transition=tname on the !SLIDE
136
+ definition, where tname is one of the following supported transitions:
137
+
138
+ * blindX
139
+ * blindY
140
+ * blindZ
141
+ * cover
142
+ * curtainX
143
+ * curtainY
144
+ * fade
145
+ * fadeZoom
146
+ * growX
147
+ * growY
148
+ * none (this is the default)
149
+ * scrollUp
150
+ * scrollDown
151
+ * scrollLeft
152
+ * scrollRight
153
+ * scrollHorz
154
+ * scrollVert
155
+ * shuffle
156
+ * slideX
157
+ * slideY
158
+ * toss
159
+ * turnUp
160
+ * turnDown
161
+ * turnLeft
162
+ * turnRight
163
+ * uncover
164
+ * wipe
165
+ * zoom
166
+
167
+ The transitions are provided by jQuery Cycle plugin. See http://www.malsup.com/jquery/cycle/browser.html to view the effects and http://www.malsup.com/jquery/cycle/adv2.html for how to add custom effects.
168
+
169
+ You can manage the presentation with the following keys:
170
+
171
+ * space, cursor right: next slide
172
+ * shift-space, cursor left: previous slide
173
+ * d: debug mode
174
+ * c, t: table of contents (vi)
175
+ * f: toggle footer
176
+ * z, ?: toggle help
177
+ * p: toggle preshow
178
+
179
+ = Showing plain old markdown
180
+
181
+ If a markdown file has no !SLIDE keywords, then showoff will treat every line
182
+ beginning with a single hash -- i.e. every H1 -- as a new slide in "bullets"
183
+ style. Remember that you can't specify classes or transitions in this mode,
184
+ and as soon as you add one !SLIDE you need them everywhere.
185
+
186
+ = Preshow
187
+
188
+ If you want to show a slideshow while you wait to speak, you can run a preshow. Add a +_preshow+ directory
189
+ to your project (I use a symlink, so I don't have to add all the images into Git), put a bunch of images in the +_preshow+ directory and optionally add a +preshow+.+json+ file that provides descriptions for any of the images.
190
+ If you then press 'p' at the beginning of your presentation, it will prompt you for a number of minutes until
191
+ you start. Then it will count down the time until then, flipping through your pictures to entertain the
192
+ audience in the meantime. Press 'p' again to stop, or wait until the timer runs out.
193
+
194
+ = Custom JavaScript
195
+
196
+ To insert custom JavaScript into your presentation you can either place it into
197
+ a file (with extension .js) into the root directory of your presentation or you
198
+ can embed a <+script+> element directly into your slides. This JavaScript will be
199
+ executed—as usually—as soon as it is loaded.
200
+
201
+ If you want to trigger some JavaScript as soon as a certain page is shown or
202
+ when you switch to the next or previous slide, you can bind a callback to a
203
+ custom event:
204
+
205
+ * *showoff:show* will be triggered as soon as you enter a page
206
+ * *showoff:next* will be triggered when you switch to the next page
207
+ * *showoff:prev* will be triggered when you switch to the previous page
208
+
209
+ These events are triggered on the "div.content" child of the slide, so you must
210
+ add a custom and unique class to your SLIDE to identify it:
211
+
212
+ !SLIDE custom_and_unique_class
213
+ # 1st Example h1
214
+ <script>
215
+ // bind to custom event
216
+ $(".custom_and_unique_class").bind("showoff:show", function (event) {
217
+ // animate the h1
218
+ var h1 = $(event.target).find("h1");
219
+ h1.delay(500)
220
+ .slideUp(300, function () { $(this).css({textDecoration: "line-through"}); })
221
+ .slideDown(300);
222
+ });
223
+ </script>
224
+
225
+ This will bind an event handler for *showoff:show* to your slide. The
226
+ h1-element will be animated, as soon as this event is triggered on that slide.
227
+
228
+ If you bind an event handler to the custom events *showoff:next* or
229
+ *showoff:prev*, you can prevent the default action (that is switching to the
230
+ appropriate slide) by calling *event.preventDefault()*:
231
+
232
+ !SLIDE prevent_default
233
+ # 2nd Example h1
234
+ <script>
235
+ $(".prevent_default").bind("showoff:next", function (event) {
236
+ var h1 = $(event.target).find("h1");
237
+ if (h1.css("text-decoration") === "none") {
238
+ event.preventDefault();
239
+ h1.css({textDecoration: "line-through"})
240
+ }
241
+ });
242
+ </script>
243
+
244
+ This will bind an event handler for *showoff:next* to your slide. When you press
245
+ the right arrow key the first time, the h1-element will be decorated. When you
246
+ press the right array key another time, you will switch to the next slide.
247
+
248
+ The same applies to the *showoff:prev* event, of course.
249
+
250
+
251
+ = Custom Stylesheets
252
+
253
+ To insert custom Stylesheets into your presentation you can either place it into
254
+ a file (with extension .css) into the root directory of your presentation or
255
+ you can embed a <+link+> element directly into your slides. This stylesheet will
256
+ be applied as soon as it is loaded.
257
+
258
+ The content generated by the slide is wrapped with a +div+ with the class .+content+ like this.
259
+
260
+ <div ref="intro/01_slide/1" class="content" style="margin-top: 210px;">
261
+ <h1>jQuery &amp; Sinatra</h1>
262
+ <h2>A Classy Combination</h2>
263
+ </div>
264
+
265
+ This makes the .+content+ tag a perfect place to add additional styling if that
266
+ is your preference. An example of adding some styling is here.
267
+
268
+ .content {
269
+ color: black;
270
+ font-family: helvetica, arial;
271
+ }
272
+ h1, h2 {
273
+ color: rgb(79, 180, 226);
274
+ font-family: Georgia;
275
+ }
276
+ .content::after {
277
+ position: absolute;
278
+ right: 120px;
279
+ bottom: 120px;
280
+ content: url(jay_small.png);
281
+ }
282
+
283
+ Note that the example above uses CSS3 styling with ::+after+ and the +content+
284
+ -attribute to add an image to the slides.
285
+
286
+ = Language highlighting
287
+
288
+ Showoff uses {shjs}[http://shjs.sourceforge.net/] to highlight code blocks.
289
+ If you begin a code block with three @-signs followed by a
290
+ {programming language name}[http://shjs.sourceforge.net/doc/documentation.html],
291
+ that line will be stripped and the rest of the block will become sparkly
292
+ and colorful.
293
+
294
+ @@@ ruby
295
+ 10.times { puts "Whee!" }
296
+
297
+ = Custom Ruby Files
298
+
299
+ If you want to have executable Ruby code on your slides you must set the
300
+ environment variable ENV['SHOWOFF_EVAL_RUBY']. This can be done with
301
+
302
+ export SHOWOFF_EVAL_RUBY=1
303
+
304
+ or
305
+
306
+ # On Heroku
307
+ heroku config:add SHOWOFF_EVAL_RUBY=1
308
+
309
+
310
+ If you need supporting libraries when you evaluate the code. You can do this by
311
+ putting Ruby files (*.rb) into the root directory of the presentation then they
312
+ will be required when the presentation loads.
313
+
314
+ = Presenter Notes
315
+
316
+ Add a line that starts with .notes:
317
+
318
+ .notes my notes here
319
+
320
+ Toggle presenter notes with the n key while in the presentation.
321
+
322
+ = Editor integration
323
+
324
+ The "add slide" feature can allow you to add the necessary boilerplate from your editor. If you are using vim, you can
325
+
326
+ !showoff add -t code Check This Code
327
+
328
+ And your buffer will get
329
+
330
+ !SLIDE
331
+ # Check This Code #
332
+ @@@ Ruby
333
+ code_here()
334
+
335
+ added where your cursor was. Binding this to a keybinding can allow you to add new slides quickly.
336
+
337
+ = Command Line Interface
338
+
339
+ showoff command_name [command-specific options] [--] arguments...
340
+
341
+ * Use the command +help+ to get a summary of commands
342
+ * Use the command <tt>help command_name</tt> to get a help for +command_name+
343
+ * Use <tt>--</tt> to stop command line argument processing; useful if your arguments have dashes in them
344
+
345
+ == Commands
346
+ [<tt>add</tt>] Add a new slide at the end in a given dir
347
+ [<tt>create</tt>] Create new showoff presentation
348
+ [<tt>help</tt>] Shows list of commands or help for one command
349
+ [<tt>heroku</tt>] Setup your presentation to serve on Heroku
350
+ [<tt>github</tt>] Setup your presentation to serve on GitHub Pages
351
+ [<tt>serve</tt>] Serves the showoff presentation in the current directory (or a given dir)
352
+ [<tt>static</tt>] Generate static version of presentation
353
+
354
+
355
+ == <tt>showoff add [title]</tt>
356
+
357
+ Add a new slide at the end in a given dir
358
+
359
+ *Aliases*
360
+ * <tt><b>new</b></tt>
361
+
362
+ Outputs or creates a new slide. With -d and -n, a new slide is created in the given dir, numbered to appear
363
+ as the last slide in that dir (use -u to avoid numbering). Without those, outputs the slide markdown to
364
+ stdout (useful for shelling out from your editor). You may also specify a source file to use for a code
365
+ slide.
366
+
367
+ === options for add
368
+
369
+ These options are specified *after* the command.
370
+
371
+ [<tt>-d, --dir=dir</tt>] Slide dir (where to put a new slide file)
372
+ [<tt>-n, --name=basename</tt>] Slide name (name of the new slide file)
373
+ [<tt>-s, --source=path to file</tt>] Include code from the given file as the slide body
374
+ [<tt>-t, --style, --type=valid showoff style/type</tt>] Slide Type/Style <i>( default: <tt>title</tt>)</i>
375
+ [<tt>-u, --nonumber</tt>] Dont number the slide, use the given name verbatim
376
+
377
+
378
+ == <tt>showoff create dir_name</tt>
379
+
380
+ Create new showoff presentation
381
+
382
+ *Aliases*
383
+ * <tt><b>init</b></tt>
384
+
385
+ This command helps start a new showoff presentation by setting up the proper directory structure for you. It takes the directory name you would like showoff to create for you.
386
+
387
+ === options for create
388
+
389
+ These options are specified *after* the command.
390
+
391
+ [<tt>-d, --slidedir=arg</tt>] sample slide directory name <i>( default: <tt>one</tt>)</i>
392
+ [<tt>-n, --nosamples</tt>] Dont create sample slides
393
+
394
+
395
+ == <tt>showoff help [command]</tt>
396
+
397
+ Shows list of commands or help for one command
398
+
399
+
400
+ == <tt>showoff heroku heroku_name</tt>
401
+
402
+ Setup your presentation to serve on Heroku
403
+
404
+ Creates the Gemfile and config.ru file needed to push a showoff pres to heroku. It will then run heroku create for you to register the new project on heroku and add the remote for you. Then all you need to do is commit the new created files and run git push heroku to deploy.
405
+
406
+
407
+ == <tt>showoff github</tt>
408
+
409
+ Generates a static version of your site and puts it in a gh-pages branch for static serving on GitHub.
410
+
411
+ === options for github
412
+ These options are specified *after* the command.
413
+
414
+ [<tt>-f, --force</tt>] force overwrite of existing Gemfile/.gems and config.ru files if they exist
415
+ [<tt>-g, --dotgems</tt>] Use older-style .gems file instead of bundler-style Gemfile
416
+ [<tt>-p, --password=arg</tt>] add password protection to your heroku site
417
+
418
+
419
+ == <tt>showoff serve </tt>
420
+
421
+ Serves the showoff presentation in the current directory
422
+
423
+ ==== options for serve
424
+ These options are specified *after* the command.
425
+
426
+ [<tt>-f, --pres_file=arg</tt>] Presentation file <i>(default: <tt>showoff.json</tt>)</i>
427
+ [<tt>-h, --host=arg</tt>] Host or ip to run on <i>( default: <tt>localhost</tt>)</i>
428
+ [<tt>-p, --port=arg</tt>] Port on which to run <i>( default: <tt>9090</tt>)</i>
429
+
430
+
431
+ == <tt>showoff static name</tt>
432
+
433
+ Generate static version of presentation
434
+
435
+ = PDF Output
436
+
437
+ Showoff can produce a PDF version of your presentation. To do this, you must install a few things first:
438
+
439
+ gem install pdfkit
440
+
441
+ You'll then need to install a version of wkhtmltopdf available at the {wkhtmltopdf repo}[http://code.google.com/p/wkhtmltopdf/wiki/compilation] (or brew install wkhtmltopdf on a mac) and make sure that +wkhtmltopdf+ is in your path:
442
+
443
+ export $PATH="/location/to/my/wkhtmltopdf/0.9.9:$PATH"
444
+
445
+
446
+
447
+ Then restart showoff, and navigate to <tt>/pdf</tt> (e.g. http://localhost/pdf) of your presentation and a PDF will be generated with the browser.
448
+
449
+ = Completion
450
+
451
+ == ZSH completion
452
+ You can complete commands and options in ZSH, by installing a script:
453
+
454
+ mkdir -p $HOME/.zsh/Completion
455
+ cp script/_showoff $HOME/.zsh/Completion
456
+ echo 'fpath=(~/.zsh/Completion $fpath)' >> $HOME/.zshrc
457
+
458
+ == <tt>bash</tt> completion
459
+
460
+ You can complete commands for showoff by putting the following in your <tt>.bashrc</tt> (or whatever
461
+ you use when starting <tt>bash</tt>):
462
+
463
+ complete -F get_showoff_commands
464
+ function get_showoff_commands()
465
+ {
466
+ if [ -z $2 ] ; then
467
+ COMPREPLY=(`showoff help -c`)
468
+ else
469
+ COMPREPLY=(`showoff help -c $2`)
470
+ fi
471
+ }
472
+
473
+ = Real World Usage
474
+
475
+ So far, ShowOff has been used in the following presentations (and many others):
476
+
477
+ * LinuxConf.au 2010 - Wrangling Git - Scott Chacon
478
+ http://github.com/schacon/showoff-wrangling-git
479
+ * SF Ruby Meetup - Resque! - Chris Wanstrath
480
+ http://github.com/defunkt/sfruby-meetup-resque
481
+ * RORO Sydney Talk, Feb 2010 - Beyond Actions - Dave Bolton
482
+ http://github.com/lightningdb/roro-syd-beyond-actions
483
+ * LRUG's February meeting - Showing Off with Ruby - Joel Chippindale
484
+ http://github.com/mocoso/showing-off-with-ruby
485
+ * PyCon 2010 - Hg and Git; Can't we all just get along? - Scott Chacon
486
+ http://github.com/schacon/pycon-hg-git
487
+ * PdxJs Tech Talk - Asynchronous Coding For My Tiny Ruby Brain - Rick Olson
488
+ http://github.com/technoweenie/pdxjs-twitter-node
489
+ * RORO Perth Talk - Rails 3; A Brief Introduction Darcy Laycock
490
+ http://github.com/Sutto/roro-perth-rails-3
491
+ * PDXRB Tech Talk - Here's Sinatra - Jesse Cooke
492
+ http://github.com/jc00ke/pdxrb_sinatra
493
+ * Red Dirt Ruby Conference May 2010 - Plain Old Tokyo Storage - Jeremy Hinegardner
494
+ http://github.com/copiousfreetime/plain-old-tokyo-storage-presentation
495
+ http://plain-old-tokyo-storage.heroku.com/
496
+ * Lambda Lounge and StrangeLoop 2010 - JavaScript Functions : The Good Parts - Idioms for Encapsulation and Inheritance - Scott Bale
497
+ http://github.com/scottbale/JavaScript-Function-Idioms
498
+ * Open Source Bridge 2010 - Creating a low-cost clustered virtualization environment w/ Ganeti - Lance Albertson
499
+ http://github.com/ramereth/presentation-ganeti
500
+ * RailsConf 2010 - Domain-driven Test-assisted Production Rails Crisis Interventions - Rick Bradley
501
+ http://railsconf2010.rickbradley.com/ http://github.com/rick/presentation_railsconf_2010
502
+ * WebWorkersCamp - 25 promising projects in 50 minutes - Bruno Michel
503
+ http://github.com/nono/Presentations/tree/master/20100703_25_promising_projects_in_50_minutes/
504
+ * 11th Libre Software Meeting 2010 - Ruby 1.9, The future of Ruby? - Bruno Michel
505
+ http://github.com/nono/Presentations/tree/master/20100708_RMLL_Ruby_1.9/
506
+ * Lone Star PHP 2011 - Drupal - Chris Christensen
507
+ https://github.com/christianchristensen/Presentations/tree/master/20110611-lonestarphp-drupal
508
+ * Railsbridge Open Workshops - Sarah Allen, Sarah Mei, and Alex Chaffee
509
+ http://github.com/alexch/workshop
510
+ * SDRuby Lightning Talk - Readable Regexps - Ian Young
511
+ https://github.com/iangreenleaf/sdruby-lightningtalk-tregexp
512
+
513
+
514
+ If you use it for something, please let me know so I can add it.
515
+
516
+ = Editor Support
517
+
518
+ * TextMate Bundle - Showoff.tmdbundle - Dr Nic Williams
519
+ http://github.com/drnic/Showoff.tmbundle
520
+
521
+ * Emacs major-mode - showoff-mode - Nick Parker
522
+ http://github.com/developernotes/showoff-mode
523
+
524
+ = Future Plans
525
+
526
+ I really want this to evolve into a dynamic presentation software server,
527
+ that gives the audience a lot of interaction into the presentation -
528
+ helping them decide dynamically what the content of the presentation is,
529
+ ask questions without interupting the presenter, etc. I want the audience
530
+ to be able to download a dynamically generated PDF of either the actual
531
+ talk that was given, or all the available slides, plus supplementary
532
+ material. And I want the presenter (me) to be able to push each
533
+ presentation to Heroku or GitHub pages for archiving super easily.
534
+
535
+ = Why Not S5 or Slidy or Slidedown?
536
+
537
+ S5 and Slidy are really cool, and I was going to use them, but mainly I wanted
538
+ something more dynamic. I wanted Slidy + Slidedown, where I could write my
539
+ slideshows in a structured format in sections, where the sections could easily
540
+ be moved around and between presentations and could be written in Markdown. I
541
+ also like the idea of having interactive presentation system and didn't need
542
+ half the features of S5/Slidy (style based print view, auto-scaling, themes,
543
+ etc).
544
+
545
+ = Requirements
546
+
547
+ * Ruby (duh)
548
+ * Sinatra (and thus Rack)
549
+ * BlueCloth
550
+ * Nokogiri
551
+ * json
552
+ * GLI gem
553
+ * Firefox or Chrome to present
554
+ * PDFKit (optional, for generating PDF of presentation) https://github.com/jdpace/PDFKit
555
+
556
+ = Contributing
557
+
558
+ See the CONTRIB.txt file for how to contribute to this project