relaton-cie 1.16.2 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +4 -4
- data/grammars/basicdoc.rng +18 -2
- data/grammars/biblio.rng +1 -0
- data/lib/relaton_cie/data_fetcher.rb +5 -1
- data/lib/relaton_cie/hash_converter.rb +7 -7
- data/lib/relaton_cie/name_parser.rb +6 -0
- data/lib/relaton_cie/version.rb +1 -1
- data/relaton_cie.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11878869c776cb0e77ce456b8f774fd549d45a1681ab05a1b18d0178d6ec9dc9
|
4
|
+
data.tar.gz: d6a0c2395217422c2c16de2313eba99818aae4792a280bb27e5abdd6d62ebdc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3884f990e810108ef61152b8b7b178d5208f310d640aeec04bbd573327ec9cf28370e96842f427155e4d0e917d987074bfeeb5348cdfe43cce71965fbe8d7e6
|
7
|
+
data.tar.gz: 914aac83049568ca9ba66fbf496d8ea4688a263cc8e47418ea828bc2e822d08a03fac95c5aa80daae24460db6cc283ebf3f9b6faa9a0c9f67817a9f715f656a4
|
data/README.adoc
CHANGED
@@ -48,15 +48,15 @@ end
|
|
48
48
|
[source,ruby]
|
49
49
|
----
|
50
50
|
item = RelatonCie::CieBibliography.get 'CIE 001-1980'
|
51
|
-
[relaton-cie] (CIE 001-1980)
|
52
|
-
[relaton-cie] (CIE 001-1980)
|
51
|
+
[relaton-cie] (CIE 001-1980) Fetching from Realton repository ...
|
52
|
+
[relaton-cie] (CIE 001-1980) Found: `CIE 001-1980`
|
53
53
|
=> #<RelatonBib::BibliographicItem:0x007fb3f6098920
|
54
54
|
...
|
55
55
|
|
56
56
|
# Return nil if a document doesn't exist.
|
57
57
|
RelatonCie::CieBibliography.get '1111'
|
58
|
-
[relaton-cie] (1111)
|
59
|
-
[relaton-cie]
|
58
|
+
[relaton-cie] (1111) Fetching from Realton repository ...
|
59
|
+
[relaton-cie] (1111) Not found.
|
60
60
|
=> nil
|
61
61
|
----
|
62
62
|
|
data/grammars/basicdoc.rng
CHANGED
@@ -346,6 +346,8 @@
|
|
346
346
|
<ref name="keyword"/>
|
347
347
|
<ref name="xref"/>
|
348
348
|
<ref name="hyperlink"/>
|
349
|
+
<ref name="index"/>
|
350
|
+
<ref name="index-xref"/>
|
349
351
|
</choice>
|
350
352
|
</oneOrMore>
|
351
353
|
</element>
|
@@ -623,6 +625,8 @@
|
|
623
625
|
<ref name="eref"/>
|
624
626
|
<ref name="xref"/>
|
625
627
|
<ref name="hyperlink"/>
|
628
|
+
<ref name="index"/>
|
629
|
+
<ref name="index-xref"/>
|
626
630
|
</choice>
|
627
631
|
</zeroOrMore>
|
628
632
|
</element>
|
@@ -636,6 +640,8 @@
|
|
636
640
|
<ref name="eref"/>
|
637
641
|
<ref name="xref"/>
|
638
642
|
<ref name="hyperlink"/>
|
643
|
+
<ref name="index"/>
|
644
|
+
<ref name="index-xref"/>
|
639
645
|
</choice>
|
640
646
|
</zeroOrMore>
|
641
647
|
</element>
|
@@ -648,6 +654,8 @@
|
|
648
654
|
<ref name="eref"/>
|
649
655
|
<ref name="xref"/>
|
650
656
|
<ref name="hyperlink"/>
|
657
|
+
<ref name="index"/>
|
658
|
+
<ref name="index-xref"/>
|
651
659
|
</choice>
|
652
660
|
</zeroOrMore>
|
653
661
|
</element>
|
@@ -655,7 +663,11 @@
|
|
655
663
|
<define name="keyword">
|
656
664
|
<element name="keyword">
|
657
665
|
<zeroOrMore>
|
658
|
-
<
|
666
|
+
<choice>
|
667
|
+
<ref name="PureTextElement"/>
|
668
|
+
<ref name="index"/>
|
669
|
+
<ref name="index-xref"/>
|
670
|
+
</choice>
|
659
671
|
</zeroOrMore>
|
660
672
|
</element>
|
661
673
|
</define>
|
@@ -676,7 +688,11 @@
|
|
676
688
|
<define name="strike">
|
677
689
|
<element name="strike">
|
678
690
|
<zeroOrMore>
|
679
|
-
<
|
691
|
+
<choice>
|
692
|
+
<ref name="PureTextElement"/>
|
693
|
+
<ref name="index"/>
|
694
|
+
<ref name="index-xref"/>
|
695
|
+
</choice>
|
680
696
|
</zeroOrMore>
|
681
697
|
</element>
|
682
698
|
</define>
|
data/grammars/biblio.rng
CHANGED
@@ -160,6 +160,10 @@ module RelatonCie
|
|
160
160
|
contribs << { entity: org, role: [{ type: "publisher" }] }
|
161
161
|
end
|
162
162
|
|
163
|
+
def fetch_doctype
|
164
|
+
RelatonBib::DocumentType.new(type: "document")
|
165
|
+
end
|
166
|
+
|
163
167
|
# @param bib [RelatonCie::BibliographicItem]
|
164
168
|
def write_file(bib) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
165
169
|
id = bib.docidentifier[0].id.gsub(%r{[/\s\-:.]}, "_")
|
@@ -191,7 +195,7 @@ module RelatonCie
|
|
191
195
|
abstract: fetch_abstract(doc), date: fetch_date(doc),
|
192
196
|
edition: fetch_edition(doc), contributor: fetch_contributor(doc),
|
193
197
|
relation: fetch_relation(doc), language: ["en"], script: ["Latn"],
|
194
|
-
doctype:
|
198
|
+
doctype: fetch_doctype
|
195
199
|
)
|
196
200
|
write_file item
|
197
201
|
rescue StandardError => e
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module RelatonCie
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
module HashConverter
|
3
|
+
include RelatonBib::HashConverter
|
4
|
+
extend self
|
5
|
+
# @param item_hash [Hash]
|
6
|
+
# @return [RelatonCie::BibliographicItem]
|
7
|
+
def bib_item(item_hash)
|
8
|
+
BibliographicItem.new(**item_hash)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/relaton_cie/version.rb
CHANGED
data/relaton_cie.gemspec
CHANGED
@@ -31,6 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
spec.add_dependency "mechanize", "~> 2.8.0"
|
33
33
|
spec.add_dependency "parslet", "~> 2.0.0"
|
34
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
34
|
+
spec.add_dependency "relaton-bib", "~> 1.17.0"
|
35
35
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-cie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.17.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.17.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: relaton-index
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/relaton_cie/config.rb
|
99
99
|
- lib/relaton_cie/data_fetcher.rb
|
100
100
|
- lib/relaton_cie/hash_converter.rb
|
101
|
+
- lib/relaton_cie/name_parser.rb
|
101
102
|
- lib/relaton_cie/processor.rb
|
102
103
|
- lib/relaton_cie/scrapper.rb
|
103
104
|
- lib/relaton_cie/util.rb
|