revealing 1.0.0 → 1.0.1
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.markdown +11 -10
- data/Rakefile +5 -0
- data/exe/revealing +4 -8
- data/lib/revealing/cli.rb +14 -0
- data/lib/revealing/tasks/reveal.js.rake +2 -0
- data/lib/revealing/tasks.rb +5 -6
- data/lib/revealing/version.rb +1 -1
- data/revealing.gemspec +6 -0
- data/templates/init/Gemfile +4 -0
- data/templates/init/README.markdown +23 -0
- data/templates/init/Rakefile +3 -0
- data/templates/init/src/index.markdown +17 -0
- data/tmp/aruba/shiny-new-presentation/Gemfile +4 -0
- data/tmp/aruba/shiny-new-presentation/README.markdown +10 -0
- data/tmp/aruba/shiny-new-presentation/Rakefile +3 -0
- data/tmp/aruba/shiny-new-presentation/src/index.markdown +18 -0
- data/tmp/rspec_guard_result +1 -0
- metadata +81 -3
- data/exe/revealing-task +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0862695a5f6c85e4479c243b7c570722d2d332e6cf3441191e4bc7116f70e79
|
4
|
+
data.tar.gz: 2ae6561b8b5408e0eab3503b200036dc45b9976354e620848afc61ea965cdf26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 252cc7d9a382f4e60a8511a0a55b31cfe9a7e6a3d7875aea385ce329b6acefb7c542b5a7ac2b43d9d6d5ab2905c0f71b54bcfc4153b4122e17d0b3100b3d89d7
|
7
|
+
data.tar.gz: c55292e2e6471d623bcc677e7a21780a9921ceecb0bd39a99fccf99552444c7d08313fa62cf0e1f70d2da8a5cef880f7d76363aeeffeae72cb32785bfeed4b74
|
data/README.markdown
CHANGED
@@ -2,23 +2,23 @@
|
|
2
2
|
|
3
3
|
This gem provides a set of [`Rake`](https://github.com/ruby/rake) tasks to create [`reveal.js`](https://revealjs.com) presentations from markdown files. It uses [`pandoc`](https://pandoc.org/) to create the final presentation. The output is a self-contained set of static HTML files that can be viewed locally uploaded to a web server.
|
4
4
|
|
5
|
-
Additional features:
|
6
|
-
|
7
|
-
* Images are resized for the web using [`graphicsmagick`](http://www.graphicsmagick.org/)
|
8
|
-
* Embedded [`ditaa`](http://ditaa.sourceforge.net/) snippets are rendered to images
|
9
|
-
* `#include` and other [`gpp`](https://logological.org/gpp) features allow organizing the sources of complex presentations
|
10
|
-
|
11
5
|
# Examples
|
12
6
|
|
13
7
|
* [Zero to CF in Kube-Cluster in 30 Seconds with Concourse, Helm, Fissile and Eirini](http://zero2cfin30s.eirini.cf/) (source: [suhlig/zero-to-cf-in-30-seconds](https://github.com/suhlig/zero-to-cf-in-30-seconds))
|
14
8
|
|
9
|
+
# Development
|
10
|
+
|
11
|
+
* Create a test project using `revealing init`
|
12
|
+
* Update `revealing` locally with this one-liner:
|
13
|
+
```console
|
14
|
+
$ (cd ../revealing; git add .; bake install) && bundle update && bake -T
|
15
|
+
```
|
16
|
+
* Test changes in the test project
|
17
|
+
|
15
18
|
# TODO
|
16
19
|
|
17
|
-
1. Can the default task still be overridden in projects?
|
18
|
-
1. Bail if any of the prereq tools are not there
|
19
20
|
1. Keep assets in their source folders
|
20
|
-
1.
|
21
|
-
1. `revealing init` creates a new project with the right structure, already `git init`-ed
|
21
|
+
1. Bail if any of the prereq tools are not there
|
22
22
|
1. Target folders mirror source, so that we don't risk duplicates
|
23
23
|
1. Expose customization of
|
24
24
|
* highlight-style
|
@@ -30,4 +30,5 @@ Additional features:
|
|
30
30
|
1. Add mathjax (copy to target if present, otherwise use CDN)
|
31
31
|
1. Provide a docker image so that we can run without installing everything
|
32
32
|
1. PDF output
|
33
|
+
1. Make the initial set of files more meaningful (e.g. add the project name, `git config user.name` etc.)
|
33
34
|
1. Web interface for live editing
|
data/Rakefile
CHANGED
data/exe/revealing
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
* create src/index.markdown
|
7
|
-
* create Gemfile
|
8
|
-
* create Rakefile
|
9
|
-
* say that 'rake --tasks' is the next thing to do
|
10
|
-
EOM
|
4
|
+
require 'revealing/cli'
|
5
|
+
|
6
|
+
Revealing::CLI.start(ARGV)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module Revealing
|
4
|
+
class CLI < Thor
|
5
|
+
desc 'init DIRECTORY', "initialize a new revealing project in DIRECTORY."
|
6
|
+
def init(directory)
|
7
|
+
project_directory = Pathname(directory)
|
8
|
+
project_directory.mkdir
|
9
|
+
|
10
|
+
templates_directory = Pathname(__dir__) / '../../templates'
|
11
|
+
FileUtils.cp_r(templates_directory / 'init/.', project_directory)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/revealing/tasks.rb
CHANGED
@@ -16,15 +16,16 @@ GPP_FILES = FileList["#{GPP_DIR}/index.markdown"]
|
|
16
16
|
CLEAN.include GPP_DIR, DIRTY_FILE
|
17
17
|
CLOBBER.include TARGET_DIR
|
18
18
|
|
19
|
-
REVEAL_JS =
|
19
|
+
REVEAL_JS = 'reveal.js'.freeze
|
20
20
|
REVEAL_JS_TARGET_DIR = TARGET_DIR / REVEAL_JS
|
21
|
-
REVEAL_JS_VERSION = '3.7.0'.freeze
|
22
21
|
|
23
22
|
RESIZABLE_ASSETS = (FileList["assets/*.png"] + FileList["assets/*.jpg"])
|
24
23
|
RESIZED_ASSETS = RESIZABLE_ASSETS.pathmap("#{TARGET_DIR}/%f")
|
25
24
|
ASSET_SOURCES = FileList['assets/*'] - RESIZABLE_ASSETS
|
26
25
|
ASSETS = ASSET_SOURCES.pathmap("#{TARGET_DIR}/%f") - RESIZED_ASSETS
|
27
26
|
|
27
|
+
HEADERS = FileList["headers/*"] # These are included literal; no need to copy them
|
28
|
+
|
28
29
|
load "#{__dir__}/tasks/assets.rake"
|
29
30
|
load "#{__dir__}/tasks/reveal.js.rake"
|
30
31
|
load "#{__dir__}/tasks/gpp.rake"
|
@@ -32,7 +33,7 @@ load "#{__dir__}/tasks/gpp.rake"
|
|
32
33
|
git_dirty_file DIRTY_FILE
|
33
34
|
|
34
35
|
desc "Build #{TARGET_FILE}"
|
35
|
-
file TARGET_FILE => [ TARGET_DIR, REVEAL_JS_TARGET_DIR, GPP_FILES, DIRTY_FILE ] + ASSETS + RESIZED_ASSETS do
|
36
|
+
file TARGET_FILE => [ TARGET_DIR, REVEAL_JS_TARGET_DIR, GPP_FILES, DIRTY_FILE ] + ASSETS + RESIZED_ASSETS + HEADERS do
|
36
37
|
sh %(pandoc
|
37
38
|
--to=revealjs
|
38
39
|
--standalone
|
@@ -43,9 +44,7 @@ file TARGET_FILE => [ TARGET_DIR, REVEAL_JS_TARGET_DIR, GPP_FILES, DIRTY_FILE ]
|
|
43
44
|
--variable slideNumber=true
|
44
45
|
--variable history=true
|
45
46
|
--variable revealjs-url=#{REVEAL_JS}
|
46
|
-
--include-in-header=#{
|
47
|
+
#{HEADERS.map { |h| "--include-in-header=#{h}" }.join("\n")}
|
47
48
|
#{GPP_FILES}
|
48
49
|
).split("\n").join(' ')
|
49
50
|
end
|
50
|
-
|
51
|
-
task default: TARGET_FILE
|
data/lib/revealing/version.rb
CHANGED
data/revealing.gemspec
CHANGED
@@ -27,5 +27,11 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_dependency 'rake'
|
28
28
|
spec.add_dependency 'bundler'
|
29
29
|
spec.add_dependency 'git-dirty'
|
30
|
+
spec.add_dependency 'thor'
|
31
|
+
|
32
|
+
spec.add_development_dependency 'aruba'
|
33
|
+
spec.add_development_dependency 'pry'
|
34
|
+
spec.add_development_dependency 'pry-byebug'
|
35
|
+
spec.add_development_dependency 'rspec'
|
30
36
|
end
|
31
37
|
# rubocop:enable Metrics/BlockLength
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# New Presentation
|
2
|
+
|
3
|
+
This is the source of New Presentation. It was generated with [`revealing`](https://github.com/suhlig/revealing).
|
4
|
+
|
5
|
+
# Features
|
6
|
+
|
7
|
+
* Images are resized for the web using [`graphicsmagick`](http://www.graphicsmagick.org/)
|
8
|
+
* Embedded [`ditaa`](http://ditaa.sourceforge.net/) snippets are rendered to images
|
9
|
+
* `#include` and other [`gpp`](https://logological.org/gpp) features allow organizing the sources of complex presentations
|
10
|
+
* Files in the `headers` folder are included verbatim in the HTML `<head>` section
|
11
|
+
|
12
|
+
# Setup
|
13
|
+
|
14
|
+
Do this once:
|
15
|
+
|
16
|
+
1. Get Ruby if not already present
|
17
|
+
1. `gem install bundler`
|
18
|
+
1. `bundle install`
|
19
|
+
|
20
|
+
# Generate the Presentation
|
21
|
+
|
22
|
+
1. Run `rake` in the project directory
|
23
|
+
1. Open `public_html/index.html` in a browser
|
@@ -0,0 +1,17 @@
|
|
1
|
+
% New Presentation
|
2
|
+
% The Author
|
3
|
+
|
4
|
+
# First Slide
|
5
|
+
|
6
|
+
* Written in Markdown
|
7
|
+
* Created with [`revealing`](https://github.com/suhlig/revealing)
|
8
|
+
* Based on [reveal.js](https://revealjs.com)
|
9
|
+
|
10
|
+
# What's next?
|
11
|
+
|
12
|
+
```console
|
13
|
+
10 rake
|
14
|
+
20 open public_html/index.html
|
15
|
+
30 vim src/index.markdown
|
16
|
+
40 goto 10
|
17
|
+
```
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# New Presentation
|
2
|
+
|
3
|
+
This is the source of New Presentation. It was generated with [`revealing`](https://github.com/suhlig/revealing).
|
4
|
+
|
5
|
+
# Setup (once)
|
6
|
+
|
7
|
+
1. Get Ruby
|
8
|
+
1. `gem install bundler`
|
9
|
+
1. Run `rake` in the project directory
|
10
|
+
1. Open `public_html/index.html` in a browser
|
@@ -0,0 +1,18 @@
|
|
1
|
+
% New Presentation
|
2
|
+
% The Author
|
3
|
+
|
4
|
+
# First Slide
|
5
|
+
|
6
|
+
* Written in Markdown
|
7
|
+
* Created with [`revealing`](https://github.com/suhlig/revealing)
|
8
|
+
* Based on [reveal.js](https://revealjs.com)
|
9
|
+
|
10
|
+
# What's next?
|
11
|
+
|
12
|
+
```console
|
13
|
+
10. bundle install
|
14
|
+
20. rake
|
15
|
+
30. open `public_html/index.html`
|
16
|
+
40. vim src/index.markdown
|
17
|
+
50. goto 20
|
18
|
+
```
|
@@ -0,0 +1 @@
|
|
1
|
+
1 examples, 0 failures in 0.4326 seconds
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revealing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steffen Uhlig
|
@@ -52,6 +52,76 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: thor
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: aruba
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry-byebug
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
55
125
|
description: |-
|
56
126
|
Provides a workflow for creating reveal.js
|
57
127
|
presentations. It uses pandoc to create the
|
@@ -60,7 +130,6 @@ email:
|
|
60
130
|
- steffen@familie-uhlig.net
|
61
131
|
executables:
|
62
132
|
- revealing
|
63
|
-
- revealing-task
|
64
133
|
extensions: []
|
65
134
|
extra_rdoc_files: []
|
66
135
|
files:
|
@@ -69,13 +138,22 @@ files:
|
|
69
138
|
- README.markdown
|
70
139
|
- Rakefile
|
71
140
|
- exe/revealing
|
72
|
-
-
|
141
|
+
- lib/revealing/cli.rb
|
73
142
|
- lib/revealing/tasks.rb
|
74
143
|
- lib/revealing/tasks/assets.rake
|
75
144
|
- lib/revealing/tasks/gpp.rake
|
76
145
|
- lib/revealing/tasks/reveal.js.rake
|
77
146
|
- lib/revealing/version.rb
|
78
147
|
- revealing.gemspec
|
148
|
+
- templates/init/Gemfile
|
149
|
+
- templates/init/README.markdown
|
150
|
+
- templates/init/Rakefile
|
151
|
+
- templates/init/src/index.markdown
|
152
|
+
- tmp/aruba/shiny-new-presentation/Gemfile
|
153
|
+
- tmp/aruba/shiny-new-presentation/README.markdown
|
154
|
+
- tmp/aruba/shiny-new-presentation/Rakefile
|
155
|
+
- tmp/aruba/shiny-new-presentation/src/index.markdown
|
156
|
+
- tmp/rspec_guard_result
|
79
157
|
homepage:
|
80
158
|
licenses:
|
81
159
|
- MIT
|
data/exe/revealing-task
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# probably obsolete
|
4
|
-
|
5
|
-
require 'rake'
|
6
|
-
require 'bundler'
|
7
|
-
raise "Bundler is required. Please install bundler with 'gem install bundler'" unless defined?(Bundler)
|
8
|
-
|
9
|
-
Bundler.setup
|
10
|
-
app = Rake.application
|
11
|
-
|
12
|
-
app.init
|
13
|
-
# Pathname(__dir__).parent.glob('{lib/**/*.rake}').each { |t| load t }
|
14
|
-
require 'revealing/tasks'
|
15
|
-
|
16
|
-
tasks = app.tasks
|
17
|
-
if ARGV.empty?
|
18
|
-
warn "Missing task. Expect one of #{tasks.join(", ")}"
|
19
|
-
exit 1
|
20
|
-
end
|
21
|
-
|
22
|
-
task = ARGV[0]
|
23
|
-
|
24
|
-
if ! tasks.include?(task)
|
25
|
-
warn "No such task: #{task}"
|
26
|
-
exit 1
|
27
|
-
end
|
28
|
-
|
29
|
-
app.invoke_task(task)
|