mg_showoff 0.5.1

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