slideshow 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/History.txt +93 -0
  2. data/Manifest.txt +58 -0
  3. data/README.txt +51 -0
  4. data/Rakefile +18 -0
  5. data/lib/slideshow.rb +23 -613
  6. data/lib/slideshow/gen.rb +483 -0
  7. data/lib/{helpers → slideshow/helpers}/capture_helper.rb +0 -0
  8. data/lib/{helpers → slideshow/helpers}/coderay_helper.rb +0 -0
  9. data/lib/{helpers → slideshow/helpers}/text_helper.rb +0 -0
  10. data/lib/{helpers → slideshow/helpers}/uv_helper.rb +0 -0
  11. data/lib/slideshow/opts.rb +136 -0
  12. data/templates/fullerscreen.txt +5 -0
  13. data/templates/fullerscreen.txt.gen +7 -0
  14. data/{lib/templates → templates}/fullerscreen.txt.sample +0 -0
  15. data/{lib/templates → templates/fullerscreen}/footer.html.erb +0 -0
  16. data/{lib/templates → templates/fullerscreen}/header.html.erb +0 -0
  17. data/{lib/templates → templates/fullerscreen}/style.css.erb +0 -0
  18. data/{lib/templates → templates}/gradient.svg.erb +0 -0
  19. data/{lib/templates → templates}/s5.txt +1 -1
  20. data/{lib/templates → templates}/s5.txt.gen +0 -0
  21. data/{lib/templates → templates}/s5.txt.sample +0 -0
  22. data/{lib/templates → templates}/s5/footer.html.erb +0 -0
  23. data/{lib/templates → templates}/s5/header.html.erb +0 -0
  24. data/{lib/templates → templates}/s5/opera.css +0 -0
  25. data/{lib/templates → templates}/s5/outline.css +0 -0
  26. data/{lib/templates → templates}/s5/print.css +0 -0
  27. data/{lib/templates → templates}/s5/s5-core.css +0 -0
  28. data/{lib/templates → templates}/s5/slides.js +0 -0
  29. data/{lib/templates → templates}/s5/style.css.erb +0 -0
  30. data/{lib/templates → templates}/s5blank.txt.gen +0 -0
  31. data/{lib/templates → templates}/s5blank.txt.sample +0 -0
  32. data/{lib/templates → templates}/s5blank/blank.textile +0 -0
  33. data/{lib/templates → templates}/s5blank/footer.html.erb +0 -0
  34. data/{lib/templates → templates}/s5blank/header.html.erb +0 -0
  35. data/{lib/templates → templates}/s5blank/ui/default/blank.gif +0 -0
  36. data/{lib/templates → templates}/s5blank/ui/default/bodybg.gif +0 -0
  37. data/{lib/templates → templates}/s5blank/ui/default/framing.css +0 -0
  38. data/{lib/templates → templates}/s5blank/ui/default/iepngfix.htc +0 -0
  39. data/{lib/templates → templates}/s5blank/ui/default/opera.css +0 -0
  40. data/{lib/templates → templates}/s5blank/ui/default/outline.css +0 -0
  41. data/{lib/templates → templates}/s5blank/ui/default/pretty.css +0 -0
  42. data/{lib/templates → templates}/s5blank/ui/default/print.css +0 -0
  43. data/{lib/templates → templates}/s5blank/ui/default/s5-core.css +0 -0
  44. data/{lib/templates → templates}/s5blank/ui/default/slides.css +0 -0
  45. data/{lib/templates → templates}/s5blank/ui/default/slides.js +0 -0
  46. data/{lib/templates → templates}/s6.txt +0 -0
  47. data/{lib/templates → templates}/s6.txt.gen +0 -0
  48. data/{lib/templates → templates}/s6.txt.sample +0 -0
  49. data/{lib/templates → templates}/s6/footer.html.erb +0 -0
  50. data/{lib/templates → templates}/s6/header.html.erb +0 -0
  51. data/{lib/templates → templates}/s6/jquery.js +0 -0
  52. data/{lib/templates → templates}/s6/outline.css +0 -0
  53. data/{lib/templates → templates}/s6/print.css +0 -0
  54. data/{lib/templates → templates}/s6/slides.core.js +0 -0
  55. data/{lib/templates → templates}/s6/slides.css +0 -0
  56. data/{lib/templates → templates}/s6/slides.js +0 -0
  57. data/{lib/templates → templates}/s6/style.css.erb +0 -0
  58. metadata +81 -66
  59. data/lib/templates/fullerscreen.txt +0 -5
  60. data/lib/templates/fullerscreen.txt.gen +0 -7
