vimdeck 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +3 -1
  2. data/VERSION +1 -1
  3. data/bin/vimdeck +54 -9
  4. data/vimdeck-0.1.2.gem +0 -0
  5. metadata +2 -1
data/README.md CHANGED
@@ -13,7 +13,9 @@ can fork and pull-request your buns off.
13
13
 
14
14
  ## Installation
15
15
 
16
- Install the vim plugin [SyntaxRange](https://github.com/vim-scripts/SyntaxRange).
16
+ Install a markdown syntax highlighting plugin for VIM. (I recommend [tpope/vim-markdown](http://github.com/tpope/vim-markdown))
17
+
18
+ Install the VIM plugin [SyntaxRange](https://github.com/vim-scripts/SyntaxRange).
17
19
 
18
20
  ```
19
21
  gem install vimdeck
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/bin/vimdeck CHANGED
@@ -1,23 +1,68 @@
1
1
  #!/usr/bin/env ruby
2
- # Usage: vimdeck [<file>]
2
+ #> Usage: vimdeck [<command>] [<file>]
3
+ #>
4
+ #> Commands:
5
+ #>
6
+ #> slideshow: generate and show slides (default)
7
+ #> generate: generate slides only
8
+ #> open: open slides in presentation folder (no file needed)
3
9
 
4
- require 'vimdeck'
10
+ require "vimdeck"
5
11
 
6
12
  def usage
7
- File.read(__FILE__).split("\n").grep(/^# /).each do |line|
8
- puts line[2..-1]
13
+ File.read(__FILE__).split("\n").grep(/^#>/).each do |line|
14
+ puts line[3..-1]
9
15
  end
10
16
  end
11
17
 
12
- if ARGV.include?('--help') || ARGV.include?('-h')
18
+ def check_file(file)
19
+ if !File.exists?(file)
20
+ usage
21
+ puts "\nFile does not exist! #{file}"
22
+ exit 0
23
+ end
24
+ end
25
+
26
+ if ARGV.include?("--help") || ARGV.include?("-h")
13
27
  usage
14
28
  exit 0
15
29
  end
16
30
 
17
- if !ARGV[0] || !File.exists?(ARGV[0])
31
+ if ARGV.length == 0
18
32
  usage
19
- puts "\nFile does not exist! #{ARGV[0]}"
20
33
  exit 0
21
- end
34
+ elsif ARGV.length == 1
35
+ if ARGV[0] == "open"
36
+ Vimdeck::Slideshow.open
37
+ else
38
+ file = ARGV[0]
39
+ check_file file
40
+
41
+ Vimdeck::Slideshow.start(ARGV[0])
42
+ end
43
+ elsif ARGV.length == 2
44
+ command = ARGV[0]
45
+ file = ARGV[1]
22
46
 
23
- Vimdeck::Slideshow.start(ARGV[0])
47
+ if command != "slideshow" && command != "generate" && command != "open"
48
+ usage
49
+ exit 0
50
+ end
51
+
52
+ if command == "open"
53
+ puts "Vimdeck will open already existing slides"
54
+ puts "File name will be ignored"
55
+ sleep 3
56
+ else
57
+ check_file file
58
+ end
59
+
60
+ case command
61
+ when "slideshow"
62
+ Vimdeck::Slideshow.start(file)
63
+ when "generate"
64
+ Vimdeck::Slideshow.generate(file)
65
+ else # open
66
+ Vimdeck::Slideshow.open()
67
+ end
68
+ end
data/vimdeck-0.1.2.gem ADDED
Binary file
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.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -100,6 +100,7 @@ files:
100
100
  - vimdeck-0.0.9.gem
101
101
  - vimdeck-0.1.0.gem
102
102
  - vimdeck-0.1.1.gem
103
+ - vimdeck-0.1.2.gem
103
104
  - vimdeck.gemspec
104
105
  homepage: http://github.com/tybenz/vimdeck
105
106
  licenses: