paru 0.2.4.5 → 0.2.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paru/filter/raw_block.rb +1 -1
- data/lib/paru/pandoc2yaml.rb +0 -49
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76f86581e1e26603a9f55ae60486552c537f0714
|
4
|
+
data.tar.gz: e61570f118ec77fa9ebf544f6c22d41c6e2e1437
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae430e95dadc46085b1fb56c3a1c8a44c06bf1da5bbfec0893b654e6c0e0e612df34cf0b0fd03b4c0cba32e794bf1558e148c014578fc1264f792e0762d2bbe5
|
7
|
+
data.tar.gz: 54a434f05bb8d027cdb91330075bdd776b8c5d0de3b692a548cbb282fae609113aa86ad5d57aa4f3917b7c3681abd16d5b84a79efc042ad9df3c3615bcd39add
|
data/lib/paru/pandoc2yaml.rb
CHANGED
@@ -49,53 +49,4 @@ module Paru
|
|
49
49
|
yaml
|
50
50
|
end
|
51
51
|
end
|
52
|
-
|
53
|
-
if __FILE__ == $0
|
54
|
-
require 'optparse'
|
55
|
-
|
56
|
-
parser = OptionParser.new do |opts|
|
57
|
-
opts.banner = "pandoc2yaml.rb mines a pandoc markdown file for its YAML metadata"
|
58
|
-
opts.banner << "\n\nUsage: pandoc2yaml.rb some-pandoc-markdownfile.md"
|
59
|
-
opts.separator ""
|
60
|
-
opts.separator "Common options"
|
61
|
-
|
62
|
-
opts.on_tail("-h", "--help", "Show this message") do
|
63
|
-
puts opts
|
64
|
-
exit
|
65
|
-
end
|
66
|
-
|
67
|
-
opts.on("-v", "--version", "Show version") do
|
68
|
-
puts "pandoc2yaml.rb is part of paru version 0.2.3"
|
69
|
-
exit
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
parser.parse! ARGV
|
74
|
-
|
75
|
-
input_document = ARGV.pop
|
76
|
-
|
77
|
-
if ARGV.size != 0 then
|
78
|
-
warn "Expecting exactly one argument: the pandoc file to strip for metadata"
|
79
|
-
puts ""
|
80
|
-
puts parser
|
81
|
-
exit
|
82
|
-
end
|
83
|
-
|
84
|
-
document = File.expand_path input_document
|
85
|
-
if not File.exist? document
|
86
|
-
warn "Cannot find file: #{input_document}"
|
87
|
-
exit
|
88
|
-
end
|
89
|
-
|
90
|
-
if !File.readable? document
|
91
|
-
warn "Cannot read file: #{input_document}"
|
92
|
-
exit
|
93
|
-
end
|
94
|
-
|
95
|
-
yaml = Pandoc2Yaml.extract_metadata(document)
|
96
|
-
|
97
|
-
yaml = "---\n..." if yaml.empty?
|
98
|
-
|
99
|
-
puts yaml
|
100
|
-
end
|
101
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.4.
|
4
|
+
version: 0.2.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huub de Beer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Use Pandoc (http://www.pandoc.org) with ruby
|
14
14
|
email: Huub@heerdebeer.org
|