slideshow-models 3.3.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +2 -1
- data/Rakefile +1 -2
- data/config/slideshow.index.yml +1 -7
- data/lib/slideshow/config.rb +19 -19
- data/lib/slideshow/manifest_helpers.rb +6 -11
- data/lib/slideshow/models.rb +1 -2
- data/lib/slideshow/version.rb +3 -3
- data/templates/welcome.text +167 -0
- data/templates/welcome.txt.quick +6 -0
- metadata +6 -19
- data/lib/slideshow/commands/update.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '085e7996449acbb26f2b41fd3d59d110212211a2'
|
4
|
+
data.tar.gz: 32c1f223cb024723e81f2a24044d6a9b0bc195cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74032b700ea4421130d3e646091701e2ac80f7fb301924320824c3123c29593b135fe49e04c0f70e0cca110ab0c9d2d5602864218f1dae639d04afd8fc860019
|
7
|
+
data.tar.gz: a8349bb17ed46e11fbf9ba0318a70298b16404db81d44bea96152f67c81beb48085c3bd9b7dd3a2f68be98892a56407796d78b9e2a21400f8496c516162f73a4
|
data/Manifest.txt
CHANGED
@@ -12,7 +12,6 @@ lib/slideshow/commands/manifest_finder.rb
|
|
12
12
|
lib/slideshow/commands/merge.rb
|
13
13
|
lib/slideshow/commands/plugins.rb
|
14
14
|
lib/slideshow/commands/quick.rb
|
15
|
-
lib/slideshow/commands/update.rb
|
16
15
|
lib/slideshow/config.rb
|
17
16
|
lib/slideshow/drops.rb
|
18
17
|
lib/slideshow/filters/debug_filter.rb
|
@@ -37,6 +36,8 @@ lib/slideshow/models/slide.rb
|
|
37
36
|
lib/slideshow/opts.rb
|
38
37
|
lib/slideshow/plugin_helpers.rb
|
39
38
|
lib/slideshow/version.rb
|
39
|
+
templates/welcome.text
|
40
|
+
templates/welcome.txt.quick
|
40
41
|
test/helper.rb
|
41
42
|
test/samples/test.md
|
42
43
|
test/samples/test_content_for.md
|
data/Rakefile
CHANGED
@@ -18,8 +18,7 @@ Hoe.spec 'slideshow-models' do
|
|
18
18
|
['logutils', '>= 0.6.1'],
|
19
19
|
['kramdown', '>= 1.15.0'],
|
20
20
|
['textutils', '>= 1.4.0'],
|
21
|
-
['pakman', '>= 0.
|
22
|
-
['liquid', '>= 4.0.0'], ## note: make liquid 4+ a dependency (now requires/uses liquid_method_missing in drops (was before_method))
|
21
|
+
['pakman', '>= 1.0.0'],
|
23
22
|
['activesupport'],
|
24
23
|
]
|
25
24
|
|
data/config/slideshow.index.yml
CHANGED
@@ -1,13 +1,7 @@
|
|
1
1
|
###########################################################################################
|
2
2
|
# Slide Show (S9) Update Index for Template Packs, Quick Starter Samples 'n' Plugins
|
3
|
-
|
4
|
-
# find the latest version online at
|
5
|
-
# - https://github.com/slideshow-s9/registry
|
6
3
|
#
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
#############
|
4
|
+
#
|
11
5
|
# shortcuts for fetching template packs (w/ optional quick starter samples)
|
12
6
|
# maps shortcut to URI
|
13
7
|
|
data/lib/slideshow/config.rb
CHANGED
@@ -10,7 +10,7 @@ class Config
|
|
10
10
|
@opts = opts
|
11
11
|
end
|
12
12
|
|
13
|
-
## -- todo: allow (direct) access to opts - why? why not?
|
13
|
+
## -- todo: allow (direct) access to opts - why? why not?
|
14
14
|
## attr_reader :opts
|
15
15
|
|
16
16
|
def manifest() @opts.manifest; end
|
@@ -25,7 +25,7 @@ class Config
|
|
25
25
|
|
26
26
|
# todo/fix: fix references after this move to here, that is, Config class
|
27
27
|
# - used in syntax/uv_helper (use config.cache_dir to access?)
|
28
|
-
|
28
|
+
|
29
29
|
def cache_dir
|
30
30
|
File.join( Env.home, '.slideshow' )
|
31
31
|
end
|
@@ -33,11 +33,11 @@ class Config
|
|
33
33
|
def config_dir
|
34
34
|
unless @config_dir # first time? calculate config_dir value to "cache"
|
35
35
|
@config_dir = @opts.config_path
|
36
|
-
|
36
|
+
|
37
37
|
# make sure path exists
|
38
38
|
FileUtils.makedirs( @config_dir ) unless File.directory? @config_dir
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
@config_dir
|
42
42
|
end
|
43
43
|
|
@@ -60,7 +60,7 @@ class Config
|
|
60
60
|
puts "Loading shortcut index from '#{props_shortcuts_home_file}'..."
|
61
61
|
@props_shortcuts = @props_shortcuts_home = Props.load_file( props_shortcuts_home_file, @props_shortcuts )
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
# todo: add props from (optional) fetch section from 'standard' props (e.g. props[:fetch])
|
65
65
|
# - allows user to add own shortcuts in slideshow.yml settings
|
66
66
|
end
|
@@ -69,7 +69,7 @@ class Config
|
|
69
69
|
def map_fetch_shortcut( key )
|
70
70
|
# NB: always returns an array!!! 0,1 or more entries
|
71
71
|
# - no value - return empty ary
|
72
|
-
|
72
|
+
|
73
73
|
## todo: normalize key???
|
74
74
|
value = @props.fetch_from_section( 'fetch', key, @props_shortcuts.fetch( key, nil ))
|
75
75
|
|
@@ -84,7 +84,7 @@ class Config
|
|
84
84
|
|
85
85
|
|
86
86
|
def default_fetch_shortcuts
|
87
|
-
##
|
87
|
+
## Note: used by install --all
|
88
88
|
|
89
89
|
['s6blank',
|
90
90
|
's6syntax',
|
@@ -96,7 +96,7 @@ class Config
|
|
96
96
|
'impress.js',
|
97
97
|
'analytics'
|
98
98
|
]
|
99
|
-
|
99
|
+
|
100
100
|
## todo: use @props_shortcuts keys
|
101
101
|
# and use
|
102
102
|
#
|
@@ -109,28 +109,28 @@ class Config
|
|
109
109
|
|
110
110
|
|
111
111
|
def load
|
112
|
-
|
112
|
+
|
113
113
|
# load builtin config file @ <gem>/config/slideshow.yml
|
114
114
|
|
115
115
|
props_default_file = File.join( Slideshow.root, 'config', 'slideshow.yml' )
|
116
116
|
@props = @props_default = Props.load_file_with_erb( props_default_file, binding() )
|
117
117
|
|
118
118
|
# check for user settings (slideshow.yml) in home folder
|
119
|
-
|
119
|
+
|
120
120
|
props_home_file = File.join( Env.home, 'slideshow.yml' )
|
121
121
|
if File.exists?( props_home_file )
|
122
122
|
puts "Loading settings from '#{props_home_file}'..."
|
123
123
|
@props = @props_home = Props.load_file_with_erb( props_home_file, binding(), @props )
|
124
124
|
end
|
125
|
-
|
125
|
+
|
126
126
|
# check for user settings (slideshow.yml) in working folder
|
127
|
-
|
127
|
+
|
128
128
|
props_work_file = File.join( '.', 'slideshow.yml' )
|
129
129
|
if File.exists?( props_work_file )
|
130
130
|
puts "Loading settings from '#{props_work_file}'..."
|
131
131
|
@props = @props_work = Props.load_file_with_erb( props_work_file, binding(), @props )
|
132
132
|
end
|
133
|
-
|
133
|
+
|
134
134
|
# load shortcuts
|
135
135
|
load_shortcuts
|
136
136
|
end
|
@@ -141,12 +141,12 @@ class Config
|
|
141
141
|
@props_default.dump if @props_default
|
142
142
|
@props_home.dump if @props_home
|
143
143
|
@props_work.dump if @props_work
|
144
|
-
|
144
|
+
|
145
145
|
puts "Slideshow shortcuts:"
|
146
146
|
@props_shortcuts_default.dump if @props_shortcuts_default
|
147
147
|
@props_shortcuts_home.dump if @props_shortcuts_home
|
148
148
|
## todo: add props from 'standard' props via fetch key
|
149
|
-
|
149
|
+
|
150
150
|
## todo: add more config settings?
|
151
151
|
end
|
152
152
|
|
@@ -155,11 +155,11 @@ class Config
|
|
155
155
|
@props.fetch_from_section( 'headers', normalize_key( key ), nil )
|
156
156
|
end
|
157
157
|
|
158
|
-
|
158
|
+
|
159
159
|
def text_filters
|
160
160
|
@props.fetch( 'filters', [] )
|
161
161
|
end
|
162
|
-
|
162
|
+
|
163
163
|
def google_analytics_code
|
164
164
|
@props.fetch_from_section( 'analytics', 'google', nil )
|
165
165
|
end
|
@@ -172,10 +172,10 @@ private
|
|
172
172
|
# replace _ with - (e.g. gradient_color => gradient-color)
|
173
173
|
# todo: replace space(s) with - ??
|
174
174
|
# todo: strip leading and trailing spaces - possible use case ??
|
175
|
-
|
175
|
+
|
176
176
|
key.to_s.downcase.tr( '_', '-' )
|
177
177
|
end
|
178
178
|
|
179
179
|
end # class Config
|
180
180
|
|
181
|
-
end # module Slideshow
|
181
|
+
end # module Slideshow
|
@@ -19,7 +19,7 @@ module ManifestHelper
|
|
19
19
|
"plugins/*.{txt.plugin,plugin.txt}",
|
20
20
|
"plugins/*/*.{txt.plugin,plugin.txt}"
|
21
21
|
]
|
22
|
-
|
22
|
+
|
23
23
|
patterns = []
|
24
24
|
patterns += current_patterns
|
25
25
|
patterns += config_patterns
|
@@ -35,10 +35,6 @@ module ManifestHelper
|
|
35
35
|
# 2) search config_dir/templates
|
36
36
|
# 3) search gem/templates
|
37
37
|
|
38
|
-
# Note: only include builtin patterns if slideshow-templates gem included/required (it's optional)
|
39
|
-
builtin_patterns = []
|
40
|
-
builtin_patterns << "#{SlideshowTemplates.root}/templates/*.txt" if defined?( SlideshowTemplates )
|
41
|
-
|
42
38
|
test_patterns = []
|
43
39
|
test_patterns << "#{Slideshow.root}/test/templates/*/*.txt"
|
44
40
|
|
@@ -56,34 +52,33 @@ module ManifestHelper
|
|
56
52
|
patterns += current_patterns
|
57
53
|
patterns += test_patterns if config.test? ## (auto-)add test templates in test mode
|
58
54
|
patterns += config_patterns
|
59
|
-
patterns += builtin_patterns
|
60
55
|
end
|
61
56
|
|
62
57
|
def installed_template_manifests
|
63
58
|
## note: code moved to its own gem, that is, pakman
|
64
59
|
## see https://github.com/geraldb/pakman
|
65
|
-
|
60
|
+
|
66
61
|
## exclude manifest.txt/i (avoid confusion w/ ruby gem manifest; not a specific name anyway)
|
67
62
|
## also exclude patterns for quickstarter templates
|
68
|
-
|
63
|
+
|
69
64
|
excludes = [
|
70
65
|
'manifest.txt',
|
71
66
|
'*/manifest.txt',
|
72
67
|
'*.{txt.quick,quick.txt}',
|
73
68
|
'*/*.{txt.quick,quick.txt}'
|
74
69
|
]
|
75
|
-
|
70
|
+
|
76
71
|
Pakman::Finder.new.find_manifests( installed_template_manifest_patterns, excludes )
|
77
72
|
end
|
78
73
|
|
79
74
|
|
80
75
|
def installed_quick_manifest_patterns
|
81
76
|
# 1) search config_dir/templates
|
82
|
-
# 2) search gem/templates
|
77
|
+
# 2) search gem/templates
|
83
78
|
|
84
79
|
# Note: only include builtin patterns if slideshow-templates gem included/required (it's optional)
|
85
80
|
builtin_patterns = []
|
86
|
-
builtin_patterns << "#{
|
81
|
+
builtin_patterns << "#{Slideshow.root}/templates/*.{txt.quick,quick.txt}"
|
87
82
|
|
88
83
|
config_patterns = [
|
89
84
|
"#{config.config_dir}/templates/*.{txt.quick,quick.txt}",
|
data/lib/slideshow/models.rb
CHANGED
@@ -48,7 +48,6 @@ require 'slideshow/drops'
|
|
48
48
|
|
49
49
|
require 'slideshow/commands/manifest_finder'
|
50
50
|
require 'slideshow/commands/fetch'
|
51
|
-
require 'slideshow/commands/update'
|
52
51
|
require 'slideshow/commands/gen'
|
53
52
|
require 'slideshow/commands/merge'
|
54
53
|
require 'slideshow/commands/build'
|
@@ -85,7 +84,7 @@ BUILTIN_OPT_HELPERS = [
|
|
85
84
|
'slideshow/helpers/syntax/coderay_helper.rb',
|
86
85
|
]
|
87
86
|
|
88
|
-
BUILTIN_OPT_HELPERS.each do |helper|
|
87
|
+
BUILTIN_OPT_HELPERS.each do |helper|
|
89
88
|
begin
|
90
89
|
require(helper)
|
91
90
|
rescue Exception => e
|
data/lib/slideshow/version.rb
CHANGED
@@ -0,0 +1,167 @@
|
|
1
|
+
%%%%%%%%%%%%%%%%%%
|
2
|
+
%% Some Headers
|
3
|
+
|
4
|
+
Title: Slide Show (S9) 10-Minute Tutorial
|
5
|
+
|
6
|
+
|
7
|
+
%%%%%%%%%%%%%%
|
8
|
+
%% Let's go.
|
9
|
+
|
10
|
+
Slide Show (S9) 10-Minute Tutorial
|
11
|
+
==================================
|
12
|
+
|
13
|
+
Agenda
|
14
|
+
|
15
|
+
* What's Slide Show (S9)?
|
16
|
+
* Wiki-Style Markup Language - Markdown, Textile
|
17
|
+
* How it works - Just press F11!
|
18
|
+
* What's S5? What's S6?
|
19
|
+
* Gradient Themes Using "Loss-Free" Vector Graphics in S9
|
20
|
+
* Turn Your Online Wiki Pages into Slide Shows - Sputnik Case Study
|
21
|
+
|
22
|
+
|
23
|
+
What's Slide Show (S9)?
|
24
|
+
=======================
|
25
|
+
|
26
|
+
### What?
|
27
|
+
|
28
|
+
A Free Web Alternative to PowerPoint and KeyNote in Ruby
|
29
|
+
|
30
|
+
|
31
|
+
### Getting Started in 1-2-3 Easy Steps
|
32
|
+
|
33
|
+
* Step 1: Author your slides in plain text using a wiki-style markup language
|
34
|
+
* Step 2: Generate your slide show using the `slideshow` gem
|
35
|
+
* Step 3: Open up your slide show in your browser and hit the space bar to flip through your slides
|
36
|
+
* That's it. Showtime!
|
37
|
+
|
38
|
+
|
39
|
+
Wiki-Style Markup Language - Markdown
|
40
|
+
=====================================
|
41
|
+
|
42
|
+
Lets you create slide shows and author slides in plain text
|
43
|
+
using a wiki-style markup language that's easy-to-write and easy-to-read.
|
44
|
+
Sample:
|
45
|
+
|
46
|
+
```
|
47
|
+
What's Slide Show (S9)?
|
48
|
+
=======================
|
49
|
+
|
50
|
+
### What?
|
51
|
+
|
52
|
+
A Free Web Alternative to PowerPoint and KeyNote in Ruby
|
53
|
+
|
54
|
+
### Getting Started in 1-2-3 Easy Steps
|
55
|
+
|
56
|
+
- Step 1: Author your slides in plain text using a wiki-style markup language
|
57
|
+
- Step 2: Generate your slide show using the `slideshow` gem
|
58
|
+
- Step 3: Open up your slide show in your browser
|
59
|
+
- That's it. Showtime!
|
60
|
+
```
|
61
|
+
|
62
|
+
|
63
|
+
How it works - Just press F11!
|
64
|
+
==============================
|
65
|
+
|
66
|
+
The Slide Show (S9) Ruby gem turns your slides in plain text into a web page
|
67
|
+
that's an all-in-one-page handout and a live slide show all at once.
|
68
|
+
|
69
|
+
|
70
|
+
$ slideshow tutorial
|
71
|
+
|
72
|
+
=> Preparing slide show 'tutorial.html'...
|
73
|
+
=> Done.
|
74
|
+
|
75
|
+
|
76
|
+
Turn your web page into a slide show and your browser into full screen projection
|
77
|
+
with a single push button (F11). Hit the space bar or the right arrow, down arrow
|
78
|
+
or page down key to flip through your slides.
|
79
|
+
|
80
|
+
That's all. It's that simple.
|
81
|
+
|
82
|
+
|
83
|
+
Slide Show (S9) Template Pack Options
|
84
|
+
=====================================
|
85
|
+
|
86
|
+
{% left %}
|
87
|
+
|
88
|
+
### What's S5?
|
89
|
+
|
90
|
+
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
|
91
|
+
that works in all modern browsers (without any plugin required
|
92
|
+
because it includes its own slide show machinery in JavaScript).
|
93
|
+
|
94
|
+
(Use the `s5blank` or `s5themes` template pack to create S5 slide shows.)
|
95
|
+
|
96
|
+
{% end %}
|
97
|
+
|
98
|
+
{% right %}
|
99
|
+
|
100
|
+
### What's S6?
|
101
|
+
|
102
|
+
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!
|
103
|
+
|
104
|
+
(Use the `s6blank` or `s6syntax` template pack to create S6 slide shows.)
|
105
|
+
|
106
|
+
{% end %}
|
107
|
+
|
108
|
+
### What's Slidy? What's Slippy? What's Google HTML5 Slides?
|
109
|
+
|
110
|
+
Check the [Slide Show Template Gallery](http://slideshow.rubyforge.org/templates.html)
|
111
|
+
for more template packs and samples.
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
Gradient Themes Using "Loss-Free" Vector Graphics in S9
|
116
|
+
=======================================================
|
117
|
+
|
118
|
+
### CSS3 Background Gradients
|
119
|
+
|
120
|
+
Using modern browser such as Firefox (3.6+), Chrome and Safari you can
|
121
|
+
now theme your slide shows using using "loss-free" vector
|
122
|
+
graphics in plain old CSS. Thanks to gradient support in backgrounds in CSS3.
|
123
|
+
|
124
|
+
For example, the linear gradient from top to bottom with four color is defined
|
125
|
+
in CSS3 as:
|
126
|
+
|
127
|
+
```
|
128
|
+
.gradient_yellow_orange {
|
129
|
+
|
130
|
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%,
|
131
|
+
from(yellow), to(orange),
|
132
|
+
color-stop(0.33,orange), color-stop(0.66,yellow));
|
133
|
+
|
134
|
+
background: -moz-linear-gradient(top, yellow, orange, yellow, orange);
|
135
|
+
}
|
136
|
+
```
|
137
|
+
|
138
|
+
Using Slide Show (S9) you can use the `gradient` helper that
|
139
|
+
generates the CSS3 for you:
|
140
|
+
|
141
|
+
```
|
142
|
+
{{{{ gradient yellow orange yellow orange }}
|
143
|
+
```
|
144
|
+
|
145
|
+
|
146
|
+
Turn Your Online Wiki Pages into Slide Shows - Sputnik Case Study
|
147
|
+
=================================================================
|
148
|
+
|
149
|
+
Inspired by the Slide Show (S9) Ruby gem - Yuri Takhteyev has
|
150
|
+
added S9-style slide shows
|
151
|
+
to [Sputnik](http://sputnik.freewisdom.org/en/Slideshow_Demo) - a wiki in Lua.
|
152
|
+
|
153
|
+
Lets you author slide shows online in your browser.
|
154
|
+
It's - surprise, surpise - a wiki and, thus, lets you
|
155
|
+
work togther with others on a slide show,
|
156
|
+
track changes and versions, link and get linked, and much much more.
|
157
|
+
|
158
|
+
|
159
|
+
Thanks - Learn More - Questions? Comments?
|
160
|
+
==========================================
|
161
|
+
|
162
|
+
Gerald Bauer designed and developed the Slide Show (S9) Ruby gem.
|
163
|
+
Find out more @ [`slideshow.rubyforge.org`](http://slideshow.rubyforge.org)
|
164
|
+
|
165
|
+
Questions? Comments? Send them along
|
166
|
+
to the [Free Web Slide Show Alternatives - S5, S6, S9 And Friends - Forum/Mailing List](http://groups.google.com/group/webslideshow).
|
167
|
+
Thanks!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slideshow-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: props
|
@@ -72,28 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 1.0.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: liquid
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 4.0.0
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 4.0.0
|
82
|
+
version: 1.0.0
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: activesupport
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,7 +145,6 @@ files:
|
|
159
145
|
- lib/slideshow/commands/merge.rb
|
160
146
|
- lib/slideshow/commands/plugins.rb
|
161
147
|
- lib/slideshow/commands/quick.rb
|
162
|
-
- lib/slideshow/commands/update.rb
|
163
148
|
- lib/slideshow/config.rb
|
164
149
|
- lib/slideshow/drops.rb
|
165
150
|
- lib/slideshow/filters/debug_filter.rb
|
@@ -184,6 +169,8 @@ files:
|
|
184
169
|
- lib/slideshow/opts.rb
|
185
170
|
- lib/slideshow/plugin_helpers.rb
|
186
171
|
- lib/slideshow/version.rb
|
172
|
+
- templates/welcome.text
|
173
|
+
- templates/welcome.txt.quick
|
187
174
|
- test/helper.rb
|
188
175
|
- test/samples/test.md
|
189
176
|
- test/samples/test_content_for.md
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Slideshow
|
4
|
-
|
5
|
-
|
6
|
-
###
|
7
|
-
# update/fetch shortcut/registry slideshow.index.yml
|
8
|
-
#
|
9
|
-
|
10
|
-
# todo/why/why not??
|
11
|
-
# - *ALWAYS* fetch index before an "online" fetch operation?
|
12
|
-
# why cache or use built-in version?
|
13
|
-
# use cached/built-in version only as fallback?
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
class Update
|
18
|
-
|
19
|
-
|
20
|
-
include LogUtils::Logging
|
21
|
-
|
22
|
-
def initialize( config )
|
23
|
-
@config = config
|
24
|
-
end
|
25
|
-
|
26
|
-
attr_reader :config
|
27
|
-
|
28
|
-
|
29
|
-
def update # update shortcut index
|
30
|
-
dest = config.shortcut_index_file
|
31
|
-
|
32
|
-
destfull = File.expand_path( dest )
|
33
|
-
destpath = File.dirname( destfull )
|
34
|
-
FileUtils.makedirs( destpath ) unless File.directory?( destpath )
|
35
|
-
|
36
|
-
logger.debug "destfull=>#{destfull}<"
|
37
|
-
logger.debug "destpath=>#{destpath}<"
|
38
|
-
|
39
|
-
## todo/fix: use a config setting for index url (do NOT hard core)
|
40
|
-
src = 'https://raw.github.com/slideshow-s9/registry/master/slideshow.index.yml'
|
41
|
-
|
42
|
-
puts "Updating shortcut index - downloading '#{src}'..."
|
43
|
-
::Fetcher::Worker.new.copy( src, destfull )
|
44
|
-
end
|
45
|
-
|
46
|
-
end # class Update
|
47
|
-
|
48
|
-
end # module Slideshow
|
49
|
-
|