slippery 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.travis.yml +27 -0
- data/Gemfile +10 -0
- data/Gemfile.devtools +59 -0
- data/Gemfile.lock +220 -0
- data/LICENSE +9 -0
- data/README.md +122 -0
- data/Rakefile +2 -0
- data/assets/impress.js/css/impress-demo.css +703 -0
- data/assets/impress.js/js/impress.js +800 -0
- data/assets/reveal.js/css/print/paper.css +176 -0
- data/assets/reveal.js/css/print/pdf.css +190 -0
- data/assets/reveal.js/css/reveal.css +1616 -0
- data/assets/reveal.js/css/reveal.min.css +7 -0
- data/assets/reveal.js/css/theme/README.md +23 -0
- data/assets/reveal.js/css/theme/beige.css +142 -0
- data/assets/reveal.js/css/theme/default.css +142 -0
- data/assets/reveal.js/css/theme/moon.css +142 -0
- data/assets/reveal.js/css/theme/night.css +130 -0
- data/assets/reveal.js/css/theme/serif.css +132 -0
- data/assets/reveal.js/css/theme/simple.css +132 -0
- data/assets/reveal.js/css/theme/sky.css +139 -0
- data/assets/reveal.js/css/theme/solarized.css +142 -0
- data/assets/reveal.js/css/theme/source/beige.scss +50 -0
- data/assets/reveal.js/css/theme/source/default.scss +42 -0
- data/assets/reveal.js/css/theme/source/moon.scss +68 -0
- data/assets/reveal.js/css/theme/source/night.scss +35 -0
- data/assets/reveal.js/css/theme/source/serif.scss +35 -0
- data/assets/reveal.js/css/theme/source/simple.scss +38 -0
- data/assets/reveal.js/css/theme/source/sky.scss +46 -0
- data/assets/reveal.js/css/theme/source/solarized.scss +74 -0
- data/assets/reveal.js/css/theme/template/mixins.scss +29 -0
- data/assets/reveal.js/css/theme/template/settings.scss +33 -0
- data/assets/reveal.js/css/theme/template/theme.scss +163 -0
- data/assets/reveal.js/js/head.min.js +8 -0
- data/assets/reveal.js/js/reveal.js +2577 -0
- data/assets/reveal.js/js/reveal.min.js +8 -0
- data/assets/reveal.js/lib/css/zenburn.css +115 -0
- data/assets/reveal.js/lib/font/league_gothic-webfont.eot +0 -0
- data/assets/reveal.js/lib/font/league_gothic-webfont.svg +230 -0
- data/assets/reveal.js/lib/font/league_gothic-webfont.ttf +0 -0
- data/assets/reveal.js/lib/font/league_gothic-webfont.woff +0 -0
- data/assets/reveal.js/lib/font/league_gothic_license +2 -0
- data/assets/reveal.js/lib/js/classList.js +2 -0
- data/assets/reveal.js/lib/js/head.min.js +8 -0
- data/assets/reveal.js/lib/js/html5shiv.js +7 -0
- data/assets/reveal.js/plugin/highlight/highlight.js +31 -0
- data/assets/reveal.js/plugin/leap/leap.js +154 -0
- data/assets/reveal.js/plugin/markdown/example.html +97 -0
- data/assets/reveal.js/plugin/markdown/example.md +29 -0
- data/assets/reveal.js/plugin/markdown/markdown.js +190 -0
- data/assets/reveal.js/plugin/markdown/marked.js +37 -0
- data/assets/reveal.js/plugin/multiplex/client.js +13 -0
- data/assets/reveal.js/plugin/multiplex/index.js +56 -0
- data/assets/reveal.js/plugin/multiplex/master.js +50 -0
- data/assets/reveal.js/plugin/notes/notes.html +253 -0
- data/assets/reveal.js/plugin/notes/notes.js +100 -0
- data/assets/reveal.js/plugin/notes-server/client.js +57 -0
- data/assets/reveal.js/plugin/notes-server/index.js +59 -0
- data/assets/reveal.js/plugin/notes-server/notes.html +142 -0
- data/assets/reveal.js/plugin/postmessage/example.html +39 -0
- data/assets/reveal.js/plugin/postmessage/postmessage.js +42 -0
- data/assets/reveal.js/plugin/print-pdf/print-pdf.js +44 -0
- data/assets/reveal.js/plugin/remotes/remotes.js +39 -0
- data/assets/reveal.js/plugin/search/search.js +196 -0
- data/assets/reveal.js/plugin/zoom-js/zoom.js +256 -0
- data/config/flay.yml +3 -0
- data/config/flog.yml +2 -0
- data/config/mutant.yml +3 -0
- data/config/reek.yml +108 -0
- data/config/rubocop.yml +71 -0
- data/config/yardstick.yml +2 -0
- data/lib/slippery/converter.rb +130 -0
- data/lib/slippery/document.rb +20 -0
- data/lib/slippery/presentation.rb +36 -0
- data/lib/slippery/processor_helpers.rb +43 -0
- data/lib/slippery/processors/add_google_font.rb +27 -0
- data/lib/slippery/processors/graphviz_dot.rb +46 -0
- data/lib/slippery/processors/hr_to_sections.rb +36 -0
- data/lib/slippery/processors/impress_js/add_impress_js.rb +30 -0
- data/lib/slippery/processors/impress_js/auto_offsets.rb +25 -0
- data/lib/slippery/processors/reveal_js/add_reveal_js.rb +78 -0
- data/lib/slippery/processors/self_contained.rb +62 -0
- data/lib/slippery/version.rb +3 -0
- data/lib/slippery.rb +42 -0
- data/slippery.gemspec +25 -0
- data/spec/fixtures/blockquotes.md +6 -0
- data/spec/fixtures/code_blocks.md +9 -0
- data/spec/fixtures/definition_lists.md +2 -0
- data/spec/fixtures/header_and_paragraph.md +2 -0
- data/spec/fixtures/headers.md +13 -0
- data/spec/fixtures/ordered_list.md +3 -0
- data/spec/fixtures/unordered_list.md +3 -0
- data/spec/slippery/converter_spec.rb +67 -0
- data/spec/slippery_spec.rb +0 -0
- data/spec/spec_helper.rb +20 -0
- metadata +208 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OWZlNzVlMWYyMDZiNWQwOWQ0NDE5ZGIwYjg3YTE3N2JmOWUzYjYxOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NWM2ZGVhZmJiZGYxYmNmMzBlNmNmMWNjMDY3MGM1OTYzMWFmMmVmYQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OWFjMjQ2OTk5YTg1ZDIyYjcxODliZDgwMmQ2ZTMzYTIyZGMyZjBhMjIxNzVl
|
10
|
+
YWJmNDg4OTdmNDcwZTA5ZDdlYjVjNjYxNzYwZDUyN2MxYjY4ODQ3NDBlNmY1
|
11
|
+
ZDE5M2RkYThkZDUyMTAxNGJhNDU2NDdmNzQ3ZTAxNzYyYzliZWE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MmNkMGE3N2MwYjFhODIyYWY3NmUyZTRjMDg5ODMxNDg4NzM1NTdhNWVmMjQ3
|
14
|
+
NWVhZjEwNDFlOWYxZDI1MWI2NjJmYmFiNWU4ZTg2NmQwMWM1ZmZjY2I2YzZm
|
15
|
+
ZWM3M2MxMWY1OTczNzQ3MTczZWQ1M2ExYjkxNDM3NmQyOTM2Zjg=
|
data/.travis.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
language: ruby
|
2
|
+
before_install: gem install bundler
|
3
|
+
bundler_args: --without yard guard benchmarks
|
4
|
+
script: "bundle exec rake ci:metrics"
|
5
|
+
rvm:
|
6
|
+
- 1.9.2
|
7
|
+
- 1.9.3
|
8
|
+
- 2.0.0
|
9
|
+
- jruby-19mode
|
10
|
+
- jruby-head
|
11
|
+
- ruby-head
|
12
|
+
- rbx-19mode
|
13
|
+
matrix:
|
14
|
+
include:
|
15
|
+
- rvm: jruby-19mode
|
16
|
+
env: JRUBY_OPTS="$JRUBY_OPTS --debug"
|
17
|
+
- rvm: jruby-head
|
18
|
+
env: JRUBY_OPTS="$JRUBY_OPTS --debug"
|
19
|
+
allow_failures:
|
20
|
+
- rvm: ruby-head
|
21
|
+
- rvm: rbx-19mode
|
22
|
+
notifications:
|
23
|
+
email:
|
24
|
+
recipients:
|
25
|
+
- arne@arnebrasseur.net
|
26
|
+
on_success: never
|
27
|
+
on_failure: change
|
data/Gemfile
ADDED
data/Gemfile.devtools
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
group :development do
|
4
|
+
gem 'rake', '~> 10.1.0'
|
5
|
+
gem 'rspec', '~> 2.14.1'
|
6
|
+
gem 'yard', '~> 0.8.6.2'
|
7
|
+
end
|
8
|
+
|
9
|
+
group :yard do
|
10
|
+
gem 'kramdown', '~> 1.1.0'
|
11
|
+
end
|
12
|
+
|
13
|
+
group :guard do
|
14
|
+
gem 'guard', '~> 1.8.1'
|
15
|
+
gem 'guard-bundler', '~> 1.0.0'
|
16
|
+
gem 'guard-rspec', '~> 3.0.2'
|
17
|
+
gem 'guard-rubocop', '~> 0.2.0'
|
18
|
+
gem 'guard-mutant', '~> 0.0.1'
|
19
|
+
|
20
|
+
# file system change event handling
|
21
|
+
gem 'listen', '~> 1.2.2'
|
22
|
+
gem 'rb-fchange', '~> 0.0.6', require: false
|
23
|
+
gem 'rb-fsevent', '~> 0.9.3', require: false
|
24
|
+
gem 'rb-inotify', '~> 0.9.0', require: false
|
25
|
+
|
26
|
+
# notification handling
|
27
|
+
gem 'libnotify', '~> 0.8.0', require: false
|
28
|
+
gem 'rb-notifu', '~> 0.0.4', require: false
|
29
|
+
gem 'terminal-notifier-guard', '~> 1.5.3', require: false
|
30
|
+
end
|
31
|
+
|
32
|
+
group :metrics do
|
33
|
+
gem 'coveralls', '~> 0.6.7'
|
34
|
+
gem 'flay', '~> 2.3.1'
|
35
|
+
gem 'flog', '~> 4.1.1'
|
36
|
+
gem 'reek', '~> 1.3.1', git: 'https://github.com/troessner/reek.git'
|
37
|
+
gem 'rubocop', '~> 0.10.0', git: 'https://github.com/bbatsov/rubocop.git'
|
38
|
+
gem 'simplecov', '~> 0.7.1'
|
39
|
+
gem 'yardstick', '~> 0.9.6'
|
40
|
+
|
41
|
+
platforms :ruby_19, :ruby_20 do
|
42
|
+
gem 'mutant', '~> 0.3.0.beta18'
|
43
|
+
gem 'yard-spellcheck', '~> 0.1.5'
|
44
|
+
end
|
45
|
+
|
46
|
+
platforms :rbx do
|
47
|
+
gem 'pelusa', '~> 0.2.2'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
group :benchmarks do
|
52
|
+
gem 'rbench', '~> 0.2.3'
|
53
|
+
end
|
54
|
+
|
55
|
+
platform :jruby do
|
56
|
+
group :jruby do
|
57
|
+
gem 'jruby-openssl', '~> 0.8.5'
|
58
|
+
end
|
59
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/rom-rb/devtools.git
|
3
|
+
revision: bca222ee252d4d4bd86f55967704965711e90096
|
4
|
+
specs:
|
5
|
+
devtools (0.0.2)
|
6
|
+
ice_nine (~> 0.8.0)
|
7
|
+
|
8
|
+
GIT
|
9
|
+
remote: https://github.com/bbatsov/rubocop.git
|
10
|
+
revision: e9fa7563d4ea6c0abb7ed58e1bdb81ebe5138c5f
|
11
|
+
specs:
|
12
|
+
rubocop (0.10.0)
|
13
|
+
backports (~> 3.3.3)
|
14
|
+
parser (= 2.0.0.pre2)
|
15
|
+
powerpack (= 0.0.1)
|
16
|
+
rainbow (>= 1.1.4)
|
17
|
+
|
18
|
+
GIT
|
19
|
+
remote: https://github.com/troessner/reek.git
|
20
|
+
revision: ae4d09078ae29bc6cbced4bb41b8642733d8ffc4
|
21
|
+
specs:
|
22
|
+
reek (1.3.1)
|
23
|
+
ruby2ruby (~> 2.0.2)
|
24
|
+
ruby_parser (~> 3.1.1)
|
25
|
+
sexp_processor
|
26
|
+
|
27
|
+
PATH
|
28
|
+
remote: .
|
29
|
+
specs:
|
30
|
+
slippery (0.0.1)
|
31
|
+
hexp (~> 0.0)
|
32
|
+
kramdown (~> 1.1)
|
33
|
+
|
34
|
+
PATH
|
35
|
+
remote: /home/arne/github/hexp
|
36
|
+
specs:
|
37
|
+
hexp (0.2.0)
|
38
|
+
equalizer (~> 0.0)
|
39
|
+
ice_nine (~> 0.8)
|
40
|
+
nokogiri (~> 1.6)
|
41
|
+
sass (~> 3.2)
|
42
|
+
|
43
|
+
GEM
|
44
|
+
remote: https://rubygems.org/
|
45
|
+
specs:
|
46
|
+
abstract_type (0.0.6)
|
47
|
+
adamantium (0.0.11)
|
48
|
+
ice_nine (~> 0.8.0)
|
49
|
+
anima (0.0.6)
|
50
|
+
abstract_type (~> 0.0.4)
|
51
|
+
adamantium (~> 0.0.6)
|
52
|
+
backports (~> 3.0, >= 3.0.3)
|
53
|
+
equalizer (~> 0.0.4)
|
54
|
+
ast (1.1.0)
|
55
|
+
backports (3.3.3)
|
56
|
+
coderay (1.0.9)
|
57
|
+
colorize (0.5.8)
|
58
|
+
concord (0.1.2)
|
59
|
+
adamantium (~> 0.0.10)
|
60
|
+
equalizer (~> 0.0.5)
|
61
|
+
coveralls (0.6.7)
|
62
|
+
colorize
|
63
|
+
multi_json (~> 1.3)
|
64
|
+
rest-client
|
65
|
+
simplecov (>= 0.7)
|
66
|
+
thor
|
67
|
+
descendants_tracker (0.0.1)
|
68
|
+
diff-lcs (1.2.4)
|
69
|
+
equalizer (0.0.5)
|
70
|
+
adamantium (~> 0.0.6)
|
71
|
+
backports (~> 3.0, >= 3.0.3)
|
72
|
+
ffi (1.9.0)
|
73
|
+
ffi-hunspell (0.3.0)
|
74
|
+
ffi (~> 1.0)
|
75
|
+
flay (2.3.1)
|
76
|
+
ruby_parser (~> 3.0)
|
77
|
+
sexp_processor (~> 4.0)
|
78
|
+
flog (4.1.1)
|
79
|
+
ruby_parser (~> 3.1, > 3.1.0)
|
80
|
+
sexp_processor (~> 4.0)
|
81
|
+
formatador (0.2.4)
|
82
|
+
guard (1.8.1)
|
83
|
+
formatador (>= 0.2.4)
|
84
|
+
listen (>= 1.0.0)
|
85
|
+
lumberjack (>= 1.0.2)
|
86
|
+
pry (>= 0.9.10)
|
87
|
+
thor (>= 0.14.6)
|
88
|
+
guard-bundler (1.0.0)
|
89
|
+
bundler (~> 1.0)
|
90
|
+
guard (~> 1.1)
|
91
|
+
guard-mutant (0.0.1)
|
92
|
+
guard (~> 1.8)
|
93
|
+
inflecto (~> 0.0.2)
|
94
|
+
mutant (~> 0.3.0.beta15)
|
95
|
+
guard-rspec (3.0.2)
|
96
|
+
guard (>= 1.8)
|
97
|
+
rspec (~> 2.13)
|
98
|
+
guard-rubocop (0.2.0)
|
99
|
+
guard (~> 1.8)
|
100
|
+
rubocop (~> 0.9)
|
101
|
+
ice_nine (0.8.0)
|
102
|
+
inflecto (0.0.2)
|
103
|
+
kramdown (1.1.0)
|
104
|
+
libnotify (0.8.1)
|
105
|
+
ffi (>= 1.0.11)
|
106
|
+
listen (1.2.2)
|
107
|
+
rb-fsevent (>= 0.9.3)
|
108
|
+
rb-inotify (>= 0.9)
|
109
|
+
rb-kqueue (>= 0.2)
|
110
|
+
lumberjack (1.0.4)
|
111
|
+
method_source (0.8.1)
|
112
|
+
mime-types (1.23)
|
113
|
+
mini_portile (0.5.1)
|
114
|
+
multi_json (1.7.7)
|
115
|
+
mutant (0.3.0.beta18)
|
116
|
+
adamantium (~> 0.0.10)
|
117
|
+
anima (~> 0.0.6)
|
118
|
+
concord (~> 0.1.1)
|
119
|
+
descendants_tracker (~> 0.0.1)
|
120
|
+
equalizer (~> 0.0.5)
|
121
|
+
ice_nine (~> 0.8.0)
|
122
|
+
inflecto (~> 0.0.2)
|
123
|
+
parser (~> 2.0.0.pre2)
|
124
|
+
rspec (~> 2.14.1)
|
125
|
+
unparser (~> 0.0.8)
|
126
|
+
nokogiri (1.6.0)
|
127
|
+
mini_portile (~> 0.5.0)
|
128
|
+
parser (2.0.0.pre2)
|
129
|
+
ast (~> 1.1)
|
130
|
+
slop (~> 3.4, >= 3.4.5)
|
131
|
+
pelusa (0.2.2)
|
132
|
+
powerpack (0.0.1)
|
133
|
+
pry (0.9.12.2)
|
134
|
+
coderay (~> 1.0.5)
|
135
|
+
method_source (~> 0.8)
|
136
|
+
slop (~> 3.4)
|
137
|
+
rainbow (1.1.4)
|
138
|
+
rake (10.1.0)
|
139
|
+
rb-fchange (0.0.6)
|
140
|
+
ffi
|
141
|
+
rb-fsevent (0.9.3)
|
142
|
+
rb-inotify (0.9.0)
|
143
|
+
ffi (>= 0.5.0)
|
144
|
+
rb-kqueue (0.2.0)
|
145
|
+
ffi (>= 0.5.0)
|
146
|
+
rb-notifu (0.0.4)
|
147
|
+
rbench (0.2.3)
|
148
|
+
rest-client (1.6.7)
|
149
|
+
mime-types (>= 1.16)
|
150
|
+
rspec (2.14.1)
|
151
|
+
rspec-core (~> 2.14.0)
|
152
|
+
rspec-expectations (~> 2.14.0)
|
153
|
+
rspec-mocks (~> 2.14.0)
|
154
|
+
rspec-core (2.14.3)
|
155
|
+
rspec-expectations (2.14.0)
|
156
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
157
|
+
rspec-mocks (2.14.1)
|
158
|
+
ruby2ruby (2.0.6)
|
159
|
+
ruby_parser (~> 3.1)
|
160
|
+
sexp_processor (~> 4.0)
|
161
|
+
ruby_parser (3.1.3)
|
162
|
+
sexp_processor (~> 4.1)
|
163
|
+
sass (3.2.9)
|
164
|
+
sexp_processor (4.2.1)
|
165
|
+
simplecov (0.7.1)
|
166
|
+
multi_json (~> 1.0)
|
167
|
+
simplecov-html (~> 0.7.1)
|
168
|
+
simplecov-html (0.7.1)
|
169
|
+
slop (3.4.5)
|
170
|
+
terminal-notifier-guard (1.5.3)
|
171
|
+
thor (0.18.1)
|
172
|
+
unparser (0.0.8)
|
173
|
+
abstract_type (~> 0.0.5)
|
174
|
+
adamantium (~> 0.0.7)
|
175
|
+
concord (~> 0.1.0)
|
176
|
+
equalizer (~> 0.0.5)
|
177
|
+
parser (~> 2.0.0.pre1)
|
178
|
+
yard (0.8.6.2)
|
179
|
+
yard-spellcheck (0.1.5)
|
180
|
+
ffi-hunspell (~> 0.2)
|
181
|
+
yard (~> 0.6)
|
182
|
+
yardstick (0.9.6)
|
183
|
+
backports (~> 3.3, >= 3.3.0)
|
184
|
+
yard (~> 0.8, >= 0.8.6)
|
185
|
+
|
186
|
+
PLATFORMS
|
187
|
+
ruby
|
188
|
+
|
189
|
+
DEPENDENCIES
|
190
|
+
coveralls (~> 0.6.7)
|
191
|
+
devtools!
|
192
|
+
flay (~> 2.3.1)
|
193
|
+
flog (~> 4.1.1)
|
194
|
+
guard (~> 1.8.1)
|
195
|
+
guard-bundler (~> 1.0.0)
|
196
|
+
guard-mutant (~> 0.0.1)
|
197
|
+
guard-rspec (~> 3.0.2)
|
198
|
+
guard-rubocop (~> 0.2.0)
|
199
|
+
hexp!
|
200
|
+
slippery!
|
201
|
+
jruby-openssl (~> 0.8.5)
|
202
|
+
kramdown (~> 1.1.0)
|
203
|
+
libnotify (~> 0.8.0)
|
204
|
+
listen (~> 1.2.2)
|
205
|
+
mutant (~> 0.3.0.beta18)
|
206
|
+
pelusa (~> 0.2.2)
|
207
|
+
rake (~> 10.1.0)
|
208
|
+
rb-fchange (~> 0.0.6)
|
209
|
+
rb-fsevent (~> 0.9.3)
|
210
|
+
rb-inotify (~> 0.9.0)
|
211
|
+
rb-notifu (~> 0.0.4)
|
212
|
+
rbench (~> 0.2.3)
|
213
|
+
reek (~> 1.3.1)!
|
214
|
+
rspec (~> 2.14.1)
|
215
|
+
rubocop (~> 0.10.0)!
|
216
|
+
simplecov (~> 0.7.1)
|
217
|
+
terminal-notifier-guard (~> 1.5.3)
|
218
|
+
yard (~> 0.8.6.2)
|
219
|
+
yard-spellcheck (~> 0.1.5)
|
220
|
+
yardstick (~> 0.9.6)
|
data/LICENSE
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
Copyright (c) 2013 Arne Brasseur
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/slippery.png)][gem]
|
2
|
+
[![Build Status](https://secure.travis-ci.org/plexus/slippery.png?branch=master)][travis]
|
3
|
+
[![Dependency Status](https://gemnasium.com/plexus/slippery.png)][gemnasium]
|
4
|
+
[![Code Climate](https://codeclimate.com/github/plexus/slippery.png)][codeclimate]
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/plexus/slippery/badge.png?branch=master)][coveralls]
|
6
|
+
|
7
|
+
[gem]: https://rubygems.org/gems/slippery
|
8
|
+
[travis]: https://travis-ci.org/plexus/slippery
|
9
|
+
[gemnasium]: https://gemnasium.com/plexus/slippery
|
10
|
+
[codeclimate]: https://codeclimate.com/github/plexus/slippery
|
11
|
+
[coveralls]: https://coveralls.io/r/plexus/slippery
|
12
|
+
|
13
|
+
#Slippery
|
14
|
+
|
15
|
+
The most flexible, customizable way to generate slides from Markdown.
|
16
|
+
|
17
|
+
## How to use
|
18
|
+
|
19
|
+
Create a markdown file, say `presentation.md`, that will be the source of your presentation. use `---` to separate slides.
|
20
|
+
|
21
|
+
In the same directory, create a Rakefile, here's a basic example :
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
task :build_presentation do
|
25
|
+
doc = Slippery::Document.new(File.read('presentation.md'))
|
26
|
+
presentation = Slippery::Presentation.new(doc, type: :reveal_js)
|
27
|
+
File.write('presentation.html', presentation.to_html)
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
The presentation object responds to the [Hexp](http://github.com/plexus/hexp) DSL, so you can manipulate it before writing it out. In fact, Slippery contains several "processor objects" for common tasks.
|
32
|
+
|
33
|
+
## Processors
|
34
|
+
|
35
|
+
These are defined in the `Slippery::Processors` namespace.
|
36
|
+
|
37
|
+
### GraphvizDot
|
38
|
+
|
39
|
+
The "Dot" language is a DSL (domain specific language) for describing graphs. Using the `GraphvizDot` processor, you can turn "dot" fragments into inline SVG graphics.
|
40
|
+
|
41
|
+
In your presentation :
|
42
|
+
|
43
|
+
````dot
|
44
|
+
graph dependencies {
|
45
|
+
node[shape=circle color=blue]
|
46
|
+
edge[color=black penwidth=3]
|
47
|
+
|
48
|
+
slippery[fontcolor=red];
|
49
|
+
|
50
|
+
slippery -> hexp -> equalizer;
|
51
|
+
slippery -> kramdown;
|
52
|
+
hexp -> ice_nine;
|
53
|
+
}
|
54
|
+
````
|
55
|
+
|
56
|
+
In the Rakefile
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
task :build_presentation do
|
60
|
+
include Slippery::Processors
|
61
|
+
doc = Slippery::Document.new(File.read('presentation.md'))
|
62
|
+
presentation = Slippery::Presentation.new(doc, type: :reveal_js)
|
63
|
+
.process(GraphvizDot)
|
64
|
+
|
65
|
+
File.write('presentation.html', presentation.to_html)
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
69
|
+
And the result:
|
70
|
+
|
71
|
+
<svg width="305pt" height="432pt"
|
72
|
+
viewBox="0.00 0.00 305.00 432.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
73
|
+
<g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 428)">
|
74
|
+
<title>dependencies</title>
|
75
|
+
<polygon fill="white" stroke="white" points="-4,5 -4,-428 302,-428 302,5 -4,5"/>
|
76
|
+
<!-- slippery -->
|
77
|
+
<g id="node1" class="node"><title>slippery</title>
|
78
|
+
<ellipse fill="none" stroke="blue" cx="176" cy="-369" rx="53.9477" ry="54.4472"/>
|
79
|
+
<text text-anchor="middle" x="176" y="-365.4" font-family="Times Roman,serif" font-size="14.00" fill="red">slippery</text>
|
80
|
+
</g>
|
81
|
+
<!-- hexp -->
|
82
|
+
<g id="node3" class="node"><title>hexp</title>
|
83
|
+
<ellipse fill="none" stroke="blue" cx="118" cy="-214" rx="34.8574" ry="35.3553"/>
|
84
|
+
<text text-anchor="middle" x="118" y="-210.4" font-family="Times Roman,serif" font-size="14.00">hexp</text>
|
85
|
+
</g>
|
86
|
+
<!-- slippery->hexp -->
|
87
|
+
<g id="edge2" class="edge"><title>slippery->hexp</title>
|
88
|
+
<path fill="none" stroke="black" stroke-width="3" d="M156.848,-317.818C149.486,-298.144 141.164,-275.903 134.115,-257.067"/>
|
89
|
+
<polygon fill="black" stroke="black" points="137.34,-255.699 130.558,-247.56 130.784,-258.152 137.34,-255.699"/>
|
90
|
+
</g>
|
91
|
+
<!-- kramdown -->
|
92
|
+
<g id="node6" class="node"><title>kramdown</title>
|
93
|
+
<ellipse fill="none" stroke="blue" cx="234" cy="-214" rx="63.1385" ry="63.6396"/>
|
94
|
+
<text text-anchor="middle" x="234" y="-210.4" font-family="Times Roman,serif" font-size="14.00">kramdown</text>
|
95
|
+
</g>
|
96
|
+
<!-- slippery->kramdown -->
|
97
|
+
<g id="edge5" class="edge"><title>slippery->kramdown</title>
|
98
|
+
<path fill="none" stroke="black" stroke-width="3" d="M195.152,-317.818C199.302,-306.726 203.758,-294.819 208.119,-283.166"/>
|
99
|
+
<polygon fill="black" stroke="black" points="211.524,-284.053 211.75,-273.46 204.968,-281.6 211.524,-284.053"/>
|
100
|
+
</g>
|
101
|
+
<!-- equalizer -->
|
102
|
+
<g id="node4" class="node"><title>equalizer</title>
|
103
|
+
<ellipse fill="none" stroke="blue" cx="56" cy="-57" rx="56.0679" ry="56.5685"/>
|
104
|
+
<text text-anchor="middle" x="56" y="-53.4" font-family="Times Roman,serif" font-size="14.00">equalizer</text>
|
105
|
+
</g>
|
106
|
+
<!-- hexp->equalizer -->
|
107
|
+
<g id="edge3" class="edge"><title>hexp->equalizer</title>
|
108
|
+
<path fill="none" stroke="black" stroke-width="3" d="M104.851,-180.704C97.7925,-162.829 88.8602,-140.211 80.5698,-119.217"/>
|
109
|
+
<polygon fill="black" stroke="black" points="83.7433,-117.724 76.8149,-109.709 77.2326,-120.295 83.7433,-117.724"/>
|
110
|
+
</g>
|
111
|
+
<!-- ice_nine -->
|
112
|
+
<g id="node8" class="node"><title>ice_nine</title>
|
113
|
+
<ellipse fill="none" stroke="blue" cx="181" cy="-57" rx="51.1176" ry="51.6188"/>
|
114
|
+
<text text-anchor="middle" x="181" y="-53.4" font-family="Times Roman,serif" font-size="14.00">ice_nine</text>
|
115
|
+
</g>
|
116
|
+
<!-- hexp->ice_nine -->
|
117
|
+
<g id="edge7" class="edge"><title>hexp->ice_nine</title>
|
118
|
+
<path fill="none" stroke="black" stroke-width="3" d="M131.207,-181.088C138.973,-161.733 149.01,-136.72 158.036,-114.228"/>
|
119
|
+
<polygon fill="black" stroke="black" points="161.357,-115.35 161.833,-104.766 154.86,-112.744 161.357,-115.35"/>
|
120
|
+
</g>
|
121
|
+
</g>
|
122
|
+
</svg>
|
data/Rakefile
ADDED