vimdeck 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/vimdeck +31 -37
- data/lib/vimdeck.rb +19 -8
- data/presentation/script.vim +7 -7
- data/presentation/slide001.md +3 -10
- data/presentation/slide002.md +1 -5
- data/presentation/slide003.md +1 -4
- data/presentation/slide004.md +1 -4
- data/presentation/slide005.md +1 -5
- data/presentation/slide006.md +1 -5
- data/presentation/slide007.md +1 -5
- data/presentation/slide008.md +1 -4
- data/presentation/slide009.md +1 -4
- data/presentation/slide010.md +1 -4
- data/presentation/slide011.md +1 -4
- data/presentation/slide012.md +1 -4
- data/presentation/slide013.md +1 -4
- data/presentation/slide014.md +1 -4
- data/presentation/slide015.md +1 -5
- metadata +1 -7
- data/vimdeck-0.0.9.gem +0 -0
- data/vimdeck-0.1.0.gem +0 -0
- data/vimdeck-0.1.1.gem +0 -0
- data/vimdeck-0.1.2.gem +0 -0
- data/vimdeck-0.1.3.gem +0 -0
- data/vimdeck-0.1.4.gem +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/bin/vimdeck
CHANGED
@@ -3,10 +3,15 @@
|
|
3
3
|
#>
|
4
4
|
#> Commands:
|
5
5
|
#>
|
6
|
-
#> slideshow
|
7
|
-
#> generate
|
8
|
-
#> open
|
6
|
+
#> slideshow generate and show slides (default)
|
7
|
+
#> generate generate slides only
|
8
|
+
#> open open slides in presentation folder (no file needed)
|
9
|
+
#>
|
10
|
+
#> Options:
|
11
|
+
#>
|
12
|
+
#> --no-ascii skip ascii headers
|
9
13
|
|
14
|
+
require "optparse"
|
10
15
|
require "vimdeck"
|
11
16
|
|
12
17
|
def usage
|
@@ -15,54 +20,43 @@ def usage
|
|
15
20
|
end
|
16
21
|
end
|
17
22
|
|
18
|
-
def check_file(file)
|
19
|
-
if !File.exists?(file)
|
23
|
+
def check_file(file, opt_parser)
|
24
|
+
if !file || !File.exists?(file)
|
20
25
|
usage
|
21
26
|
puts "\nFile does not exist! #{file}"
|
22
27
|
exit 0
|
23
28
|
end
|
24
29
|
end
|
25
30
|
|
26
|
-
|
27
|
-
|
28
|
-
|
31
|
+
options = {}
|
32
|
+
|
33
|
+
opt_parser = OptionParser.new do |opt|
|
34
|
+
opt.on("-A", "--no-ascii") do
|
35
|
+
options[:no_ascii] = true
|
36
|
+
end
|
29
37
|
end
|
30
38
|
|
31
|
-
|
32
|
-
usage
|
33
|
-
exit 0
|
34
|
-
elsif ARGV.length == 1
|
35
|
-
if ARGV[0] == "open"
|
36
|
-
Vimdeck::Slideshow.open
|
37
|
-
else
|
38
|
-
file = ARGV[0]
|
39
|
-
check_file file
|
39
|
+
opt_parser.parse!
|
40
40
|
|
41
|
-
|
42
|
-
end
|
43
|
-
elsif ARGV.length == 2
|
44
|
-
command = ARGV[0]
|
45
|
-
file = ARGV[1]
|
41
|
+
file = ARGV.length > 1 ? ARGV[1] : ARGV[0]
|
46
42
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
end
|
43
|
+
if !ARGV[0] || ( ARGV[0] && ARGV[0] != "open" )
|
44
|
+
check_file(file, opt_parser)
|
45
|
+
end
|
51
46
|
|
52
|
-
|
47
|
+
case ARGV[0]
|
48
|
+
when "slideshow"
|
49
|
+
Vimdeck::Slideshow.start(file, options)
|
50
|
+
when "generate"
|
51
|
+
Vimdeck::Slideshow.generate(file, options)
|
52
|
+
when "open"
|
53
|
+
if ARGV.length == 2
|
53
54
|
puts "Vimdeck will open already existing slides"
|
54
55
|
puts "File name will be ignored"
|
55
56
|
sleep 3
|
56
|
-
else
|
57
|
-
check_file file
|
58
57
|
end
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
when "generate"
|
64
|
-
Vimdeck::Slideshow.generate(file)
|
65
|
-
else # open
|
66
|
-
Vimdeck::Slideshow.open()
|
67
|
-
end
|
59
|
+
Vimdeck::Slideshow.open
|
60
|
+
else
|
61
|
+
Vimdeck::Slideshow.start(file, options)
|
68
62
|
end
|
data/lib/vimdeck.rb
CHANGED
@@ -61,12 +61,16 @@ module Vimdeck
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def header(title, level)
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
if !Vimdeck::Slideshow.options[:no_ascii]
|
65
|
+
case level
|
66
|
+
when 1
|
67
|
+
Vimdeck::Ascii.header(title, "large") + "\n"
|
67
68
|
|
68
|
-
|
69
|
-
|
69
|
+
when 2
|
70
|
+
Vimdeck::Ascii.header(title, "small") + "\n"
|
71
|
+
end
|
72
|
+
else
|
73
|
+
title + "\n\n"
|
70
74
|
end
|
71
75
|
end
|
72
76
|
|
@@ -88,6 +92,12 @@ module Vimdeck
|
|
88
92
|
end
|
89
93
|
|
90
94
|
class Slideshow
|
95
|
+
@options = {}
|
96
|
+
|
97
|
+
def self.options
|
98
|
+
@options
|
99
|
+
end
|
100
|
+
|
91
101
|
def self.slide_padding
|
92
102
|
" "
|
93
103
|
end
|
@@ -97,7 +107,8 @@ module Vimdeck
|
|
97
107
|
template.result(binding)
|
98
108
|
end
|
99
109
|
|
100
|
-
def self.generate(filename)
|
110
|
+
def self.generate(filename, options)
|
111
|
+
@options = options
|
101
112
|
slides = File.read(filename)
|
102
113
|
|
103
114
|
renderer = Redcarpet::Markdown.new(Vimdeck::Render, :fenced_code_blocks => true)
|
@@ -192,8 +203,8 @@ module Vimdeck
|
|
192
203
|
exec 'vim presentation/*.md -S presentation/script.vim'
|
193
204
|
end
|
194
205
|
|
195
|
-
def self.start(filename)
|
196
|
-
generate(filename)
|
206
|
+
def self.start(filename, options)
|
207
|
+
generate(filename, options)
|
197
208
|
open
|
198
209
|
end
|
199
210
|
end
|
data/presentation/script.vim
CHANGED
@@ -45,13 +45,13 @@ call matchadd("Comment", "• First\\n • Second\\(\\_.*slide 7\\)\\@=")
|
|
45
45
|
|
46
46
|
b 8
|
47
47
|
|
48
|
-
|
48
|
+
3,14SyntaxInclude ruby
|
49
49
|
|
50
50
|
|
51
51
|
|
52
52
|
b 9
|
53
53
|
|
54
|
-
|
54
|
+
3,14SyntaxInclude ruby
|
55
55
|
|
56
56
|
|
57
57
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \\(\\_.*slide 9\\)\\@=")
|
@@ -61,7 +61,7 @@ call matchadd("Comment", "\\n end\\n end\\n end\\(\\_
|
|
61
61
|
|
62
62
|
b 10
|
63
63
|
|
64
|
-
|
64
|
+
3,14SyntaxInclude ruby
|
65
65
|
|
66
66
|
|
67
67
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def\\(\\_.*slide 10\\)\\@=")
|
@@ -71,7 +71,7 @@ call matchadd("Comment", "highlight = \"vimdeck\"\\n end\\n
|
|
71
71
|
|
72
72
|
b 11
|
73
73
|
|
74
|
-
|
74
|
+
3,14SyntaxInclude ruby
|
75
75
|
|
76
76
|
|
77
77
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\(\\_.*slide 11\\)\\@=")
|
@@ -81,7 +81,7 @@ call matchadd("Comment", "= \"vimdeck\"\\n end\\n end\\n
|
|
81
81
|
|
82
82
|
b 12
|
83
83
|
|
84
|
-
|
84
|
+
3,14SyntaxInclude ruby
|
85
85
|
|
86
86
|
|
87
87
|
call matchadd("Comment", "module\\(\\_.*slide 12\\)\\@=")
|
@@ -91,7 +91,7 @@ call matchadd("Comment", "class foo\\n def slide\\n \"of
|
|
91
91
|
|
92
92
|
b 13
|
93
93
|
|
94
|
-
|
94
|
+
3,14SyntaxInclude ruby
|
95
95
|
|
96
96
|
|
97
97
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\(\\_.*slide 13\\)\\@=")
|
@@ -101,7 +101,7 @@ call matchadd("Comment", "end\\n\\n def can\\n highlight
|
|
101
101
|
|
102
102
|
b 14
|
103
103
|
|
104
|
-
|
104
|
+
3,14SyntaxInclude ruby
|
105
105
|
|
106
106
|
|
107
107
|
call matchadd("Comment", "module Parts\\n class foo\\n def\\(\\_.*slide 14\\)\\@=")
|
data/presentation/slide001.md
CHANGED
@@ -1,13 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
| |/ // // / / / /_/ / /___/ /___/ /| |
|
5
|
-
|___/___/_/ /_/_____/_____/\____/_/ |_|
|
6
|
-
|
7
|
-
___ __ _____ ____ ___ _ ______________ __ _______
|
8
|
-
/ _ \/ / / / _ \/ __/ / _ | | /| / / __/ __/ __ \/ |/ / __/
|
9
|
-
/ ___/ /_/ / , _/ _/ / __ | |/ |/ / _/_\ \/ /_/ / /|_/ / _/
|
10
|
-
/_/ \____/_/|_/___/ /_/ |_|__/|__/___/___/\____/_/ /_/___/
|
1
|
+
VIMDECK
|
2
|
+
|
3
|
+
PURE AWESOME
|
11
4
|
|
12
5
|
|
13
6
|
|
data/presentation/slide002.md
CHANGED
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
| | / / _/ |/ / / __ \/ __ \/ ____/ //_/ ___// /
|
3
|
-
| | / // // /|_/ / / /_/ / / / / / / ,< \__ \/ /
|
4
|
-
| |/ // // / / / / _, _/ /_/ / /___/ /| |___/ /_/
|
5
|
-
|___/___/_/ /_/ /_/ |_|\____/\____/_/ |_/____(_)
|
1
|
+
VIM ROCKS!
|
6
2
|
|
7
3
|
+------------------------------+
|
8
4
|
| :.. |
|
data/presentation/slide003.md
CHANGED
data/presentation/slide004.md
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
/ |/ / / / / |/ / _ )/ __/ _ \/ __/ _ \ / / / _/ __/_ __/
|
3
|
-
/ / /_/ / /|_/ / _ / _// , _/ _// // / / /___/ /_\ \ / /
|
4
|
-
/_/|_/\____/_/ /_/____/___/_/|_/___/____/ /____/___/___/ /_/
|
1
|
+
NUMBERED LIST
|
5
2
|
|
6
3
|
1. This is how a numbered list
|
7
4
|
2. Looks in vimdeck
|
data/presentation/slide005.md
CHANGED
data/presentation/slide006.md
CHANGED
data/presentation/slide007.md
CHANGED
data/presentation/slide008.md
CHANGED
data/presentation/slide009.md
CHANGED
data/presentation/slide010.md
CHANGED
data/presentation/slide011.md
CHANGED
data/presentation/slide012.md
CHANGED
data/presentation/slide013.md
CHANGED
data/presentation/slide014.md
CHANGED
data/presentation/slide015.md
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vimdeck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -97,12 +97,6 @@ files:
|
|
97
97
|
- README.md
|
98
98
|
- slides.md
|
99
99
|
- VERSION
|
100
|
-
- vimdeck-0.0.9.gem
|
101
|
-
- vimdeck-0.1.0.gem
|
102
|
-
- vimdeck-0.1.1.gem
|
103
|
-
- vimdeck-0.1.2.gem
|
104
|
-
- vimdeck-0.1.3.gem
|
105
|
-
- vimdeck-0.1.4.gem
|
106
100
|
- vimdeck.gemspec
|
107
101
|
homepage: http://github.com/tybenz/vimdeck
|
108
102
|
licenses:
|
data/vimdeck-0.0.9.gem
DELETED
Binary file
|
data/vimdeck-0.1.0.gem
DELETED
Binary file
|
data/vimdeck-0.1.1.gem
DELETED
Binary file
|
data/vimdeck-0.1.2.gem
DELETED
Binary file
|
data/vimdeck-0.1.3.gem
DELETED
Binary file
|
data/vimdeck-0.1.4.gem
DELETED
Binary file
|