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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cea0ae539e3ccad30e3234c18e4e4805d66b7c95
4
- data.tar.gz: b3ed95aae246b0bab931240df39873c7972a5903
3
+ metadata.gz: 5240cbf162a995ea3d305fe47322f77205148547
4
+ data.tar.gz: 1be3dfdb812155812f80e9cbcbc5e76c0ff9f688
5
5
  SHA512:
6
- metadata.gz: 8586b113373dd4009e90eeaed4a79b7e579e391c24d0fbb9c24d4ab9e2453c336e3fa4a59e7b9bc55ed3ef6753ddd48636873ff5ba23f512f70295da8319c519
7
- data.tar.gz: 313d2d43228c0056177197f89ea2bf46ce061a8f74ca6f254167b84b5c51afcacfefb7e1657b4e9b6b0166d65937eef42b874e761d83e02cecde36fc77054746
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, option == "filter")}
190
+ value = value.map {|v| @config.update_path(v, src_dir, is_executable)}
193
191
  else
194
- value = @config.update_path(value, src_dir, option == "filter")
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
@@ -47,7 +47,7 @@ module Pandocomatic
47
47
  class Pandocomatic
48
48
 
49
49
  # Pandocomatic's current version
50
- VERSION = [0, 1, 4, 13]
50
+ VERSION = [0, 1, 4, 15]
51
51
 
52
52
  # Pandocomatic's default configuration file
53
53
  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.1.4.14
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-06 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paru