relaton-cli 0.1.4 → 0.1.5
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 +4 -4
- data/Gemfile.lock +9 -9
- data/lib/relaton/bibdata.rb +3 -3
- data/lib/relaton/cli/command.rb +3 -1
- data/lib/relaton/cli/relaton_file.rb +1 -1
- data/lib/relaton/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d311f192852ef9e45bca1618e0168cdba18df449e550037a1affba51420f9f36
|
4
|
+
data.tar.gz: '085e04682de9b4d968b6976678a8e5a332d18b03d959d3b2dc9f370276d6f0b9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d82f46a6e185caa90229808b8f7468ee0e507775bdf4d07b9f1676f2d27574c17079f90fc265a92d8a6ab77091dacde56936242b64931159d54a0b570ddc6515
|
7
|
+
data.tar.gz: 6ab3fcb92bf919c6cbf3d5a448bd1e634aede4bbb8a346b290bef19bbc8c95ea16c7e3e9bce061e116ff010feafa78d2d86f4a4f6f5760eb13db88f8bdb0ae9f
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
addressable (2.5.2)
|
13
13
|
public_suffix (>= 2.0.2, < 4.0)
|
14
|
-
algoliasearch (1.
|
14
|
+
algoliasearch (1.24.0)
|
15
15
|
httpclient (~> 2.8, >= 2.8.3)
|
16
16
|
json (>= 1.5.1)
|
17
17
|
byebug (10.0.2)
|
@@ -21,21 +21,21 @@ GEM
|
|
21
21
|
equivalent-xml (0.6.0)
|
22
22
|
nokogiri (>= 1.4.3)
|
23
23
|
gb-agencies (0.0.5)
|
24
|
-
gbbib (0.4.
|
24
|
+
gbbib (0.4.3)
|
25
25
|
cnccs (~> 0.1.1)
|
26
26
|
gb-agencies (~> 0.0.1)
|
27
27
|
iso-bib-item (~> 0.4.2)
|
28
28
|
httpclient (2.8.3)
|
29
|
-
iecbib (0.2.
|
29
|
+
iecbib (0.2.2)
|
30
30
|
addressable
|
31
31
|
iso-bib-item (~> 0.4.2)
|
32
|
-
ietfbib (0.4.
|
32
|
+
ietfbib (0.4.5)
|
33
33
|
iso-bib-item (~> 0.4.2)
|
34
|
-
iso-bib-item (0.4.
|
34
|
+
iso-bib-item (0.4.4)
|
35
35
|
isoics (~> 0.1.6)
|
36
36
|
nokogiri (~> 1.8.4)
|
37
37
|
ruby_deep_clone (~> 0.8.0)
|
38
|
-
isobib (0.4.
|
38
|
+
isobib (0.4.2)
|
39
39
|
algoliasearch
|
40
40
|
iecbib (~> 0.2.1)
|
41
41
|
iso-bib-item (~> 0.4.2)
|
@@ -44,15 +44,15 @@ GEM
|
|
44
44
|
liquid (4.0.1)
|
45
45
|
method_source (0.9.2)
|
46
46
|
mini_portile2 (2.3.0)
|
47
|
-
mixlib-shellout (2.4.
|
47
|
+
mixlib-shellout (2.4.2)
|
48
48
|
nokogiri (1.8.5)
|
49
49
|
mini_portile2 (~> 2.3.0)
|
50
50
|
pry (0.12.2)
|
51
51
|
coderay (~> 1.1.0)
|
52
52
|
method_source (~> 0.9.0)
|
53
53
|
public_suffix (3.0.3)
|
54
|
-
rake (12.3.
|
55
|
-
relaton (0.3.
|
54
|
+
rake (12.3.2)
|
55
|
+
relaton (0.3.1)
|
56
56
|
algoliasearch
|
57
57
|
gbbib (~> 0.4.0)
|
58
58
|
iecbib (~> 0.2.0)
|
data/lib/relaton/bibdata.rb
CHANGED
@@ -13,7 +13,7 @@ module Relaton
|
|
13
13
|
doc
|
14
14
|
html
|
15
15
|
uri
|
16
|
-
|
16
|
+
rxl
|
17
17
|
revdate
|
18
18
|
abstract
|
19
19
|
technical_committee
|
@@ -73,7 +73,7 @@ module Relaton
|
|
73
73
|
xml: source.at(ns("./uri[@type='xml']"))&.text,
|
74
74
|
pdf: source.at(ns("./uri[@type='pdf']"))&.text,
|
75
75
|
html: source.at(ns("./uri[@type='html']"))&.text,
|
76
|
-
|
76
|
+
rxl: source.at(ns("./uri[@type='rxl']"))&.text,
|
77
77
|
doc: source.at(ns("./uri[@type='doc']"))&.text,
|
78
78
|
docidentifier: source.at(ns("./docidentifier"))&.text,
|
79
79
|
title: source.at(ns("./title"))&.text,
|
@@ -107,7 +107,7 @@ module Relaton
|
|
107
107
|
ret += "<uri type='html'>#{html}</uri>\n" if html
|
108
108
|
ret += "<uri type='pdf'>#{pdf}</uri>\n" if pdf
|
109
109
|
ret += "<uri type='doc'>#{doc}</uri>\n" if doc
|
110
|
-
ret += "<uri type='
|
110
|
+
ret += "<uri type='rxl'>#{rxl}</uri>\n" if rxl
|
111
111
|
|
112
112
|
ret += "<language>#{language}</language>\n"
|
113
113
|
ret += "<script>#{script}</script>\n"
|
data/lib/relaton/cli/command.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "relaton/cli/relaton_file"
|
2
2
|
require "relaton/cli/xml_convertor"
|
3
3
|
require "relaton/cli/yaml_convertor"
|
4
|
+
require "fcntl"
|
4
5
|
|
5
6
|
module Relaton
|
6
7
|
module Cli
|
@@ -11,7 +12,8 @@ module Relaton
|
|
11
12
|
|
12
13
|
def fetch(code)
|
13
14
|
Relaton::Cli.relaton
|
14
|
-
|
15
|
+
io = IO.new(STDOUT.fcntl(::Fcntl::F_DUPFD), mode: 'w:UTF-8')
|
16
|
+
io.puts(fetch_document(code, options) || supported_type_message)
|
15
17
|
end
|
16
18
|
|
17
19
|
desc "extract Metanorma-XML-Directory Relaton-XML-Directory", "Extract Relaton XML from folder of Metanorma XML"
|
@@ -102,7 +102,7 @@ module Relaton
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def build_bibdata_relaton(bibdata, file)
|
105
|
-
["xml", "pdf", "doc", "html"].each do |type|
|
105
|
+
["xml", "pdf", "doc", "html", "rxl"].each do |type|
|
106
106
|
file = Pathname.new(file).sub_ext(".#{type}")
|
107
107
|
bibdata.send("#{type}=", file) if File.file?(file)
|
108
108
|
end
|
data/lib/relaton/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|