Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add quickstart sample generation

  • Loading branch information...
commit 7b4c6277d6ce599be689b944f88f9ec43c1036d0 1 parent 8dbced1
@geraldb geraldb authored
View
0  History.rdoc → History.markdown
File renamed without changes
View
7 Manifest.txt
@@ -1,6 +1,6 @@
-History.rdoc
+History.markdown
Manifest.txt
-README.rdoc
+README.markdown
Rakefile
bin/slideshow
config/slideshow.builtin.yml
@@ -10,6 +10,7 @@ lib/slideshow/cli/commands/fetch.rb
lib/slideshow/cli/commands/gen.rb
lib/slideshow/cli/commands/gen_templates.rb
lib/slideshow/cli/commands/list.rb
+lib/slideshow/cli/commands/quick.rb
lib/slideshow/cli/opts.rb
lib/slideshow/cli/runner.rb
lib/slideshow/config.rb
@@ -47,3 +48,5 @@ templates/s6/screen.css
templates/slides.html.erb
templates/slides.pdf.html.erb
templates/style.css.erb
+templates/welcome.text
+templates/welcome.txt.quick
View
60 README.markdown
@@ -0,0 +1,60 @@
+# Slide Show (S9) - A Free Web Alternative to PowerPoint and KeyNote in Ruby
+
+* [`slideshow.rubyforge.org`](http://slideshow.rubyforge.org)
+
+## DESCRIPTION
+
+The Slide Show (S9) Ruby gem lets you create slide shows and author slides in plain text
+using a wiki-style markup language that's easy-to-write and easy-to-read.
+The Slide Show (S9) project also collects and welcomes themes and ships
+"out-of-the-gem" with built-in support for "loss-free" gradient vector graphics themes.
+
+## SYNOPSIS
+
+ Slide Show (S9) is a free web alternative to PowerPoint or KeyNote in Ruby
+
+ Usage: slideshow [options] name
+ -o, --output PATH Output Path (default is .)
+ -t, --template MANIFEST Template Manifest (default is s6.txt)
+ --h1 Set Header Level to 1 (default)
+ --h2 Set Header Level to 2
+ -f, --fetch URI Fetch Templates
+ -l, --list List Installed Templates
+ -c, --config PATH Configuration Path (default is ~/.slideshow)
+ -g, --generate Generate Slide Show Templates (using built-in S6 Pack)
+ -q, --quick Generate Quickstart Slide Show Sample
+ -v, --version Show version
+ --verbose Show debug trace
+ -h, --help Show this message
+
+ Examples:
+ slideshow microformats
+ slideshow microformats.text # Process slides using Markdown
+ slideshow microformats.textile # Process slides using Textile
+ slideshow microformats.rst # Process slides using reStructuredText
+ slideshow -o slides microformats # Output slideshow to slides folder
+
+ More examles:
+ slideshow -q # Generate quickstart slide show sample
+ slideshow -g # Generate slide show templates using built-in S6 pack
+
+ slideshow -l # List installed slide show templates
+ slideshow -f s5blank # Fetch (install) S5 blank starter template from internet
+ slideshow -t s5blank microformats # Use your own slide show templates (e.g. s5blank)
+
+
+## INSTALL
+
+Just install the gem:
+
+ $ gem install slideshow
+
+## QUESTION? COMMENTS?
+
+Send them along to the [Free Web Slide Show Alternatives (S5, S6, S9, Slidy And Friends) Forum/Mailing List](http://groups.google.com/group/webslideshow).
+Thanks!
+
+## LICENSE
+
+The `slideshow` scripts and templates are dedicated to the public domain.
+Use it as you please with no restrictions whatsoever.
View
63 README.rdoc
@@ -1,63 +0,0 @@
-= Slide Show (S9) - A Free Web Alternative to PowerPoint and KeyNote in Ruby
-
-* http://slideshow.rubyforge.org
-
-== DESCRIPTION:
-
-The Slide Show (S9) Ruby gem lets you create slide shows and author slides in plain text
-using a wiki-style markup language that's easy-to-write and easy-to-read.
-The Slide Show (S9) project also collects and welcomes themes and ships
-"out-of-the-gem" with built-in support for "loss-free" gradient vector graphics themes.
-
-== SYNOPSIS:
-
- Usage: slideshow [options] name
- -o, --output PATH Output Path
- -g, --generate Generate Slide Show Templates (Using Built-In S6 Pack)
- -t, --template MANIFEST Template Manifest
- -f, --fetch URI Fetch Templates
- -c, --config PATH Configuration Path (default is ~/.slideshow)
- -l, --list List Installed Templates
- -v, --verbose Show debug trace
- -h, --help Show this message
-
-Examples:
-
- slideshow microformats
- slideshow microformats.textile # Process slides using Textile
- slideshow microformats.text # Process slides using Markdown
- slideshow microformats.rst # Process slides using reStructuredText (*see Requirements)
-
- slideshow -o slides microformats # Output slideshow to slides folder
-
-More examles:
-
- slideshow -g # Generate slide show templates using built-in S6 pack
-
- slideshow -l # List installed slide show templates
- slideshow -f s5blank # Fetch (install) S5 blank starter template from internet
- slideshow -t s5blank.txt microformats # Use your own slide show templates (e.g. s5blank)
-
-
-== REQUIREMENTS:
-
-* RedCloth (Textile Markup)
-* Kramdown (Markdown Markup)
-
-* BlueCloth (Markdown Markup) [Optional]
-* RDiscount (Markdown Markup) [Optional]
-* pandoc-ruby (Markdown/reStructuredText Markup) [Optional]
-
-* Coderay (Syntax Highlighting) [Optional]
-* Ultraviolet (Syntax Highlighting) [Optional]
-
-
-== INSTALL:
-
-Just install the gem:
-
- $ sudo gem install slideshow
-
-== LICENSE:
-
-The slide show scripts and templates are dedicated to the public domain. Use it as you please with no restrictions whatsoever.
View
6 Rakefile
@@ -20,9 +20,9 @@ Hoe.spec 'slideshow' do
['pakman','>= 0.1.0']
]
- # switch extension to .rdoc for gihub formatting
- self.readme_file = 'README.rdoc'
- self.history_file = 'History.rdoc'
+ # switch extension to .markdown for gihub formatting
+ self.readme_file = 'README.markdown'
+ self.history_file = 'History.markdown'
self.post_install_message =<<EOS
******************************************************************************
View
2  lib/slideshow.rb
@@ -51,6 +51,8 @@ def self.slideshowopt
require 'slideshow/cli/commands/gen'
require 'slideshow/cli/commands/gen_templates'
require 'slideshow/cli/commands/list'
+require 'slideshow/cli/commands/quick'
+
require 'slideshow/markup/textile'
require 'slideshow/markup/markdown'
View
9 lib/slideshow/cli/commands/gen_templates.rb
@@ -30,6 +30,8 @@ def run
manifestsrc = matches[0][1]
pakpath = opts.output_path
+
+ logger.debug( "manifestsrc=>#{manifestsrc}<, pakpath=>#{pakpath}<" )
Pakman::Copier.new( logger ).copy_pak( manifestsrc, pakpath )
end
@@ -39,14 +41,11 @@ def run
def installed_generator_manifests
# 1) search gem/templates
- builtin_patterns = [
+ patterns = [
"#{Slideshow.root}/templates/*.txt.gen"
]
- ## note: code moved to its own gem, that is, pakman
- ## see https://github.com/geraldb/pakman
-
- Pakman::Finder.new( logger ).find_manifests( builtin_patterns )
+ Pakman::Finder.new( logger ).find_manifests( patterns )
end
end # class GenTemplates
View
48 lib/slideshow/cli/commands/quick.rb
@@ -0,0 +1,48 @@
+module Slideshow
+
+class Quick
+
+### fix: remove opts, use config (wrapped!!)
+
+ def initialize( logger, opts, config )
+ @logger = logger
+ @opts = opts
+ @config = config
+ end
+
+ attr_reader :logger, :opts, :config
+
+ def run
+ manifest_name = 'welcome.txt.quick'
+
+ manifests = installed_quick_manifests
+ matches = manifests.select { |m| m[0] == manifest_name }
+
+ if matches.empty?
+ puts "*** error: unknown quick template manifest '#{manifest_name}'"
+ # todo: list installed manifests
+ exit 2
+ end
+
+ manifestsrc = matches[0][1]
+ pakpath = opts.output_path
+
+ logger.debug( "manifestsrc=>#{manifestsrc}<, pakpath=>#{pakpath}<" )
+
+ Pakman::Copier.new( logger ).copy_pak( manifestsrc, pakpath )
+ end
+
+private
+
+ def installed_quick_manifests
+ # 1) search gem/templates
+
+ patterns = [
+ "#{Slideshow.root}/templates/*.txt.quick"
+ ]
+
+ Pakman::Finder.new( logger ).find_manifests( patterns )
+ end
+
+end # class GenTemplates
+end # module Slideshow
View
18 lib/slideshow/cli/opts.rb
@@ -12,8 +12,18 @@ def header_level
@header_level || 1
end
- def generate=(value)
- @generate = value
+ def quick=(boolean)
+ @quick = boolean
+ end
+
+ def quick?
+ return false if @quick.nil? # default generate flag is false
+ @quick == true
+ end
+
+
+ def generate=(boolean)
+ @generate = boolean
end
def generate?
@@ -21,8 +31,8 @@ def generate?
@generate == true
end
- def list=(value)
- @list = value
+ def list=(boolean)
+ @list = boolean
end
def list?
View
6 lib/slideshow/cli/runner.rb
@@ -115,8 +115,8 @@ def run( args )
cmd.on( '-g', '--generate', 'Generate Slide Show Templates (using built-in S6 Pack)' ) { opts.generate = true }
## fix:/todo: add generator for quickstart
- cmd.on( '-q', '--quick', 'Generate Quickstart Slide Show Sample') { }
-
+ cmd.on( '-q', '--quick', 'Generate Quickstart Slide Show Sample') { opts.quick = true }
+
cmd.on( '-v', '--version', "Show version" ) do
puts Slideshow.generator
@@ -167,6 +167,8 @@ def run( args )
List.new( logger, opts, config ).run ### todo: remove opts (merge access into config)
elsif opts.generate?
GenTemplates.new( logger, opts, config ).run ### todo: remove opts
+ elsif opts.quick?
+ Quick.new( logger, opts, config ).run ### todo: remove opts
elsif opts.fetch?
Fetch.new( logger, opts, config ).run ### todo: remove opts
else
View
2  lib/slideshow/version.rb
@@ -1,3 +1,3 @@
module Slideshow
- VERSION = '1.2.0.beta1'
+ VERSION = '1.2.0.beta2'
end
View
167 templates/welcome.text
@@ -0,0 +1,167 @@
+%%%%%%%%%%%%%%%%%%
+%% Some Headers
+
+Title: Slide Show (S9) 10-Minute Tutorial
+
+
+%%%%%%%%%%%%%%
+%% Let's go.
+
+Slide Show (S9) 10-Minute Tutorial
+==================================
+
+Agenda
+
+* What's Slide Show (S9)?
+* Wiki-Style Markup Language - Markdown, Textile
+* How it works - Just press F11!
+* What's S5? What's S6?
+* Gradient Themes Using "Loss-Free" Vector Graphics in S9
+* Turn Your Online Wiki Pages into Slide Shows - Sputnik Case Study
+
+
+What's Slide Show (S9)?
+=======================
+
+### What?
+
+A Free Web Alternative to PowerPoint and KeyNote in Ruby
+
+
+### Getting Started in 1-2-3 Easy Steps
+
+* Step 1: Author your slides in plain text using a wiki-style markup language
+* Step 2: Generate your slide show using the `slideshow` gem
+* Step 3: Open up your slide show in your browser and hit the space bar to flip through your slides
+* That's it. Showtime!
+
+
+Wiki-Style Markup Language - Markdown
+=====================================
+
+Lets you create slide shows and author slides in plain text
+using a wiki-style markup language that's easy-to-write and easy-to-read.
+Sample:
+
+```
+What's Slide Show (S9)?
+=======================
+
+### What?
+
+A Free Web Alternative to PowerPoint and KeyNote in Ruby
+
+### Getting Started in 1-2-3 Easy Steps
+
+- Step 1: Author your slides in plain text using a wiki-style markup language
+- Step 2: Generate your slide show using the `slideshow` gem
+- Step 3: Open up your slide show in your browser
+- That's it. Showtime!
+```
+
+
+How it works - Just press F11!
+==============================
+
+The Slide Show (S9) Ruby gem turns your slides in plain text into a web page
+that's an all-in-one-page handout and a live slide show all at once.
+
+
+ $ slideshow tutorial
+
+ => Preparing slide show 'tutorial.html'...
+ => Done.
+
+
+Turn your web page into a slide show and your browser into full screen projection
+with a single push button (F11). Hit the space bar or the right arrow, down arrow
+or page down key to flip through your slides.
+
+That's all. It's that simple.
+
+
+Slide Show (S9) Template Pack Options
+=====================================
+
+{% left %}
+
+### What's S5?
+
+Simple Standards-based Slide Show System (S5) -Eric Meyer's (of CSS fame) public domain (free, open source) slide show package inspired by Opera Show and others
+that works in all modern browsers (without any plugin required
+because it includes its own slide show machinery in JavaScript).
+
+(Use the `s5blank` or `s5themes` template pack to create S5 slide shows.)
+
+{% end %}
+
+{% right %}
+
+### What's S6?
+
+S6 started as a rewrite of Eric Meyer's S5 using the jQuery JavaScript library -- offering easier to understand and easier to extend code. Add plugins, effects and more. Contributions welcome!
+
+(Use the `s6blank` or `s6syntax` template pack to create S6 slide shows.)
+
+{% end %}
+
+### What's Slidy? What's Slippy? What's Google HTML5 Slides?
+
+Check the [Slide Show Template Gallery](http://slideshow.rubyforge.org/templates.html)
+for more template packs and samples.
+
+
+
+Gradient Themes Using "Loss-Free" Vector Graphics in S9
+=======================================================
+
+### CSS3 Background Gradients
+
+Using modern browser such as Firefox (3.6+), Chrome and Safari you can
+now theme your slide shows using using "loss-free" vector
+graphics in plain old CSS. Thanks to gradient support in backgrounds in CSS3.
+
+For example, the linear gradient from top to bottom with four color is defined
+in CSS3 as:
+
+```
+.gradient_yellow_orange {
+
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%,
+ from(yellow), to(orange),
+ color-stop(0.33,orange), color-stop(0.66,yellow));
+
+ background: -moz-linear-gradient(top, yellow, orange, yellow, orange);
+}
+```
+
+Using Slide Show (S9) you can use the `gradient` helper that
+generates the CSS3 for you:
+
+```
+{{{{ gradient yellow orange yellow orange }}
+```
+
+
+Turn Your Online Wiki Pages into Slide Shows - Sputnik Case Study
+=================================================================
+
+Inspired by the Slide Show (S9) Ruby gem - Yuri Takhteyev has
+added S9-style slide shows
+to [Sputnik](http://sputnik.freewisdom.org/en/Slideshow_Demo) - a wiki in Lua.
+
+Lets you author slide shows online in your browser.
+It's - surprise, surpise - a wiki and, thus, lets you
+ work togther with others on a slide show,
+track changes and versions, link and get linked, and much much more.
+
+
+Thanks - Learn More - Questions? Comments?
+==========================================
+
+Gerald Bauer designed and developed the Slide Show (S9) Ruby gem.
+Find out more @ [`slideshow.rubyforge.org`](http://slideshow.rubyforge.org)
+
+Questions? Comments? Send them along
+to the [Free Web Slide Show Alternatives - S5, S6, S9 And Friends - Forum/Mailing List](http://groups.google.com/group/webslideshow).
+Thanks!
View
6 templates/welcome.txt.quick
@@ -0,0 +1,6 @@
+#######################
+# S9 manifest to generate welcome sample slide show
+
+## todo: add some images ???
+
+welcome.text
Please sign in to comment.
Something went wrong with that request. Please try again.