pandocomatic 0.1.4.14 → 0.1.4.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pandocomatic/command/convert_file_command.rb +10 -9
- data/lib/pandocomatic/pandocomatic.rb +1 -1
- 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: 5240cbf162a995ea3d305fe47322f77205148547
|
4
|
+
data.tar.gz: 1be3dfdb812155812f80e9cbcbc5e76c0ff9f688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2750ea57e8ba18f517577efbe07544624f79f99b272a58de0c7a504768e3a9971f96dd7cfcbc2813bb140ae530a714956b78ba3834246d7461824466092a15f
|
7
|
+
data.tar.gz: 7bc0149c21b7ccdf7ee2938519a0873e264ba06ca115df615fd5d460a37511c8e09a9d1f3414b0f4121cbaf94ff6cc6154e682d225b6c34c9f0e29bf405ed65c
|
@@ -153,8 +153,8 @@ module Pandocomatic
|
|
153
153
|
cleanup template
|
154
154
|
end
|
155
155
|
|
156
|
-
# TODO: update this list
|
157
156
|
PANDOC_OPTIONS_WITH_PATH = [
|
157
|
+
'data-dir',
|
158
158
|
'filter',
|
159
159
|
'template',
|
160
160
|
'css',
|
@@ -177,29 +177,30 @@ module Pandocomatic
|
|
177
177
|
'resource-path',
|
178
178
|
'citation-abbreviations',
|
179
179
|
'abbreviations',
|
180
|
-
'log'
|
180
|
+
'log',
|
181
|
+
'resource-path'
|
181
182
|
]
|
182
183
|
|
183
184
|
def pandoc(input, options, src_dir)
|
184
185
|
converter = Paru::Pandoc.new
|
185
186
|
options.each do |option, value|
|
186
|
-
# Pandoc multi-word options can have the multiple words separated by
|
187
|
-
# both underscore (_) and dash (-).
|
188
|
-
option= option.gsub "-", "_"
|
189
|
-
|
190
187
|
if PANDOC_OPTIONS_WITH_PATH.include? option
|
188
|
+
is_executable = option == "filter"
|
191
189
|
if value.is_a? Array
|
192
|
-
value = value.map {|v| @config.update_path(v, src_dir,
|
190
|
+
value = value.map {|v| @config.update_path(v, src_dir, is_executable)}
|
193
191
|
else
|
194
|
-
value = @config.update_path(value, src_dir,
|
192
|
+
value = @config.update_path(value, src_dir, is_executable)
|
195
193
|
end
|
196
194
|
end
|
197
|
-
|
195
|
+
|
198
196
|
# There is no "pdf" output format; change it to latex but keep the
|
199
197
|
# extension.
|
200
198
|
value = "latex" if option == "to" and value == "pdf"
|
201
199
|
|
202
200
|
begin
|
201
|
+
# Pandoc multi-word options can have the multiple words separated by
|
202
|
+
# both underscore (_) and dash (-).
|
203
|
+
option = option.gsub "-", "_"
|
203
204
|
converter.send option, value unless option == 'output'
|
204
205
|
# don't let pandoc write the output to enable postprocessing
|
205
206
|
rescue
|
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.1.4.
|
4
|
+
version: 0.1.4.15
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paru
|