File without changes
File without changes
@@ -0,0 +1,136 @@
1
+ module Slideshow
2
+
3
+ # todo: split (command line) options and headers?
4
+ # e.g. share (command line) options between slide shows (but not headers?)
5
+
6
+ class Opts
7
+
8
+ def initialize
9
+ @hash = {}
10
+ end
11
+
12
+ def put( key, value )
13
+ key = normalize_key( key )
14
+ setter = "#{key}=".to_sym
15
+
16
+ if respond_to? setter
17
+ send setter, value
18
+ else
19
+ @hash[ key ] = value
20
+ end
21
+ end
22
+
23
+ def gradient=( value )
24
+ put_gradient( value, :theme, :color1, :color2 )
25
+ end
26
+
27
+ def gradient_colors=( value )
28
+ put_gradient( value, :color1, :color2 )
29
+ end
30
+
31
+ def gradient_color=( value )
32
+ put_gradient( value, :color1 )
33
+ end
34
+
35
+ def gradient_theme=( value )
36
+ put_gradient( value, :theme )
37
+ end
38
+
39
+ def []( key )
40
+ value = @hash[ normalize_key( key ) ]
41
+ if value.nil?
42
+ puts "** Warning: header '#{key}' undefined"
43
+ "- #{key} not found -"
44
+ else
45
+ value
46
+ end
47
+ end
48
+
49
+ def generate?
50
+ get_boolean( 'generate', false )
51
+ end
52
+
53
+ def has_includes?
54
+ @hash[ :include ]
55
+ end
56
+
57
+ def includes
58
+ # fix: use os-agnostic delimiter (use : for Mac/Unix?)
59
+ has_includes? ? @hash[ :include ].split( ';' ) : []
60
+ end
61
+
62
+ def s5?
63
+ get_boolean( 's5', false )
64
+ end
65
+
66
+ def fullerscreen?
67
+ get_boolean( 'fuller', false ) || get_boolean( 'fullerscreen', false )
68
+ end
69
+
70
+ def manifest
71
+ get( 'manifest', 's6.txt' )
72
+ end
73
+
74
+ def output_path
75
+ get( 'output', '.' )
76
+ end
77
+
78
+ def code_engine
79
+ get( 'code-engine', DEFAULTS[ :code_engine ] )
80
+ end
81
+
82
+ def code_txmt
83
+ get( 'code-txmt', DEFAULTS[ :code_txmt ])
84
+ end
85
+
86
+
87
+ DEFAULTS =
88
+ {
89
+ :title => 'Untitled Slide Show',
90
+ :footer => '',
91
+ :subfooter => '',
92
+ :gradient_theme => 'dark',
93
+ :gradient_color1 => 'red',
94
+ :gradient_color2 => 'black',
95
+
96
+ :code_engine => 'uv', # ultraviolet (uv) | coderay (cr)
97
+ :code_txmt => 'false', # Text Mate Hyperlink for Source?
98
+ }
99
+
100
+ def set_defaults
101
+ DEFAULTS.each_pair do | key, value |
102
+ @hash[ key ] = value if @hash[ key ].nil?
103
+ end
104
+ end
105
+
106
+ def get( key, default )
107
+ @hash.fetch( normalize_key(key), default )
108
+ end
109
+
110
+ private
111
+
112
+ def normalize_key( key )
113
+ key.to_s.downcase.tr('-', '_').to_sym
114
+ end
115
+
116
+ # Assigns the given gradient-* keys to the values in the given string.
117
+ def put_gradient( string, *keys )
118
+ values = string.split( ' ' )
119
+
120
+ values.zip(keys).each do |v, k|
121
+ @hash[ normalize_key( "gradient-#{k}" ) ] = v.tr( '-', '_' )
122
+ end
123
+ end
124
+
125
+ def get_boolean( key, default )
126
+ value = @hash[ normalize_key( key ) ]
127
+ if value.nil?
128
+ default
129
+ else
130
+ (value == true || value =~ /true|yes|on/i) ? true : false
131
+ end
132
+ end
133
+
134
+ end # class Opts
135
+
136
+ end # module Slideshow
@@ -0,0 +1,5 @@
1
+ # builtin FullerScreen template package manifest
2
+
3
+ __file__.html fullerscreen/header.html.erb + fullerscreen/footer.html.erb
4
+ __file__.css fullerscreen/style.css.erb
5
+ __file__.svg gradient.svg.erb
@@ -0,0 +1,7 @@
1
+ # FullerScreen manifest to generate sample template package from builtin templates
2
+
3
+ fullerscreen.txt fullerscreen.txt.sample
4
+ gradient.svg.erb
5
+ header.html.erb fullerscreen/header.html.erb
6
+ footer.html.erb fullerscreen/footer.html.erb
7
+ style.css.erb fullerscreen/style.css.erb
File without changes
@@ -1,8 +1,8 @@
1
1
  # builtin S5 template package manifest
