bergamasco 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/bergamasco/pandoc.rb +4 -5
- data/lib/bergamasco/version.rb +1 -1
- data/spec/pandoc_spec.rb +3 -2
- 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: b2d0f9240402129c78c23144ac147a6a53ae5999
|
4
|
+
data.tar.gz: e1bf0d0595088ebbab265a14132ae65620b5b629
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12b3e327c61272c94dbd66fd16d1cfe34dd69dde73af0088bff6544cbc810b0b956e6df6222c6554d9db93c88a1157ebb0b6f4c0ae212351a4a1f48084a15542
|
7
|
+
data.tar.gz: b8bd3d49e48e8a1bea266de8f7f21e275425e4a7a628f93694d210a3469934c4b539d6932d63c6be4871742775defe7a0cee8ff2cef1edf7c94d6838b6c034a3
|
data/Gemfile.lock
CHANGED
data/lib/bergamasco/pandoc.rb
CHANGED
@@ -42,12 +42,11 @@ module Bergamasco
|
|
42
42
|
convert(text, options)
|
43
43
|
end
|
44
44
|
|
45
|
-
def self.write_jats(
|
46
|
-
file = IO.read(
|
47
|
-
xml_path = File.join(File.dirname(filepath), File.basename(filepath, ".html.md")) + ".xml"
|
45
|
+
def self.write_jats(input_path, output_path, options={})
|
46
|
+
file = IO.read(input_path)
|
48
47
|
xml = convert_to_jats(file, options)
|
49
|
-
IO.write(
|
50
|
-
|
48
|
+
IO.write(output_path, xml)
|
49
|
+
output_path
|
51
50
|
end
|
52
51
|
|
53
52
|
def self.write_bibliograpy_to_yaml(bib_path, yaml_path)
|
data/lib/bergamasco/version.rb
CHANGED
data/spec/pandoc_spec.rb
CHANGED
@@ -21,8 +21,9 @@ describe Bergamasco::Pandoc do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'should write jats xml' do
|
24
|
-
|
25
|
-
|
24
|
+
input_path = fixture_path + 'cool-dois.html.md'
|
25
|
+
output_path = fixture_path + 'cool-dois.xml'
|
26
|
+
xml_path = subject.write_jats(input_path, output_path, skip_yaml_header: true, csl: 'spec/fixtures/apa.csl', bibliography: 'spec/fixtures/references.yaml')
|
26
27
|
doc = File.open(xml_path) { |f| Nokogiri::XML(f) }
|
27
28
|
article_id = doc.at_xpath("//article-id")
|
28
29
|
expect(article_id.text).to eq("10.5072/0000-03VC")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bergamasco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|