relaton-ieee 1.3.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +2 -0
- data/README.adoc +30 -24
- data/grammars/isodoc.rng +136 -21
- data/lib/relaton_ieee/hit_collection.rb +4 -4
- data/lib/relaton_ieee/ieee_bibliographic_item.rb +7 -4
- data/lib/relaton_ieee/scrapper.rb +12 -8
- data/lib/relaton_ieee/version.rb +1 -1
- data/relaton_ieee.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1937aa373837e30e20dc867652fc5b0174a578401884580c3aa4b848f4cece2a
|
4
|
+
data.tar.gz: 86b054738cb15afa9d0f2eaa8a01d1fa8977571159763e2ada75a8188f6bd56c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9af5049b460d91c47a8e882ef6d935725fabb2805a273ea841ea51f801fef311a6b723bedd6d443929bc8b375b47e683972153aba522dab28eea221d2e560b75
|
7
|
+
data.tar.gz: 03776c7931ac6a0e021c8f35b33680ee41747fc54b64569b24dfba24613424201f5b0e5864d056d92e59c8af37f320961ecec02d3c119867ef6e4b4e6b6ce22a
|
data/.github/workflows/macos.yml
CHANGED
@@ -32,6 +32,8 @@ jobs:
|
|
32
32
|
- name: Update gems
|
33
33
|
run: |
|
34
34
|
sudo gem install bundler --force
|
35
|
+
ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
|
36
|
+
ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
|
35
37
|
bundle install --jobs 4 --retry 3
|
36
38
|
- name: Run specs
|
37
39
|
run: |
|
data/README.adoc
CHANGED
@@ -8,7 +8,7 @@ You can use it to retrieve metadata of IEEE Standards from standards.ieee.org, a
|
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
[
|
11
|
+
[source,ruby]
|
12
12
|
----
|
13
13
|
gem 'relaton-ieee'
|
14
14
|
----
|
@@ -25,35 +25,37 @@ Or install it yourself as:
|
|
25
25
|
|
26
26
|
=== Search for a standard using keywords
|
27
27
|
|
28
|
+
[source,ruby]
|
28
29
|
----
|
29
|
-
|
30
|
+
require 'relaton_ieee'
|
30
31
|
=> true
|
31
32
|
|
32
|
-
|
33
|
+
hits = RelatonIeee::IeeeBibliography.search("IEEE 528-2019")
|
33
34
|
=> <RelatonIeee::HitCollection:0x007f84c0085308 @ref=IEEE 528-2019 @fetched=false>
|
34
35
|
|
35
|
-
|
36
|
+
item = hits[0].fetch
|
36
37
|
=> #<RelatonIeee::IeeeBibliographicItem:0x007f84bf839c30
|
37
38
|
...
|
38
39
|
----
|
39
40
|
|
40
41
|
=== XML serialization
|
41
42
|
|
43
|
+
[source,ruby]
|
42
44
|
----
|
43
|
-
|
44
|
-
=> "<bibitem id
|
45
|
+
item.to_xml
|
46
|
+
=> "<bibitem id="IEEE528-2019">
|
45
47
|
<fetched>2020-06-01</fetched>
|
46
|
-
<title type
|
47
|
-
<uri type
|
48
|
-
<docidentifier type
|
49
|
-
<date type
|
48
|
+
<title type="main" format="text/plain" language="en" script="Latn">IEEE 528-2019 - IEEE Standard for Inertial Sensor Terminology</title>
|
49
|
+
<uri type="src">https://standards.ieee.org/content/ieee-standards/en/standard/528-2019.html</uri>
|
50
|
+
<docidentifier type="IEEE">IEEE 528-2019</docidentifier>
|
51
|
+
<date type="issued">
|
50
52
|
<on>2019</on>
|
51
53
|
</date>
|
52
|
-
<date type
|
54
|
+
<date type="published">
|
53
55
|
<on>2019</on>
|
54
56
|
</date>
|
55
57
|
<contributor>
|
56
|
-
<role type
|
58
|
+
<role type="author"/>
|
57
59
|
<person>
|
58
60
|
<name>
|
59
61
|
<completename>Ashley Moran</completename>
|
@@ -62,7 +64,7 @@ Or install it yourself as:
|
|
62
64
|
</contributor>
|
63
65
|
<language>en</language>
|
64
66
|
<script>Latn</script>
|
65
|
-
<abstract format
|
67
|
+
<abstract format="text/plain" language="en" script="Latn">Terms and definitions relating to inertial sensors are presented in this standard. Usage as understood by the inertial sensor community is given preference over general technical usage of the terms herein. The criterion for inclusion of a term and its definition in this standard is usefulness as related to inertial sensor technology.</abstract>
|
66
68
|
<status>
|
67
69
|
<stage>Active</stage>
|
68
70
|
</status>
|
@@ -71,13 +73,14 @@ Or install it yourself as:
|
|
71
73
|
|
72
74
|
With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element.
|
73
75
|
|
76
|
+
[source,ruby]
|
74
77
|
----
|
75
|
-
|
78
|
+
item.to_xml bibdata: true
|
76
79
|
=> "<bibdata>
|
77
80
|
<fetched>2020-06-01</fetched>
|
78
|
-
<title type="main" format="text/plain" language="en" script="Latn">528-2019 - IEEE Standard for Inertial Sensor Terminology</title>
|
81
|
+
<title type="main" format="text/plain" language="en" script="Latn">IEEE 528-2019 - IEEE Standard for Inertial Sensor Terminology</title>
|
79
82
|
<uri type="src">https://standards.ieee.org/content/ieee-standards/en/standard/528-2019.html</uri>
|
80
|
-
<docidentifier type="IEEE">528-2019</docidentifier>
|
83
|
+
<docidentifier type="IEEE">IEEE 528-2019</docidentifier>
|
81
84
|
<date type="issued">
|
82
85
|
<on>2019</on>
|
83
86
|
</date>
|
@@ -99,7 +102,7 @@ With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and add
|
|
99
102
|
<stage>Active</stage>
|
100
103
|
</status>
|
101
104
|
<ext>
|
102
|
-
<committee type="
|
105
|
+
<committee type="standard">
|
103
106
|
<name>AES/GA - Gyro Accelerometer Panel</name>
|
104
107
|
</committee>
|
105
108
|
<committee type="working">
|
@@ -114,20 +117,21 @@ With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and add
|
|
114
117
|
----
|
115
118
|
|
116
119
|
=== Get document by reference
|
120
|
+
[source,ruby]
|
117
121
|
----
|
118
|
-
|
122
|
+
RelatonIeee::IeeeBibliography.get("IEEE 528-2019")
|
119
123
|
[relaton-ieee] ("IEEE 528-2019") fetching...
|
120
124
|
[relaton-ieee] ("IEEE 528-2019") found 528-2019
|
121
125
|
=> #<RelatonIeee::IeeeBibliographicItem:0x007fceb52a6e40
|
122
126
|
...
|
123
127
|
|
124
|
-
|
128
|
+
RelatonIeee::IeeeBibliography.get("IEEE 528", "2019")
|
125
129
|
[relaton-ieee] ("IEEE 528") fetching...
|
126
130
|
[relaton-ieee] ("IEEE 528") found 528-2019
|
127
131
|
=> #<RelatonIeee::IeeeBibliographicItem:0x007fceb54af7f0
|
128
132
|
...
|
129
133
|
|
130
|
-
|
134
|
+
RelatonIeee::IeeeBibliography.get("IEEE 528")
|
131
135
|
[relaton-ieee] ("IEEE 528") fetching...
|
132
136
|
[relaton-ieee] ("IEEE 528") found 528-2019
|
133
137
|
=> #<RelatonIeee::IeeeBibliographicItem:0x007fceb512c510
|
@@ -135,23 +139,25 @@ With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and add
|
|
135
139
|
----
|
136
140
|
|
137
141
|
=== Create bibliographic item from XML
|
142
|
+
[source,ruby]
|
138
143
|
----
|
139
|
-
|
144
|
+
RelatonIeee::XMLParser.from_xml File.read "spec/fixtures/ieee_528_2019.xml"
|
140
145
|
=> #<RelatonIeee::IeeeBibliographicItem:0x007fceb550c978
|
141
146
|
...
|
142
147
|
----
|
143
148
|
|
144
149
|
=== Create bibliographic item from YAML
|
150
|
+
[source,ruby]
|
145
151
|
----
|
146
|
-
|
152
|
+
hash = YAML.load_file 'spec/fixtures/ieee_528_2019.yaml'
|
147
153
|
=> {"id"=>"528-2019", "title"=>{
|
148
154
|
...
|
149
155
|
|
150
|
-
|
156
|
+
bib_hash = RelatonIeee::HashConverter.hash_to_bib hash
|
151
157
|
=> {:id=>"528-2019", :title=>[{
|
152
158
|
...
|
153
159
|
|
154
|
-
|
160
|
+
RelatonIeee::IeeeBibliographicItem.new bib_hash
|
155
161
|
=> #<RelatonIeee::IeeeBibliographicItem:0x007fce940b3eb0
|
156
162
|
...
|
157
163
|
----
|
data/grammars/isodoc.rng
CHANGED
@@ -43,7 +43,9 @@
|
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
45
|
<attribute name="target">
|
46
|
-
<data type="
|
46
|
+
<data type="string">
|
47
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
48
|
+
</data>
|
47
49
|
</attribute>
|
48
50
|
<optional>
|
49
51
|
<attribute name="type">
|
@@ -61,6 +63,11 @@
|
|
61
63
|
</choice>
|
62
64
|
</attribute>
|
63
65
|
</optional>
|
66
|
+
<optional>
|
67
|
+
<attribute name="droploc">
|
68
|
+
<data type="boolean"/>
|
69
|
+
</attribute>
|
70
|
+
</optional>
|
64
71
|
<text/>
|
65
72
|
</element>
|
66
73
|
</define>
|
@@ -578,6 +585,8 @@
|
|
578
585
|
<ref name="ol"/>
|
579
586
|
<ref name="dl"/>
|
580
587
|
<ref name="formula"/>
|
588
|
+
<ref name="quote"/>
|
589
|
+
<ref name="sourcecode"/>
|
581
590
|
</choice>
|
582
591
|
</oneOrMore>
|
583
592
|
</element>
|
@@ -661,6 +670,16 @@
|
|
661
670
|
</choice>
|
662
671
|
</attribute>
|
663
672
|
</optional>
|
673
|
+
<optional>
|
674
|
+
<attribute name="valign">
|
675
|
+
<choice>
|
676
|
+
<value>top</value>
|
677
|
+
<value>middle</value>
|
678
|
+
<value>bottom</value>
|
679
|
+
<value>baseline</value>
|
680
|
+
</choice>
|
681
|
+
</attribute>
|
682
|
+
</optional>
|
664
683
|
<choice>
|
665
684
|
<zeroOrMore>
|
666
685
|
<choice>
|
@@ -697,6 +716,16 @@
|
|
697
716
|
</choice>
|
698
717
|
</attribute>
|
699
718
|
</optional>
|
719
|
+
<optional>
|
720
|
+
<attribute name="valign">
|
721
|
+
<choice>
|
722
|
+
<value>top</value>
|
723
|
+
<value>middle</value>
|
724
|
+
<value>bottom</value>
|
725
|
+
<value>baseline</value>
|
726
|
+
</choice>
|
727
|
+
</attribute>
|
728
|
+
</optional>
|
700
729
|
<choice>
|
701
730
|
<zeroOrMore>
|
702
731
|
<choice>
|
@@ -834,6 +863,13 @@
|
|
834
863
|
</define>
|
835
864
|
<define name="standard-document">
|
836
865
|
<element name="standard-document">
|
866
|
+
<attribute name="version"/>
|
867
|
+
<attribute name="type">
|
868
|
+
<choice>
|
869
|
+
<value>semantic</value>
|
870
|
+
<value>presentation</value>
|
871
|
+
</choice>
|
872
|
+
</attribute>
|
837
873
|
<ref name="bibdata"/>
|
838
874
|
<optional>
|
839
875
|
<ref name="boilerplate"/>
|
@@ -855,7 +891,7 @@
|
|
855
891
|
<oneOrMore>
|
856
892
|
<choice>
|
857
893
|
<ref name="content"/>
|
858
|
-
<ref name="
|
894
|
+
<ref name="abstract"/>
|
859
895
|
<ref name="foreword"/>
|
860
896
|
<ref name="introduction"/>
|
861
897
|
<ref name="acknowledgements"/>
|
@@ -922,6 +958,9 @@
|
|
922
958
|
<optional>
|
923
959
|
<attribute name="script"/>
|
924
960
|
</optional>
|
961
|
+
<optional>
|
962
|
+
<attribute name="type"/>
|
963
|
+
</optional>
|
925
964
|
<optional>
|
926
965
|
<attribute name="obligation">
|
927
966
|
<choice>
|
@@ -961,9 +1000,6 @@
|
|
961
1000
|
</define>
|
962
1001
|
<define name="content-subsection">
|
963
1002
|
<element name="clause">
|
964
|
-
<optional>
|
965
|
-
<attribute name="type"/>
|
966
|
-
</optional>
|
967
1003
|
<ref name="Content-Section"/>
|
968
1004
|
</element>
|
969
1005
|
</define>
|
@@ -992,6 +1028,9 @@
|
|
992
1028
|
</choice>
|
993
1029
|
</attribute>
|
994
1030
|
</optional>
|
1031
|
+
<optional>
|
1032
|
+
<attribute name="type"/>
|
1033
|
+
</optional>
|
995
1034
|
<optional>
|
996
1035
|
<ref name="section-title"/>
|
997
1036
|
</optional>
|
@@ -1011,9 +1050,6 @@
|
|
1011
1050
|
</define>
|
1012
1051
|
<define name="clause">
|
1013
1052
|
<element name="clause">
|
1014
|
-
<optional>
|
1015
|
-
<attribute name="type"/>
|
1016
|
-
</optional>
|
1017
1053
|
<ref name="Clause-Section"/>
|
1018
1054
|
</element>
|
1019
1055
|
</define>
|
@@ -1042,18 +1078,24 @@
|
|
1042
1078
|
</choice>
|
1043
1079
|
</attribute>
|
1044
1080
|
</optional>
|
1081
|
+
<optional>
|
1082
|
+
<attribute name="type"/>
|
1083
|
+
</optional>
|
1045
1084
|
<optional>
|
1046
1085
|
<ref name="section-title"/>
|
1047
1086
|
</optional>
|
1048
1087
|
<group>
|
1049
|
-
<
|
1050
|
-
<
|
1051
|
-
<
|
1052
|
-
|
1053
|
-
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
|
1088
|
+
<choice>
|
1089
|
+
<group>
|
1090
|
+
<zeroOrMore>
|
1091
|
+
<ref name="BasicBlock"/>
|
1092
|
+
</zeroOrMore>
|
1093
|
+
<zeroOrMore>
|
1094
|
+
<ref name="note"/>
|
1095
|
+
</zeroOrMore>
|
1096
|
+
</group>
|
1097
|
+
<ref name="amend"/>
|
1098
|
+
</choice>
|
1057
1099
|
<zeroOrMore>
|
1058
1100
|
<choice>
|
1059
1101
|
<ref name="clause-subsection"/>
|
@@ -1180,6 +1222,9 @@
|
|
1180
1222
|
<optional>
|
1181
1223
|
<attribute name="script"/>
|
1182
1224
|
</optional>
|
1225
|
+
<optional>
|
1226
|
+
<attribute name="type"/>
|
1227
|
+
</optional>
|
1183
1228
|
<optional>
|
1184
1229
|
<attribute name="obligation">
|
1185
1230
|
<choice>
|
@@ -1447,11 +1492,6 @@
|
|
1447
1492
|
</optional>
|
1448
1493
|
</element>
|
1449
1494
|
</define>
|
1450
|
-
<define name="preface_abstract">
|
1451
|
-
<element name="abstract">
|
1452
|
-
<ref name="Basic-Section"/>
|
1453
|
-
</element>
|
1454
|
-
</define>
|
1455
1495
|
<define name="term-clause">
|
1456
1496
|
<element name="clause">
|
1457
1497
|
<optional>
|
@@ -1501,4 +1541,79 @@
|
|
1501
1541
|
<ref name="CitationType"/>
|
1502
1542
|
</element>
|
1503
1543
|
</define>
|
1544
|
+
<define name="amend">
|
1545
|
+
<element name="amend">
|
1546
|
+
<optional>
|
1547
|
+
<attribute name="id">
|
1548
|
+
<data type="ID"/>
|
1549
|
+
</attribute>
|
1550
|
+
</optional>
|
1551
|
+
<attribute name="change">
|
1552
|
+
<choice>
|
1553
|
+
<value>add</value>
|
1554
|
+
<value>modify</value>
|
1555
|
+
<value>delete</value>
|
1556
|
+
</choice>
|
1557
|
+
</attribute>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="path"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<attribute name="path_end"/>
|
1563
|
+
</optional>
|
1564
|
+
<optional>
|
1565
|
+
<attribute name="title"/>
|
1566
|
+
</optional>
|
1567
|
+
<optional>
|
1568
|
+
<element name="location">
|
1569
|
+
<zeroOrMore>
|
1570
|
+
<ref name="locality"/>
|
1571
|
+
</zeroOrMore>
|
1572
|
+
</element>
|
1573
|
+
</optional>
|
1574
|
+
<zeroOrMore>
|
1575
|
+
<ref name="autonumber"/>
|
1576
|
+
</zeroOrMore>
|
1577
|
+
<optional>
|
1578
|
+
<element name="description">
|
1579
|
+
<zeroOrMore>
|
1580
|
+
<ref name="BasicBlock"/>
|
1581
|
+
</zeroOrMore>
|
1582
|
+
</element>
|
1583
|
+
</optional>
|
1584
|
+
<optional>
|
1585
|
+
<element name="newcontent">
|
1586
|
+
<zeroOrMore>
|
1587
|
+
<ref name="BasicBlock"/>
|
1588
|
+
</zeroOrMore>
|
1589
|
+
</element>
|
1590
|
+
</optional>
|
1591
|
+
<optional>
|
1592
|
+
<element name="description">
|
1593
|
+
<zeroOrMore>
|
1594
|
+
<ref name="BasicBlock"/>
|
1595
|
+
</zeroOrMore>
|
1596
|
+
</element>
|
1597
|
+
</optional>
|
1598
|
+
</element>
|
1599
|
+
</define>
|
1600
|
+
<define name="autonumber">
|
1601
|
+
<element name="autonumber">
|
1602
|
+
<attribute name="type">
|
1603
|
+
<choice>
|
1604
|
+
<value>requirement</value>
|
1605
|
+
<value>recommendation</value>
|
1606
|
+
<value>permission</value>
|
1607
|
+
<value>table</value>
|
1608
|
+
<value>figure</value>
|
1609
|
+
<value>admonition</value>
|
1610
|
+
<value>formula</value>
|
1611
|
+
<value>sourcecode</value>
|
1612
|
+
<value>example</value>
|
1613
|
+
<value>note</value>
|
1614
|
+
</choice>
|
1615
|
+
</attribute>
|
1616
|
+
<text/>
|
1617
|
+
</element>
|
1618
|
+
</define>
|
1504
1619
|
</grammar>
|
@@ -13,7 +13,7 @@ module RelatonIeee
|
|
13
13
|
|
14
14
|
# @param ref [Strig]
|
15
15
|
# @param opts [Hash]
|
16
|
-
def initialize(ref)
|
16
|
+
def initialize(ref) # rubocop:disable Metrics/MethodLength
|
17
17
|
super
|
18
18
|
code = ref.sub /^IEEE\s/, ""
|
19
19
|
search = CGI.escape({ data: { searchTerm: code } }.to_json)
|
@@ -21,9 +21,9 @@ module RelatonIeee
|
|
21
21
|
resp = Faraday.get url
|
22
22
|
resp_json = JSON.parse resp.body
|
23
23
|
json = JSON.parse resp_json["message"]
|
24
|
-
@array = json["response"]["searchResults"]["resultsMapList"]
|
25
|
-
reduce([]) do |s, hit|
|
26
|
-
/^(?<id
|
24
|
+
@array = json["response"]["searchResults"]["resultsMapList"]
|
25
|
+
.reduce([]) do |s, hit|
|
26
|
+
/^(?:\w+\s)?(?<id>[^-\/]+)(-(?<year>\d{4}))?/ =~ hit["record"]["recordTitle"]
|
27
27
|
next s unless id && code =~ %r{^#{id}}
|
28
28
|
|
29
29
|
s << Hit.new(hit["record"].merge(code: id, year: year.to_i), self)
|
@@ -9,10 +9,13 @@ module RelatonIeee
|
|
9
9
|
super
|
10
10
|
end
|
11
11
|
|
12
|
-
# @param
|
13
|
-
# @
|
14
|
-
|
15
|
-
|
12
|
+
# @param opts [Hash]
|
13
|
+
# @option opts [Nokogiri::XML::Builder] :builder XML builder
|
14
|
+
# @option opts [Boolean] :bibdata
|
15
|
+
# @option opts [String] :lang language
|
16
|
+
# @return [String] XML
|
17
|
+
def to_xml(**opts)
|
18
|
+
super **opts do |bldr|
|
16
19
|
if opts[:bibdata] && committee.any?
|
17
20
|
bldr.ext do |b|
|
18
21
|
committee.each { |c| c.to_xml b }
|
@@ -18,7 +18,7 @@ module RelatonIeee
|
|
18
18
|
language: ["en"],
|
19
19
|
script: ["Latn"],
|
20
20
|
date: fetch_date(doc),
|
21
|
-
committee: fetch_committee(doc)
|
21
|
+
committee: fetch_committee(doc)
|
22
22
|
)
|
23
23
|
end
|
24
24
|
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
@@ -30,7 +30,7 @@ module RelatonIeee
|
|
30
30
|
def fetch_title(title)
|
31
31
|
[
|
32
32
|
RelatonBib::TypedTitleString.new(
|
33
|
-
type: "main", content: title, language: "en", script: "Latn"
|
33
|
+
type: "main", content: title, language: "en", script: "Latn"
|
34
34
|
),
|
35
35
|
]
|
36
36
|
end
|
@@ -38,7 +38,7 @@ module RelatonIeee
|
|
38
38
|
# @param title [String]
|
39
39
|
# @return [Array<RelatonBib::DocumentIdentifier>]
|
40
40
|
def fetch_docid(title)
|
41
|
-
/^(?<identifier
|
41
|
+
/^(?<identifier>(?:\w+\s)?\S+)/ =~ title
|
42
42
|
[RelatonBib::DocumentIdentifier.new(id: identifier, type: "IEEE")]
|
43
43
|
end
|
44
44
|
|
@@ -78,7 +78,7 @@ module RelatonIeee
|
|
78
78
|
# @return [Array<RelatonBib::ContributionInfo>]
|
79
79
|
def fetch_contributor(doc)
|
80
80
|
name = doc.at(
|
81
|
-
"//td[.='IEEE Program Manager']/following-sibling::td/div/a"
|
81
|
+
"//td[.='IEEE Program Manager']/following-sibling::td/div/a"
|
82
82
|
)
|
83
83
|
return [] unless name
|
84
84
|
|
@@ -89,11 +89,11 @@ module RelatonIeee
|
|
89
89
|
# @return [RelatonBib::ContributionInfo]
|
90
90
|
def personn_contrib(name)
|
91
91
|
fname = RelatonBib::FullName.new(
|
92
|
-
completename: RelatonBib::LocalizedString.new(name)
|
92
|
+
completename: RelatonBib::LocalizedString.new(name)
|
93
93
|
)
|
94
94
|
entity = RelatonBib::Person.new(name: fname)
|
95
95
|
RelatonBib::ContributionInfo.new(
|
96
|
-
entity: entity, role: [type: "author"]
|
96
|
+
entity: entity, role: [type: "author"]
|
97
97
|
)
|
98
98
|
end
|
99
99
|
|
@@ -117,8 +117,8 @@ module RelatonIeee
|
|
117
117
|
dates << RelatonBib::BibliographicDate.new(type: "issued",
|
118
118
|
on: issued.text)
|
119
119
|
end
|
120
|
-
published = doc.at("//td[.='History']/following-sibling::td/div")
|
121
|
-
text&.match(/(?<=Published Date:)[\d-]+/)&.to_s
|
120
|
+
published = doc.at("//td[.='History']/following-sibling::td/div")
|
121
|
+
&.text&.match(/(?<=Published Date:)[\d-]+/)&.to_s
|
122
122
|
if published
|
123
123
|
dates << RelatonBib::BibliographicDate.new(type: "published",
|
124
124
|
on: published)
|
@@ -136,6 +136,10 @@ module RelatonIeee
|
|
136
136
|
if sponsor
|
137
137
|
committees << Committee.new(type: "sponsor", name: sponsor.text)
|
138
138
|
end
|
139
|
+
sponsor = doc.at "//td[.='Standards Committee']/following-sibling::td/div/a"
|
140
|
+
if sponsor
|
141
|
+
committees << Committee.new(type: "standard", name: sponsor.text)
|
142
|
+
end
|
139
143
|
working = doc.at "//td[.='Working Group']/following-sibling::td/div"
|
140
144
|
chair = doc.at "//td[.='Working Group Chair']/following-sibling::td/div"
|
141
145
|
if working
|
data/lib/relaton_ieee/version.rb
CHANGED
data/relaton_ieee.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
145
|
+
version: 1.6.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
152
|
+
version: 1.6.0
|
153
153
|
description: 'RelatonIeee: retrieve IEEE Standards for bibliographic use using the
|
154
154
|
IeeeBibliographicItem model'
|
155
155
|
email:
|
@@ -193,7 +193,7 @@ licenses:
|
|
193
193
|
metadata:
|
194
194
|
homepage_uri: https://github.com/relaton/relaton-ieee
|
195
195
|
source_code_uri: https://github.com/relaton/relaton-ieee
|
196
|
-
post_install_message:
|
196
|
+
post_install_message:
|
197
197
|
rdoc_options: []
|
198
198
|
require_paths:
|
199
199
|
- lib
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
211
|
rubygems_version: 3.0.6
|
212
|
-
signing_key:
|
212
|
+
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: 'RelatonIeee: retrieve IEEE Standards for bibliographic use using the IeeeBibliographicItem
|
215
215
|
model'
|