mdopen 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mdopen +11 -2
- data/lib/mdopen/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b95a6428eeb74c1e8a403a26dec356d4a4e58be
|
4
|
+
data.tar.gz: ac20c8c579f7c5b1a99baaad5996fadd1115f26d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '074088d5c841838628ab6234f587fa0823b922c14bc3fb66266fbeb8d3a882ed2cdfef24ac54498cd991aa75a48f09ac4f96a00a0df5151f280301fa6e88ece2'
|
7
|
+
data.tar.gz: 276690d0a559df4658dca7f9440058cc1c8c11009049d9e0c564b816051d1f9cf79f6256b9582273fd8743d9244e03ad72a12f336e46576196cc9fe549619370
|
data/bin/mdopen
CHANGED
@@ -12,6 +12,11 @@ Usage: mdopen <markdown_file_path>
|
|
12
12
|
USAGE
|
13
13
|
end
|
14
14
|
|
15
|
+
if !ARGV[0].nil? && ARGV[0] =~ /^-{,2}help$/
|
16
|
+
help
|
17
|
+
exit(1)
|
18
|
+
end
|
19
|
+
|
15
20
|
md_file = if File.exist?(ARGV[0] || "")
|
16
21
|
ARGV[0]
|
17
22
|
elsif File.exist?("./README")
|
@@ -19,5 +24,9 @@ md_file = if File.exist?(ARGV[0] || "")
|
|
19
24
|
elsif File.exist?("./README.md")
|
20
25
|
"./README.md"
|
21
26
|
end
|
22
|
-
|
23
|
-
|
27
|
+
|
28
|
+
if md_file.nil?
|
29
|
+
help
|
30
|
+
else
|
31
|
+
Mdopen.preview(File.read(md_file))
|
32
|
+
end
|
data/lib/mdopen/version.rb
CHANGED