2
2
 
3
- __file__.svg gradient.svg.erb
4
3
  __file__.html s5/header.html.erb + s5/footer.html.erb
5
4
  __file__.css s5/style.css.erb
5
+ __file__.svg gradient.svg.erb
6
6
  s5/opera.css
7
7
  s5/outline.css
8
8
  s5/print.css
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slideshow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-02 00:00:00 +01:00
12
+ date: 2009-03-09 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,79 +32,94 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.0
34
34
  version:
35
- description:
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.9.0
44
+ version:
45
+ description: The Slide Show (S9) Ruby gem lets you create slide shows and author slides in plain text
36
46
  using a wiki-style markup language that's easy-to-write and easy-to-read.
37
47
  The Slide Show (S9) project also collects and welcomes themes and ships
38
48
  "out-of-the-gem" with built-in support for "loss-free" gradient vector graphics themes.
39
49
  email: webslideshow@googlegroups.com
40
50
  executables:
41
51
  - slideshow
42
52
  extensions: []
43
53
 
44
- extra_rdoc_files: []
45
-
54
+ extra_rdoc_files:
55
+ - History.txt
56
+ - Manifest.txt
57
+ - README.txt
58
+ - templates/fullerscreen.txt
59
+ - templates/s5.txt
60
+ - templates/s6.txt
46
61
  files:
47
- - lib/helpers
48
- - lib/helpers/capture_helper.rb
49
- - lib/helpers/coderay_helper.rb
50
- - lib/helpers/text_helper.rb
51
- - lib/helpers/uv_helper.rb
52
- - lib/slideshow.rb
53
- - lib/templates
54
- - lib/templates/footer.html.erb
55
- - lib/templates/fullerscreen.txt
56
- - lib/templates/fullerscreen.txt.gen
57
- - lib/templates/fullerscreen.txt.sample
58
- - lib/templates/gradient.svg.erb
59
- - lib/templates/header.html.erb
60
- - lib/templates/s5
61
- - lib/templates/s5/footer.html.erb
62
- - lib/templates/s5/header.html.erb
63
- - lib/templates/s5/opera.css
64
- - lib/templates/s5/outline.css
65
- - lib/templates/s5/print.css
66
- - lib/templates/s5/s5-core.css
67
- - lib/templates/s5/slides.js
68
- - lib/templates/s5/style.css.erb
69
- - lib/templates/s5.txt
70
- - lib/templates/s5.txt.gen
71
- - lib/templates/s5.txt.sample
72
- - lib/templates/s5blank
73
- - lib/templates/s5blank/blank.textile
74
- - lib/templates/s5blank/footer.html.erb
75
- - lib/templates/s5blank/header.html.erb
76
- - lib/templates/s5blank/ui
77
- - lib/templates/s5blank/ui/default
78
- - lib/templates/s5blank/ui/default/blank.gif
79
- - lib/templates/s5blank/ui/default/bodybg.gif
80
- - lib/templates/s5blank/ui/default/framing.css
81
- - lib/templates/s5blank/ui/default/iepngfix.htc
82
- - lib/templates/s5blank/ui/default/opera.css
83
- - lib/templates/s5blank/ui/default/outline.css
84
- - lib/templates/s5blank/ui/default/pretty.css
85
- - lib/templates/s5blank/ui/default/print.css
86
- - lib/templates/s5blank/ui/default/s5-core.css
87
- - lib/templates/s5blank/ui/default/slides.css
88
- - lib/templates/s5blank/ui/default/slides.js
89
- - lib/templates/s5blank.txt.gen
90
- - lib/templates/s5blank.txt.sample
91
- - lib/templates/s6
92
- - lib/templates/s6/footer.html.erb
93
- - lib/templates/s6/header.html.erb
94
- - lib/templates/s6/jquery.js
95
- - lib/templates/s6/outline.css
96
- - lib/templates/s6/print.css
97
- - lib/templates/s6/slides.core.js
98
- - lib/templates/s6/slides.css
99
- - lib/templates/s6/slides.js
100
- - lib/templates/s6/style.css.erb
101
- - lib/templates/s6.txt
102
- - lib/templates/s6.txt.gen
103
- - lib/templates/s6.txt.sample
104
- - lib/templates/style.css.erb
62
+ - History.txt
63
+ - Manifest.txt
64
+ - README.txt
65
+ - Rakefile
105
66
  - bin/slideshow
