slideshow-md 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/bin/slideshow-md +4 -0
- data/lib/slideshow_md/cli.rb +9 -16
- data/lib/slideshow_md/public/assets/css/default.css +3 -0
- data/lib/slideshow_md/server.rb +2 -1
- data/lib/slideshow_md/version.rb +1 -1
- data/lib/slideshow_md/views/index.erb +1 -1
- data/slideshow_md.gemspec +2 -1
- metadata +19 -4
- data/bin/slideshow_md +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49c8b09627d02a40a1b4707d570458a00aa635fe
|
4
|
+
data.tar.gz: 12d536bcc8c8df5512e42c5338ebf59cd7478312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ebf0b6987573695d6e41d42443bafbde74d7349958dbba53f351fe83a355abbd4f14f4c37e5f30bbff9a50a58711de9ad547be736949455b7fb3c1581890afc
|
7
|
+
data.tar.gz: 5156b928d60da3efc9f343fb949342b2921fd59362e76ee08749832b075a445aa80619d3c7dd5e4dcff5dc9cb9950d2fe88f49c7519548674ada3cf7613f577e
|
data/README.md
CHANGED
@@ -6,11 +6,11 @@ A Ruby-wrapper for the `remarkjs` library - presents a local markdown file as a
|
|
6
6
|
|
7
7
|
Install it yourself as:
|
8
8
|
|
9
|
-
$ gem install
|
9
|
+
$ gem install slideshow-md
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
To use, simply just run `
|
13
|
+
To use, simply just run `slideshow-md start [slideshow name]`. This gem expects a slideshow file in the current directory formatted via `markdown` file format.
|
14
14
|
Currently we only support a single Markdown file containing the entire slideshow.
|
15
15
|
|
16
16
|
An example slideshow is below:
|
@@ -31,11 +31,11 @@ An example slideshow is below:
|
|
31
31
|
# Introduction
|
32
32
|
```
|
33
33
|
|
34
|
-
|
34
|
+
After starting the application, go to `localhost:4567` and your slideshow will be present in your browser!
|
35
35
|
|
36
|
-
|
36
|
+
## Development
|
37
37
|
|
38
|
-
|
38
|
+
Fork the repo and create a branch that contains your changes. Make a PR against the master branch here and it'll be merged in if accepted!
|
39
39
|
|
40
40
|
## Contributing
|
41
41
|
|
data/bin/slideshow-md
ADDED
data/lib/slideshow_md/cli.rb
CHANGED
@@ -1,23 +1,16 @@
|
|
1
|
-
|
2
|
-
class CLI
|
3
|
-
def start(slideshow)
|
4
|
-
unless slideshow
|
5
|
-
$stderr.puts usage_message
|
6
|
-
exit
|
7
|
-
end
|
1
|
+
require 'thor'
|
8
2
|
|
9
|
-
|
3
|
+
module SlideshowMD
|
4
|
+
class CLI < Thor
|
5
|
+
desc "start SLIDESHOW_PATH", "starts the slideshow from the specified markdown file"
|
6
|
+
method_option :theme, aliases: "-d", desc: "Optional theme for slideshow"
|
7
|
+
def start(slideshow_path)
|
8
|
+
slideshow_file = File.read(slideshow_path)
|
9
|
+
slideshow_theme = options[:theme] || "default"
|
10
10
|
|
11
11
|
SlideshowMD::Server.set(:slideshow_file, slideshow_file)
|
12
|
+
SlideshowMD::Server.set(:theme, slideshow_theme)
|
12
13
|
SlideshowMD::Server.run!
|
13
14
|
end
|
14
|
-
|
15
|
-
private
|
16
|
-
def usage_message
|
17
|
-
<<~TEXT
|
18
|
-
Run using `slideshow [slideshow_name]`. Slideshow_name must match the
|
19
|
-
filename of the slideshow. Currently only supports a single markdown (.md) file.
|
20
|
-
TEXT
|
21
|
-
end
|
22
15
|
end
|
23
16
|
end
|
data/lib/slideshow_md/server.rb
CHANGED
@@ -4,7 +4,8 @@ module SlideshowMD
|
|
4
4
|
class Server < Sinatra::Base
|
5
5
|
get '/' do
|
6
6
|
# slideshow_file is the markdown file we'll be presenting
|
7
|
-
erb :index,
|
7
|
+
erb :index,
|
8
|
+
locals: { slideshow_file: settings.slideshow_file, theme: settings.theme }
|
8
9
|
end
|
9
10
|
end
|
10
11
|
end
|
data/lib/slideshow_md/version.rb
CHANGED
data/slideshow_md.gemspec
CHANGED
@@ -18,10 +18,11 @@ Gem::Specification.new do |spec|
|
|
18
18
|
f.match(%r{^(test|spec|features)/})
|
19
19
|
end
|
20
20
|
spec.bindir = "bin"
|
21
|
-
spec.executables = ["
|
21
|
+
spec.executables = ["slideshow-md"]
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
24
|
spec.add_dependency "sinatra"
|
25
|
+
spec.add_dependency "thor"
|
25
26
|
spec.add_development_dependency "bundler", "~> 1.15"
|
26
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
27
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slideshow-md
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- achengscode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,7 +84,7 @@ description: Run a slideshow based off of `remark.js` in your browser.
|
|
70
84
|
email:
|
71
85
|
- docaholic@gmail.com
|
72
86
|
executables:
|
73
|
-
-
|
87
|
+
- slideshow-md
|
74
88
|
extensions: []
|
75
89
|
extra_rdoc_files: []
|
76
90
|
files:
|
@@ -83,9 +97,10 @@ files:
|
|
83
97
|
- Rakefile
|
84
98
|
- bin/console
|
85
99
|
- bin/setup
|
86
|
-
- bin/
|
100
|
+
- bin/slideshow-md
|
87
101
|
- lib/slideshow_md.rb
|
88
102
|
- lib/slideshow_md/cli.rb
|
103
|
+
- lib/slideshow_md/public/assets/css/default.css
|
89
104
|
- lib/slideshow_md/public/assets/js/remark.min.js
|
90
105
|
- lib/slideshow_md/server.rb
|
91
106
|
- lib/slideshow_md/version.rb
|