briefing 0.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.
Files changed (60) hide show
  1. data/.gitignore +4 -0
  2. data/.gitmodules +3 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +22 -0
  5. data/README.md +95 -0
  6. data/Rakefile +26 -0
  7. data/bin/briefing +28 -0
  8. data/briefing.gemspec +19 -0
  9. data/lib/briefing/app.rb +20 -0
  10. data/lib/briefing/public/css/print/paper.css +176 -0
  11. data/lib/briefing/public/css/print/pdf.css +160 -0
  12. data/lib/briefing/public/css/reveal.css +1281 -0
  13. data/lib/briefing/public/css/reveal.min.css +7 -0
  14. data/lib/briefing/public/css/shaders/tile-flip.fs +64 -0
  15. data/lib/briefing/public/css/shaders/tile-flip.vs +141 -0
  16. data/lib/briefing/public/css/theme/README.md +5 -0
  17. data/lib/briefing/public/css/theme/beige.css +163 -0
  18. data/lib/briefing/public/css/theme/default.css +163 -0
  19. data/lib/briefing/public/css/theme/night.css +150 -0
  20. data/lib/briefing/public/css/theme/serif.css +150 -0
  21. data/lib/briefing/public/css/theme/simple.css +152 -0
  22. data/lib/briefing/public/css/theme/sky.css +156 -0
  23. data/lib/briefing/public/css/theme/source/beige.scss +50 -0
  24. data/lib/briefing/public/css/theme/source/default.scss +42 -0
  25. data/lib/briefing/public/css/theme/source/night.scss +35 -0
  26. data/lib/briefing/public/css/theme/source/serif.scss +33 -0
  27. data/lib/briefing/public/css/theme/source/simple.scss +38 -0
  28. data/lib/briefing/public/css/theme/source/sky.scss +41 -0
  29. data/lib/briefing/public/css/theme/template/mixins.scss +29 -0
  30. data/lib/briefing/public/css/theme/template/settings.scss +33 -0
  31. data/lib/briefing/public/css/theme/template/theme.scss +163 -0
  32. data/lib/briefing/public/js/reveal.js +1634 -0
  33. data/lib/briefing/public/js/reveal.min.js +8 -0
  34. data/lib/briefing/public/lib/css/zenburn.css +115 -0
  35. data/lib/briefing/public/lib/font/league_gothic-webfont.eot +0 -0
  36. data/lib/briefing/public/lib/font/league_gothic-webfont.svg +230 -0
  37. data/lib/briefing/public/lib/font/league_gothic-webfont.ttf +0 -0
  38. data/lib/briefing/public/lib/font/league_gothic-webfont.woff +0 -0
  39. data/lib/briefing/public/lib/font/league_gothic_license +2 -0
  40. data/lib/briefing/public/lib/js/classList.js +2 -0
  41. data/lib/briefing/public/lib/js/head.min.js +8 -0
  42. data/lib/briefing/public/lib/js/html5shiv.js +7 -0
  43. data/lib/briefing/public/plugin/highlight/highlight.js +14 -0
  44. data/lib/briefing/public/plugin/markdown/markdown.js +37 -0
  45. data/lib/briefing/public/plugin/markdown/showdown.js +62 -0
  46. data/lib/briefing/public/plugin/notes/notes.html +143 -0
  47. data/lib/briefing/public/plugin/notes/notes.js +98 -0
  48. data/lib/briefing/public/plugin/notes-server/client.js +57 -0
  49. data/lib/briefing/public/plugin/notes-server/index.js +58 -0
  50. data/lib/briefing/public/plugin/notes-server/notes.html +139 -0
  51. data/lib/briefing/public/plugin/postmessage/example.html +39 -0
  52. data/lib/briefing/public/plugin/postmessage/postmessage.js +42 -0
  53. data/lib/briefing/public/plugin/remotes/remotes.js +19 -0
  54. data/lib/briefing/public/plugin/zoom-js/zoom.js +251 -0
  55. data/lib/briefing/slides.rb +37 -0
  56. data/lib/briefing/version.rb +3 -0
  57. data/lib/briefing/views/index.erb +79 -0
  58. data/lib/briefing.rb +5 -0
  59. data/vendor/.gitkeep +0 -0
  60. metadata +140 -0
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .rvmrc
2
+ Gemfile.lock
3
+ vendor/*
4
+ pkg/
data/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "vendor/reveal.js"]
2
+ path = vendor/reveal.js
3
+ url = https://github.com/hakimel/reveal.js.git
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in briefing.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 kambara
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # Briefing
2
+
3
+ Briefing is a presentation tool that lets you create slides from a text file written in [Markdown](http://daringfireball.net/projects/markdown/).
4
+
5
+ By executing `briefing` command and specifying a text file,
6
+ you can show it as a beautiful slides in your web browser.
7
+
8
+ ## Features
9
+
10
+ - Easy to describe contents in slides by using Markdown
11
+ - Produces beautiful HTML5-based slides powered by [reveal.js](https://github.com/hakimel/reveal.js/)
12
+
13
+ ## Installation
14
+
15
+ Install Ruby on ahead, then execute:
16
+
17
+ $ sudo gem install briefing
18
+
19
+ ## Usage
20
+
21
+ $ briefing slides.md
22
+
23
+ Open [http://localhost:4567/](http://localhost:4567/) in a web browser.
24
+
25
+ ## Syntax
26
+
27
+ - Each slide is written in Markdown syntax.
28
+ - Slides are separated by 3 or more hyphens (`---`).
29
+ - You can customize the appearance and controls of the slides by specifying settings before the first slide. See below.
30
+
31
+ ### Example
32
+
33
+ title : Slide Title Here
34
+ author : Keisuke Kambara
35
+ theme : beige
36
+ transition : concave
37
+ controls : true
38
+
39
+ ---
40
+ # Slide Title
41
+ ### Keisuke Kambara
42
+ 2012-12-12
43
+
44
+ ---
45
+ ## Second Slide
46
+ Hello!
47
+
48
+ ---
49
+ ## Third Slide
50
+ - list item1
51
+ - list item2
52
+
53
+ ### Settings
54
+
55
+ title : Slide Title
56
+ author : Your Name
57
+ theme : [default|beige|night|serif|simple|sky]
58
+ transition : [default|cube|page|concave|zoom|linear|none]
59
+ controls : false
60
+ progress : true
61
+ history : true
62
+ keyboard : true
63
+ overview : true
64
+ center : true
65
+ loop : false
66
+ rtl : false
67
+ autoSlide : 0
68
+ mouseWheel : false
69
+ rollingLinks : false
70
+ style: |
71
+ .reveal img {
72
+ max-height: 80%;
73
+ }
74
+ .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
75
+ text-transform: none;
76
+ font-family: sans-serif;
77
+ font-weight: bold;
78
+ }
79
+
80
+ ## Manually Build and Install (For Developers)
81
+
82
+ $ git clone git@github.com:kambara/briefing.git
83
+ $ cd briefing
84
+
85
+ If you use RVM, create .rvmrc:
86
+
87
+ $ rvm --rvmrc --create ruby-1.9.3@briefing
88
+
89
+ $ bundle install
90
+ $ rake build
91
+ $ rake install
92
+
93
+ ## License
94
+
95
+ [MIT license](http://opensource.org/licenses/MIT)
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+
4
+ Rake::Task[:build].enhance(['revealjs:build'])
5
+
6
+ task :clean do
7
+ Rake::Task['revealjs:clean'].invoke
8
+ rm_rf './pkg'
9
+ end
10
+
11
+ namespace :revealjs do
12
+ task :build do
13
+ sh 'git submodule update --init'
14
+ mkdir_p './lib/briefing/public'
15
+ ['css','js', 'lib', 'plugin'].each {|dir|
16
+ cp_r(
17
+ File.join('./vendor/reveal.js/', dir),
18
+ './lib/briefing/public/')
19
+ }
20
+ end
21
+
22
+ task :clean do
23
+ rm_rf './lib/briefing/public'
24
+ rm_rf './vendor/reveal.js'
25
+ end
26
+ end
data/bin/briefing ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../lib')
5
+ require 'briefing'
6
+
7
+ options = {}
8
+ opt_parser = OptionParser.new do |opts|
9
+ opts.banner = "Usage: briefing [options] slides.md"
10
+
11
+ opts.on('-p PORT', '--port=PORT') do |v|
12
+ options[:port] = v
13
+ end
14
+ end
15
+
16
+ argv = opt_parser.parse(ARGV)
17
+ if argv.length == 0
18
+ puts opt_parser.help
19
+ exit 1
20
+ end
21
+ unless File.exist?(argv[0])
22
+ puts "The file '#{argv[0]}' does not exist."
23
+ exit 1
24
+ end
25
+
26
+ Briefing::App.run!(
27
+ :slides_source => argv.shift
28
+ )
data/briefing.gemspec ADDED
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/briefing/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["kambara"]
6
+ gem.email = ["kambara@sappari.org"]
7
+ gem.description = %q{Briefing is a presentation tool that lets you create slides from a text file written in Markdown. By executing 'briefing' command and specifying a text file, you can show it as a beautiful slides in your web browser.}
8
+ gem.summary = %q{A presentation tool that lets you create slides from a text file written in Markdown}
9
+ gem.homepage = "https://github.com/kambara/briefing"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "briefing"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Briefing::VERSION
17
+ gem.add_dependency 'sinatra'
18
+ gem.add_dependency 'sinatra-reloader'
19
+ end
@@ -0,0 +1,20 @@
1
+ require 'sinatra/base'
2
+ require 'sinatra/reloader'
3
+ require 'briefing/slides'
4
+
5
+ module Briefing
6
+ class App < Sinatra::Base
7
+ configure :development do
8
+ register Sinatra::Reloader
9
+ dir = File.dirname(__FILE__)
10
+ set :public_folder, File.join(dir, 'public')
11
+ set :views, File.join(dir, 'views')
12
+ end
13
+
14
+ get '/' do
15
+ @slides = Slides.new(settings.slides_source)
16
+ @options = @slides.options
17
+ erb :index
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,176 @@
1
+ /* Default Print Stylesheet Template
2
+ by Rob Glazebrook of CSSnewbie.com
3
+ Last Updated: June 4, 2008
4
+
5
+ Feel free (nay, compelled) to edit, append, and
6
+ manipulate this file as you see fit. */
7
+
8
+
9
+ /* SECTION 1: Set default width, margin, float, and
10
+ background. This prevents elements from extending
11
+ beyond the edge of the printed page, and prevents
12
+ unnecessary background images from printing */
13
+ body {
14
+ background: #fff;
15
+ font-size: 13pt;
16
+ width: auto;
17
+ height: auto;
18
+ border: 0;
19
+ margin: 0 5%;
20
+ padding: 0;
21
+ float: none !important;
22
+ overflow: visible;
23
+ }
24
+ html {
25
+ background: #fff;
26
+ width: auto;
27
+ height: auto;
28
+ overflow: visible;
29
+ }
30
+
31
+ /* SECTION 2: Remove any elements not needed in print.
32
+ This would include navigation, ads, sidebars, etc. */
33
+ .nestedarrow,
34
+ .controls,
35
+ .reveal .progress,
36
+ .reveal.overview,
37
+ .fork-reveal,
38
+ .share-reveal,
39
+ .state-background {
40
+ display: none !important;
41
+ }
42
+
43
+ /* SECTION 3: Set body font face, size, and color.
44
+ Consider using a serif font for readability. */
45
+ body, p, td, li, div, a {
46
+ font-size: 16pt!important;
47
+ font-family: Georgia, "Times New Roman", Times, serif !important;
48
+ color: #000;
49
+ }
50
+
51
+ /* SECTION 4: Set heading font face, sizes, and color.
52
+ Diffrentiate your headings from your body text.
53
+ Perhaps use a large sans-serif for distinction. */
54
+ h1,h2,h3,h4,h5,h6 {
55
+ color: #000!important;
56
+ height: auto;
57
+ line-height: normal;
58
+ font-family: Georgia, "Times New Roman", Times, serif !important;
59
+ text-shadow: 0 0 0 #000 !important;
60
+ text-align: left;
61
+ letter-spacing: normal;
62
+ }
63
+ /* Need to reduce the size of the fonts for printing */
64
+ h1 { font-size: 26pt !important; }
65
+ h2 { font-size: 22pt !important; }
66
+ h3 { font-size: 20pt !important; }
67
+ h4 { font-size: 20pt !important; font-variant: small-caps; }
68
+ h5 { font-size: 19pt !important; }
69
+ h6 { font-size: 18pt !important; font-style: italic; }
70
+
71
+ /* SECTION 5: Make hyperlinks more usable.
72
+ Ensure links are underlined, and consider appending
73
+ the URL to the end of the link for usability. */
74
+ a:link,
75
+ a:visited {
76
+ color: #000 !important;
77
+ font-weight: bold;
78
+ text-decoration: underline;
79
+ }
80
+ /*
81
+ .reveal a:link:after,
82
+ .reveal a:visited:after {
83
+ content: " (" attr(href) ") ";
84
+ color: #222 !important;
85
+ font-size: 90%;
86
+ }
87
+ */
88
+
89
+
90
+ /* SECTION 6: more reveal.js specific additions by @skypanther */
91
+ ul, ol, div, p {
92
+ visibility: visible;
93
+ position: static;
94
+ width: auto;
95
+ height: auto;
96
+ display: block;
97
+ overflow: visible;
98
+ margin: auto;
99
+ text-align: left !important;
100
+ }
101
+ .reveal .slides {
102
+ position: static;
103
+ width: auto;
104
+ height: auto;
105
+
106
+ left: auto;
107
+ top: auto;
108
+ margin-left: auto;
109
+ margin-top: auto;
110
+ padding: auto;
111
+
112
+ overflow: visible;
113
+ display: block;
114
+
115
+ text-align: center;
116
+ -webkit-perspective: none;
117
+ -moz-perspective: none;
118
+ -ms-perspective: none;
119
+ perspective: none;
120
+
121
+ -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */
122
+ -moz-perspective-origin: 50% 50%;
123
+ -ms-perspective-origin: 50% 50%;
124
+ perspective-origin: 50% 50%;
125
+ }
126
+ .reveal .slides>section,
127
+ .reveal .slides>section>section {
128
+
129
+ visibility: visible !important;
130
+ position: static !important;
131
+ width: 90% !important;
132
+ height: auto !important;
133
+ display: block !important;
134
+ overflow: visible !important;
135
+
136
+ left: 0% !important;
137
+ top: 0% !important;
138
+ margin-left: 0px !important;
139
+ margin-top: 0px !important;
140
+ padding: 20px 0px !important;
141
+
142
+ opacity: 1 !important;
143
+
144
+ -webkit-transform-style: flat !important;
145
+ -moz-transform-style: flat !important;
146
+ -ms-transform-style: flat !important;
147
+ transform-style: flat !important;
148
+
149
+ -webkit-transform: none !important;
150
+ -moz-transform: none !important;
151
+ -ms-transform: none !important;
152
+ transform: none !important;
153
+ }
154
+ .reveal section {
155
+ page-break-after: always !important;
156
+ display: block !important;
157
+ }
158
+ .reveal section .fragment {
159
+ opacity: 1 !important;
160
+ visibility: visible !important;
161
+
162
+ -webkit-transform: none !important;
163
+ -moz-transform: none !important;
164
+ -ms-transform: none !important;
165
+ transform: none !important;
166
+ }
167
+ .reveal section:last-of-type {
168
+ page-break-after: avoid !important;
169
+ }
170
+ .reveal section img {
171
+ display: block;
172
+ margin: 15px 0px;
173
+ background: rgba(255,255,255,1);
174
+ border: 1px solid #666;
175
+ box-shadow: none;
176
+ }
@@ -0,0 +1,160 @@
1
+ /* Default Print Stylesheet Template
2
+ by Rob Glazebrook of CSSnewbie.com
3
+ Last Updated: June 4, 2008
4
+
5
+ Feel free (nay, compelled) to edit, append, and
6
+ manipulate this file as you see fit. */
7
+
8
+
9
+ /* SECTION 1: Set default width, margin, float, and
10
+ background. This prevents elements from extending
11
+ beyond the edge of the printed page, and prevents
12
+ unnecessary background images from printing */
13
+ * {
14
+ -webkit-print-color-adjust: exact;
15
+ }
16
+
17
+ body {
18
+ font-size: 18pt;
19
+ width: auto;
20
+ height: auto;
21
+ border: 0;
22
+ margin: 0 5%;
23
+ padding: 0;
24
+ float: none !important;
25
+ overflow: visible;
26
+ background-image: none !important;
27
+ }
28
+
29
+ html {
30
+ width: auto;
31
+ height: auto;
32
+ overflow: visible;
33
+ }
34
+
35
+ /* SECTION 2: Remove any elements not needed in print.
36
+ This would include navigation, ads, sidebars, etc. */
37
+ .nestedarrow,
38
+ .controls,
39
+ .reveal .progress,
40
+ .reveal.overview,
41
+ .fork-reveal,
42
+ .share-reveal,
43
+ .state-background {
44
+ display: none !important;
45
+ }
46
+
47
+ /* SECTION 3: Set body font face, size, and color.
48
+ Consider using a serif font for readability. */
49
+ body, p, td, li, div {
50
+ font-size: 18pt;
51
+ }
52
+
53
+ /* SECTION 4: Set heading font face, sizes, and color.
54
+ Diffrentiate your headings from your body text.
55
+ Perhaps use a large sans-serif for distinction. */
56
+ h1,h2,h3,h4,h5,h6 {
57
+ text-shadow: 0 0 0 #000 !important;
58
+ }
59
+
60
+ /* SECTION 5: Make hyperlinks more usable.
61
+ Ensure links are underlined, and consider appending
62
+ the URL to the end of the link for usability. */
63
+ a:link,
64
+ a:visited {
65
+ font-weight: bold;
66
+ text-decoration: underline;
67
+ }
68
+
69
+
70
+ /* SECTION 6: more reveal.js specific additions by @skypanther */
71
+ ul, ol, div, p {
72
+ visibility: visible;
73
+ position: static;
74
+ width: auto;
75
+ height: auto;
76
+ display: block;
77
+ overflow: visible;
78
+ margin: auto;
79
+ }
80
+ .reveal .slides {
81
+ position: static;
82
+ width: 100%;
83
+ height: auto;
84
+
85
+ left: auto;
86
+ top: auto;
87
+ margin-left: auto;
88
+ margin-right: auto;
89
+ margin-top: auto;
90
+ padding: auto;
91
+
92
+ overflow: visible;
93
+ display: block;
94
+
95
+ text-align: center;
96
+
97
+ -webkit-perspective: none;
98
+ -moz-perspective: none;
99
+ -ms-perspective: none;
100
+ perspective: none;
101
+
102
+ -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */
103
+ -moz-perspective-origin: 50% 50%;
104
+ -ms-perspective-origin: 50% 50%;
105
+ perspective-origin: 50% 50%;
106
+ }
107
+ .reveal .slides section {
108
+
109
+ page-break-after: always !important;
110
+
111
+ visibility: visible !important;
112
+ position: static !important;
113
+ width: 100% !important;
114
+ height: auto !important;
115
+ min-height: initial !important;
116
+ display: block !important;
117
+ overflow: visible !important;
118
+
119
+ left: 0 !important;
120
+ top: 0 !important;
121
+ margin-left: 0px !important;
122
+ margin-top: 50px !important;
123
+ padding: 20px 0px !important;
124
+
125
+ opacity: 1 !important;
126
+
127
+ -webkit-transform-style: flat !important;
128
+ -moz-transform-style: flat !important;
129
+ -ms-transform-style: flat !important;
130
+ transform-style: flat !important;
131
+
132
+ -webkit-transform: none !important;
133
+ -moz-transform: none !important;
134
+ -ms-transform: none !important;
135
+ transform: none !important;
136
+ }
137
+ .reveal section.stack {
138
+ margin: 0px !important;
139
+ padding: 0px !important;
140
+ page-break-after: avoid !important;
141
+ }
142
+ .reveal section .fragment {
143
+ opacity: 1 !important;
144
+ visibility: visible !important;
145
+
146
+ -webkit-transform: none !important;
147
+ -moz-transform: none !important;
148
+ -ms-transform: none !important;
149
+ transform: none !important;
150
+ }
151
+ .reveal img {
152
+ box-shadow: none;
153
+ }
154
+ .reveal .roll {
155
+ overflow: visible;
156
+ line-height: 1em;
157
+ }
158
+ .reveal small a {
159
+ font-size: 16pt !important;
160
+ }