pandocomatic 0.2.0.2 → 0.2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d2709f2c2749f23899e6f950673b58fe1982dd0
|
4
|
+
data.tar.gz: e0a943a880a4403d6a1435867e0cf2e46e6595bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20b21cf6c12f8e770b25eb8e8a124910c8d0fbfe530b9d1294982984b6e88f40fc6526fe4779fa4dbd0c6c9650b297c3480eb628f69e78749f794eda2b390213
|
7
|
+
data.tar.gz: ac6eede225266eb2f60da753b26bbec7fb4a70b56df9cbda1e0169171381bf7f2d32d92501b39cb5c4e53dca02eefe748fb7561c58b9e01047939492728804ce
|
@@ -66,12 +66,15 @@ module Pandocomatic
|
|
66
66
|
@config = config
|
67
67
|
@src = src
|
68
68
|
@dst = dst
|
69
|
-
|
69
|
+
|
70
70
|
if template_name.nil? or template_name.empty?
|
71
71
|
@template_name = @config.determine_template @src
|
72
72
|
else
|
73
73
|
@template_name = template_name
|
74
74
|
end
|
75
|
+
|
76
|
+
@metadata = PandocMetadata.load_file @src
|
77
|
+
@dst = @config.set_extension @dst, @template_name, @metadata
|
75
78
|
|
76
79
|
@errors.push IOError.new(:file_does_not_exist, nil, @src) unless File.exist? @src
|
77
80
|
@errors.push IOError.new(:file_is_not_a_file, nil, @src) unless File.file? @src
|
@@ -93,8 +96,7 @@ module Pandocomatic
|
|
93
96
|
private
|
94
97
|
|
95
98
|
def convert_file
|
96
|
-
|
97
|
-
pandoc_options = metadata.pandoc_options || {}
|
99
|
+
pandoc_options = @metadata.pandoc_options || {}
|
98
100
|
template = {}
|
99
101
|
|
100
102
|
# Determine the actual options and settings to use when converting this
|
@@ -106,7 +108,7 @@ module Pandocomatic
|
|
106
108
|
pandoc_options = Configuration.extend_value(pandoc_options, template['pandoc'])
|
107
109
|
end
|
108
110
|
|
109
|
-
template = Configuration.extend_value(metadata.pandocomatic, template) if metadata.has_pandocomatic?
|
111
|
+
template = Configuration.extend_value(@metadata.pandocomatic, template) if @metadata.has_pandocomatic?
|
110
112
|
|
111
113
|
# Run setup scripts
|
112
114
|
setup template
|
@@ -127,8 +129,8 @@ module Pandocomatic
|
|
127
129
|
output = postprocess input, template
|
128
130
|
|
129
131
|
# Write out the results of the conversion process to file.
|
130
|
-
if @dst.to_s.empty? and metadata.pandoc_options.has_key? 'output'
|
131
|
-
@dst = metadata.pandoc_options['output']
|
132
|
+
if @dst.to_s.empty? and @metadata.pandoc_options.has_key? 'output'
|
133
|
+
@dst = @metadata.pandoc_options['output']
|
132
134
|
end
|
133
135
|
|
134
136
|
begin
|
@@ -50,7 +50,7 @@ module Pandocomatic
|
|
50
50
|
ERROR_STATUS = 1266 # This is the sum of the ascii values of the characters in 'pandocomatic'
|
51
51
|
|
52
52
|
# Pandocomatic's current version
|
53
|
-
VERSION = [0, 2, 0,
|
53
|
+
VERSION = [0, 2, 0, 3]
|
54
54
|
|
55
55
|
# Pandocomatic's default configuration file
|
56
56
|
CONFIG_FILE = 'pandocomatic.yaml'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pandocomatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.3
|
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-09-
|
11
|
+
date: 2017-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paru
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements:
|
155
155
|
- pandoc, a universal document converer <http://pandoc.org>
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.5.2
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Automating the use of pandoc
|