checkmark 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/checkmark +12 -1
  2. data/lib/checkmark.rb +22 -0
  3. metadata +8 -8
@@ -3,4 +3,15 @@
3
3
  $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
4
  require 'checkmark'
5
5
 
6
- Checkmark.run ARGV.first
6
+ if ARGV.size != 1
7
+ $stderr.puts Checkmark.usage
8
+ exit 1
9
+ else
10
+ if ARGV.first == '--version'
11
+ puts Checkmark.version
12
+ elsif ARGV.first == '--help'
13
+ puts Checkmark.help
14
+ else
15
+ Checkmark.run ARGV.first
16
+ end
17
+ end
@@ -2,6 +2,8 @@ require 'redcarpet'
2
2
  require 'fileutils'
3
3
 
4
4
  module Checkmark
5
+ VERSION = '0.1.1'
6
+
5
7
  HTML_BEGIN = <<HTML
6
8
  <!DOCTYPE html>
7
9
  <html>
@@ -74,4 +76,24 @@ HTML
74
76
  end
75
77
  `open #{self.preview_file}` if RUBY_PLATFORM =~ /darwin/
76
78
  end
79
+
80
+ def self.usage
81
+ "Usage: checkmark <file>"
82
+ end
83
+
84
+ def self.version
85
+ "checkmark v#{VERSION}\nmarcus ortiz"
86
+ end
87
+
88
+ def self.help
89
+ help = <<HELP
90
+ Examples:
91
+ checkmark README.md
92
+ checkmark path/to/file.markdown
93
+
94
+ Notes:
95
+ If you're using OS X, checkmark will open the rendered html for your markdown file in a web browser. Otherwise, you can manually open the `mark.html` file that is created your `$HOME/.check/` directory.
96
+ HELP
97
+ "#{self.usage}\n\n#{help}"
98
+ end
77
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-17 00:00:00.000000000 -07:00
12
+ date: 2011-08-18 00:00:00.000000000 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: redcarpet
17
- requirement: &2153185300 !ruby/object:Gem::Requirement
17
+ requirement: &2153040840 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2153185300
26
- description: If you're using OS X, checkmark will open the rendered html for your
27
- markdown file in a web browser. Otherwise, you can manually open the `mark.html`
28
- file that is created your `$HOME/.check/` directory.
25
+ version_requirements: *2153040840
26
+ description: Checkmark converts your markdown files to html. If you're using OS X,
27
+ checkmark will open the rendered html file in a web browser. Otherwise, you can
28
+ manually open the `mark.html` file that is created your `$HOME/.check/` directory.
29
29
  email: mportiz08@gmail.com
30
30
  executables:
31
31
  - checkmark
@@ -59,5 +59,5 @@ rubyforge_project:
59
59
  rubygems_version: 1.6.2
60
60
  signing_key:
61
61
  specification_version: 3
62
- summary: checkmark lets you check your markdown files in a web browser
62
+ summary: check your markdown files
63
63
  test_files: []