106
- has_rdoc: false
67
+ - lib/slideshow.rb
68
+ - lib/slideshow/gen.rb
69
+ - lib/slideshow/helpers/capture_helper.rb
70
+ - lib/slideshow/helpers/coderay_helper.rb
71
+ - lib/slideshow/helpers/text_helper.rb
72
+ - lib/slideshow/helpers/uv_helper.rb
73
+ - lib/slideshow/opts.rb
74
+ - templates/fullerscreen.txt
75
+ - templates/fullerscreen.txt.gen
76
+ - templates/fullerscreen.txt.sample
77
+ - templates/fullerscreen/footer.html.erb
78
+ - templates/fullerscreen/header.html.erb
79
+ - templates/fullerscreen/style.css.erb
80
+ - templates/gradient.svg.erb
81
+ - templates/s5.txt
82
+ - templates/s5.txt.gen
83
+ - templates/s5.txt.sample
84
+ - templates/s5/footer.html.erb
85
+ - templates/s5/header.html.erb
86
+ - templates/s5/opera.css
87
+ - templates/s5/outline.css
88
+ - templates/s5/print.css
89
+ - templates/s5/s5-core.css
90
+ - templates/s5/slides.js
91
+ - templates/s5/style.css.erb
92
+ - templates/s5blank.txt.gen
93
+ - templates/s5blank.txt.sample
94
+ - templates/s5blank/blank.textile
95
+ - templates/s5blank/footer.html.erb
96
+ - templates/s5blank/header.html.erb
97
+ - templates/s5blank/ui/default/blank.gif
98
+ - templates/s5blank/ui/default/bodybg.gif
99
+ - templates/s5blank/ui/default/framing.css
100
+ - templates/s5blank/ui/default/iepngfix.htc
101
+ - templates/s5blank/ui/default/opera.css
102
+ - templates/s5blank/ui/default/outline.css
103
+ - templates/s5blank/ui/default/pretty.css
104
+ - templates/s5blank/ui/default/print.css
105
+ - templates/s5blank/ui/default/s5-core.css
106
+ - templates/s5blank/ui/default/slides.css
107
+ - templates/s5blank/ui/default/slides.js
108
+ - templates/s6.txt
109
+ - templates/s6.txt.gen
110
+ - templates/s6.txt.sample
111
+ - templates/s6/footer.html.erb
112
+ - templates/s6/header.html.erb
113
+ - templates/s6/jquery.js
114
+ - templates/s6/outline.css
115
+ - templates/s6/print.css
116
+ - templates/s6/slides.core.js
117
+ - templates/s6/slides.css
118
+ - templates/s6/slides.js
119
+ - templates/s6/style.css.erb
120
+ has_rdoc: true
107
121
  homepage: http://slideshow.rubyforge.org
108
122
  post_install_message:
109
- rdoc_options: []
110
-
123
+ rdoc_options:
124
+ - --main
125
+ - README.txt
111
126
  require_paths:
112
127
  - lib
113
128
  required_ruby_version: !ruby/object:Gem::Requirement