relaton-jis 1.16.2 → 1.16.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +3 -3
- data/grammars/basicdoc.rng +18 -2
- data/grammars/biblio.rng +1 -0
- data/lib/relaton_jis/bibliography.rb +2 -4
- data/lib/relaton_jis/hit_collection.rb +2 -0
- data/lib/relaton_jis/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: 1b3a731d5e0f676963ec89f4899c2d1bb8284373d42926fa99b62d6175ffde3d
|
4
|
+
data.tar.gz: fd4571456406d7175da4c2b4e613a9c1ddac3cda715a54914bfd0d4b39d1bba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f304a961b00a79400f0b372122e24e136dd165b5d364c91d5a7221f1eabad76b4289c358b8da1a061f3d0dab7be5ddb27cf21d4e2a39d849cb83f369c4f38ad
|
7
|
+
data.tar.gz: 79d9d7aac0fcb3b7e5686ac1c9c5cc367d958f60becca732fb3c0c945a9286698664004ce9b8f7e97fd1d6bce4717aa59f262c0e1abfb2ff450d69875579f911
|
data/README.adoc
CHANGED
@@ -89,7 +89,7 @@ Possible options:
|
|
89
89
|
[source,ruby]
|
90
90
|
----
|
91
91
|
item.to_xml
|
92
|
-
=> "<bibitem id="JISX0208-1997" type="standard" schema-version="v1.2.
|
92
|
+
=> "<bibitem id="JISX0208-1997" type="standard" schema-version="v1.2.5">
|
93
93
|
<fetched>2023-03-18</fetched>
|
94
94
|
<title format="text/plain" language="ja" script="Jpan">7ビット及び8ビットの2バイト情報交換用符号化漢字集合</title>
|
95
95
|
<title format="text/plain" language="en" script="Lant">7-bit and 8-bit double byte coded KANJI sets for information interchange</title>
|
@@ -97,12 +97,12 @@ item.to_xml
|
|
97
97
|
</bibitem>"
|
98
98
|
|
99
99
|
item.to_xml bibdata: true
|
100
|
-
=> "<bibdata type="standard" schema-version="v1.2.
|
100
|
+
=> "<bibdata type="standard" schema-version="v1.2.5">
|
101
101
|
<fetched>2023-03-18</fetched>
|
102
102
|
<title format="text/plain" language="ja" script="Jpan">7ビット及び8ビットの2バイト情報交換用符号化漢字集合</title>
|
103
103
|
<title format="text/plain" language="en" script="Lant">7-bit and 8-bit double byte coded KANJI sets for information interchange</title>
|
104
104
|
...
|
105
|
-
<ext schema-version="">
|
105
|
+
<ext schema-version="v0.0.1">
|
106
106
|
<doctype>standard</doctype>
|
107
107
|
<editorialgroup>
|
108
108
|
<technical-committee>一般財団法人 日本規格協会</technical-committee>
|
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
@@ -14,15 +14,13 @@ module RelatonJis
|
|
14
14
|
#
|
15
15
|
def search(code, year = nil)
|
16
16
|
agent = Mechanize.new
|
17
|
-
resp = agent.post "#{SOURCE}0010/searchByKeyword", search_type: "JIS",
|
18
|
-
keyword: code
|
17
|
+
resp = agent.post "#{SOURCE}0010/searchByKeyword", search_type: "JIS", keyword: code
|
19
18
|
disp = JSON.parse resp.body
|
20
19
|
# raise RelatonBib::RequestError, "No results found for #{code}" if disp["disp_screen"].nil?
|
21
20
|
return if disp["disp_screen"].nil?
|
22
21
|
|
23
22
|
result = agent.get "#{SOURCE}#{disp['disp_screen']}/index"
|
24
|
-
HitCollection.new code, year,
|
25
|
-
result: result.xpath("//div[@class='blockGenaral']")
|
23
|
+
HitCollection.new code, year, result: result.xpath("//div[@class='blockGenaral']")
|
26
24
|
end
|
27
25
|
|
28
26
|
#
|
@@ -38,6 +38,8 @@ module RelatonJis
|
|
38
38
|
|
39
39
|
def find_all_years # rubocop:disable Metrics/AbcSize
|
40
40
|
hits = @array.select { |hit| hit.eq? ref_parts }
|
41
|
+
return [] if hits.empty?
|
42
|
+
|
41
43
|
item = hits.max_by { |i| i.id_parts[:year].to_i }.fetch
|
42
44
|
item_id = item.docidentifier.first.id
|
43
45
|
parent = item.to_most_recent_reference
|
data/lib/relaton_jis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.16.
|
4
|
+
version: 1.16.3
|
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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|