pandocomatic 0.1.4.1 → 0.1.4.2

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: 00bccb1af6a04ada68e3619cd1cf91d054bebc9b
4
- data.tar.gz: f57a5e34f4031d6a9652969b0f3d242a6f35f218
3
+ metadata.gz: ae18e5c6d4786ca8ef01455de984d56a87053664
4
+ data.tar.gz: 5794bc62721dcbde8585fbebd2d44efb73bf4200
5
5
  SHA512:
6
- metadata.gz: 44fae8276c3a24696883376bd23b6cbd8ad2f7e33290fc3446ae54ec5ad23f0a68155133be030b73ca768b7daec0ed4bfd2dcb560e79646b2a9f3d42c1fdf7bc
7
- data.tar.gz: 3b63a4d9f271341cdf54a6058387f1abe42b7d6eda62408f04e4549a494dbf3184b901ae8bca858b307eaa9a15ef1cf90dbac4465101927d4edfe5641bc58122
6
+ metadata.gz: b35ce7f0d953dc8eaf72120bfbb3250f13cd7f3e7a9799799581138127031c4e226e0fb9f4b22c92e7e1011ca21a9b0a9bc3eafee8e56c405a4bd3c5fd51292e
7
+ data.tar.gz: 9cd7d75d2e65fed90a8962972eeeb75e73ccf63af2bfa1079cf720607f7401807f9d68df603e51662ba82e7ecfe192bafec33a63bb715039d0551361287081e2
@@ -87,7 +87,7 @@ module Pandocomatic
87
87
  end
88
88
 
89
89
  input = File.read @src
90
- input = FileInfoPreprocessor.run input, @src
90
+ input = FileInfoPreprocessor.run input, @src, pandoc_options
91
91
  input = preprocess input, template
92
92
  input = pandoc input, pandoc_options, File.dirname(@src)
93
93
  output = postprocess input, template
@@ -25,9 +25,10 @@ module Pandocomatic
25
25
 
26
26
  FORMAT_TO_EXT = {
27
27
  'native' => 'hs',
28
- 'markdown_strict' => 'markdown',
29
- 'markdown_phpextra' => 'markdown',
30
- 'markdown_github' => 'markdown',
28
+ 'markdown' => 'md',
29
+ 'markdown_strict' => 'md',
30
+ 'markdown_phpextra' => 'md',
31
+ 'markdown_github' => 'md',
31
32
  'html5' => 'html',
32
33
  'docx' => 'docx',
33
34
  'latex' => 'tex'
@@ -22,12 +22,15 @@ module Pandocomatic
22
22
  # mixes that information into that file's metadata. It is a default
23
23
  # preprocessor.
24
24
  class FileInfoPreprocessor < Processor
25
- def self.run input, path
25
+ def self.run input, path, options
26
26
  created_at = File.stat(path).ctime
27
27
  modified_at = File.stat(path).mtime
28
28
  output = input
29
29
  output << "\n\n---\n"
30
- output << "fileinfo:\n"
30
+ output << "pandocomatic-fileinfo:\n"
31
+ output << " from: #{options['from']}\n" if options.has_key? 'from'
32
+ output << " to: #{options['to']}\n" if options.has_key? 'to'
33
+ output << " template: #{options['template']}\n" if options.has_key? 'template'
31
34
  output << " path: '#{path}'\n"
32
35
  output << " created: #{created_at.strftime '%Y-%m-%d'}\n"
33
36
  output << " modified: #{modified_at.strftime '%Y-%m-%d'}\n"
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.1
4
+ version: 0.1.4.2
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-13 00:00:00.000000000 Z
11
+ date: 2017-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paru
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.4.3
19
+ version: 0.2.4.9
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.2.4.3
22
+ version: 0.2.4.7
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 0.2.4.3
29
+ version: 0.2.4.9
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.2.4.3
32
+ version: 0.2.4.7
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: trollop
35
35
  requirement: !ruby/object:Gem::Requirement