relaton-omg 1.11.1 → 1.13.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/rake.yml +1 -24
- data/grammars/biblio.rng +180 -53
- data/lib/relaton_omg/scrapper.rb +2 -2
- data/lib/relaton_omg/version.rb +1 -1
- data/relaton_omg.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44825fb5d8d0a174d72f4a202c0a66b845aeaa0f7e4e6f216ecc9d556241e367
|
4
|
+
data.tar.gz: b00a2d0fd55cae2e2d7a5257827aacf127d9d3832c8191b43be416b2abc3cdc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5e89af97870269acec49f2f7760789b4ceb0ee055144b23941a9d475dc7f2abc9ab7bbd6d68b55ebbe5207fa00b668c29dabc821d7b0e00c0f2f18e59b015e3
|
7
|
+
data.tar.gz: bb3719aedbe064ab9a7c7f47b5df1764538a1c514d559c73595fb6068af3f09bf9a4a5b1876f9ed9f2f17c06faaef5c626ca8dc3428448ee3a63ae1d5f86172e
|
data/.github/workflows/rake.yml
CHANGED
@@ -10,27 +10,4 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
rake:
|
13
|
-
|
14
|
-
runs-on: ${{ matrix.os }}
|
15
|
-
continue-on-error: ${{ matrix.experimental }}
|
16
|
-
strategy:
|
17
|
-
fail-fast: false
|
18
|
-
matrix:
|
19
|
-
ruby: [ '3.0', '2.7', '2.6', '2.5' ]
|
20
|
-
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
|
-
experimental: [ false ]
|
22
|
-
steps:
|
23
|
-
- uses: actions/checkout@v2
|
24
|
-
with:
|
25
|
-
submodules: true
|
26
|
-
|
27
|
-
# https://github.com/ruby-debug/debase/issues/89#issuecomment-686827382
|
28
|
-
- if: matrix.os == 'macos-latest' && matrix.ruby == '2.5'
|
29
|
-
run: echo BUNDLE_BUILD__DEBASE="--with-cflags=\"-Wno-error=implicit-function-declaration\"" >> $GITHUB_ENV
|
30
|
-
|
31
|
-
- uses: ruby/setup-ruby@v1
|
32
|
-
with:
|
33
|
-
ruby-version: ${{ matrix.ruby }}
|
34
|
-
bundler-cache: true
|
35
|
-
|
36
|
-
- run: bundle exec rake
|
13
|
+
uses: relaton/support/.github/workflows/rake.yml@master
|
data/grammars/biblio.rng
CHANGED
@@ -225,9 +225,9 @@
|
|
225
225
|
<zeroOrMore>
|
226
226
|
<ref name="forename"/>
|
227
227
|
</zeroOrMore>
|
228
|
-
<
|
229
|
-
<ref name="
|
230
|
-
</
|
228
|
+
<optional>
|
229
|
+
<ref name="formatted-initials"/>
|
230
|
+
</optional>
|
231
231
|
<ref name="surname"/>
|
232
232
|
<zeroOrMore>
|
233
233
|
<ref name="addition"/>
|
@@ -247,8 +247,8 @@
|
|
247
247
|
<ref name="LocalizedString"/>
|
248
248
|
</element>
|
249
249
|
</define>
|
250
|
-
<define name="
|
251
|
-
<element name="
|
250
|
+
<define name="formatted-initials">
|
251
|
+
<element name="formatted-initials">
|
252
252
|
<ref name="LocalizedString"/>
|
253
253
|
</element>
|
254
254
|
</define>
|
@@ -264,6 +264,9 @@
|
|
264
264
|
</define>
|
265
265
|
<define name="forename">
|
266
266
|
<element name="forename">
|
267
|
+
<optional>
|
268
|
+
<attribute name="initial"/>
|
269
|
+
</optional>
|
267
270
|
<ref name="LocalizedString"/>
|
268
271
|
</element>
|
269
272
|
</define>
|
@@ -527,7 +530,7 @@
|
|
527
530
|
</define>
|
528
531
|
<define name="LocalityType">
|
529
532
|
<data type="string">
|
530
|
-
<param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
|
533
|
+
<param name="pattern">section|clause|part|paragraph|chapter|page|title|line|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
|
531
534
|
</data>
|
532
535
|
</define>
|
533
536
|
<define name="referenceFrom">
|
@@ -614,12 +617,103 @@
|
|
614
617
|
<optional>
|
615
618
|
<ref name="fetched"/>
|
616
619
|
</optional>
|
617
|
-
<
|
618
|
-
<oneOrMore>
|
619
|
-
<ref name="btitle"/>
|
620
|
-
</oneOrMore>
|
620
|
+
<optional>
|
621
621
|
<ref name="formattedref"/>
|
622
|
-
</
|
622
|
+
</optional>
|
623
|
+
<oneOrMore>
|
624
|
+
<ref name="btitle"/>
|
625
|
+
</oneOrMore>
|
626
|
+
<zeroOrMore>
|
627
|
+
<ref name="bsource"/>
|
628
|
+
</zeroOrMore>
|
629
|
+
<oneOrMore>
|
630
|
+
<ref name="docidentifier"/>
|
631
|
+
</oneOrMore>
|
632
|
+
<optional>
|
633
|
+
<ref name="docnumber"/>
|
634
|
+
</optional>
|
635
|
+
<zeroOrMore>
|
636
|
+
<ref name="bdate"/>
|
637
|
+
</zeroOrMore>
|
638
|
+
<zeroOrMore>
|
639
|
+
<ref name="contributor"/>
|
640
|
+
</zeroOrMore>
|
641
|
+
<optional>
|
642
|
+
<ref name="edition"/>
|
643
|
+
</optional>
|
644
|
+
<zeroOrMore>
|
645
|
+
<ref name="version"/>
|
646
|
+
</zeroOrMore>
|
647
|
+
<zeroOrMore>
|
648
|
+
<ref name="biblionote"/>
|
649
|
+
</zeroOrMore>
|
650
|
+
<zeroOrMore>
|
651
|
+
<ref name="language"/>
|
652
|
+
</zeroOrMore>
|
653
|
+
<zeroOrMore>
|
654
|
+
<ref name="script"/>
|
655
|
+
</zeroOrMore>
|
656
|
+
<zeroOrMore>
|
657
|
+
<ref name="bibabstract"/>
|
658
|
+
</zeroOrMore>
|
659
|
+
<optional>
|
660
|
+
<ref name="status"/>
|
661
|
+
</optional>
|
662
|
+
<zeroOrMore>
|
663
|
+
<ref name="copyright"/>
|
664
|
+
</zeroOrMore>
|
665
|
+
<zeroOrMore>
|
666
|
+
<ref name="docrelation"/>
|
667
|
+
</zeroOrMore>
|
668
|
+
<zeroOrMore>
|
669
|
+
<ref name="series"/>
|
670
|
+
</zeroOrMore>
|
671
|
+
<optional>
|
672
|
+
<ref name="medium"/>
|
673
|
+
</optional>
|
674
|
+
<zeroOrMore>
|
675
|
+
<ref name="bplace"/>
|
676
|
+
</zeroOrMore>
|
677
|
+
<zeroOrMore>
|
678
|
+
<ref name="bprice"/>
|
679
|
+
</zeroOrMore>
|
680
|
+
<zeroOrMore>
|
681
|
+
<ref name="extent"/>
|
682
|
+
</zeroOrMore>
|
683
|
+
<optional>
|
684
|
+
<ref name="bibliographic_size"/>
|
685
|
+
</optional>
|
686
|
+
<zeroOrMore>
|
687
|
+
<ref name="accesslocation"/>
|
688
|
+
</zeroOrMore>
|
689
|
+
<zeroOrMore>
|
690
|
+
<ref name="license"/>
|
691
|
+
</zeroOrMore>
|
692
|
+
<zeroOrMore>
|
693
|
+
<ref name="bclassification"/>
|
694
|
+
</zeroOrMore>
|
695
|
+
<zeroOrMore>
|
696
|
+
<ref name="bkeyword"/>
|
697
|
+
</zeroOrMore>
|
698
|
+
<optional>
|
699
|
+
<ref name="validity"/>
|
700
|
+
</optional>
|
701
|
+
</define>
|
702
|
+
<define name="ReducedBibliographicItem">
|
703
|
+
<optional>
|
704
|
+
<attribute name="type">
|
705
|
+
<ref name="BibItemType"/>
|
706
|
+
</attribute>
|
707
|
+
</optional>
|
708
|
+
<optional>
|
709
|
+
<ref name="fetched"/>
|
710
|
+
</optional>
|
711
|
+
<optional>
|
712
|
+
<ref name="formattedref"/>
|
713
|
+
</optional>
|
714
|
+
<zeroOrMore>
|
715
|
+
<ref name="btitle"/>
|
716
|
+
</zeroOrMore>
|
623
717
|
<zeroOrMore>
|
624
718
|
<ref name="bsource"/>
|
625
719
|
</zeroOrMore>
|
@@ -638,9 +732,9 @@
|
|
638
732
|
<optional>
|
639
733
|
<ref name="edition"/>
|
640
734
|
</optional>
|
641
|
-
<
|
735
|
+
<zeroOrMore>
|
642
736
|
<ref name="version"/>
|
643
|
-
</
|
737
|
+
</zeroOrMore>
|
644
738
|
<zeroOrMore>
|
645
739
|
<ref name="biblionote"/>
|
646
740
|
</zeroOrMore>
|
@@ -833,6 +927,12 @@
|
|
833
927
|
<data type="boolean"/>
|
834
928
|
</attribute>
|
835
929
|
</optional>
|
930
|
+
<optional>
|
931
|
+
<attribute name="language"/>
|
932
|
+
</optional>
|
933
|
+
<optional>
|
934
|
+
<attribute name="script"/>
|
935
|
+
</optional>
|
836
936
|
<text/>
|
837
937
|
</element>
|
838
938
|
</define>
|
@@ -851,17 +951,46 @@
|
|
851
951
|
</define>
|
852
952
|
<define name="bplace">
|
853
953
|
<element name="place">
|
854
|
-
<
|
855
|
-
<
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
954
|
+
<choice>
|
955
|
+
<text/>
|
956
|
+
<group>
|
957
|
+
<ref name="bibliocity"/>
|
958
|
+
<zeroOrMore>
|
959
|
+
<ref name="biblioregion"/>
|
960
|
+
</zeroOrMore>
|
961
|
+
<zeroOrMore>
|
962
|
+
<ref name="bibliocountry"/>
|
963
|
+
</zeroOrMore>
|
964
|
+
</group>
|
965
|
+
</choice>
|
966
|
+
</element>
|
967
|
+
</define>
|
968
|
+
<define name="bibliocity">
|
969
|
+
<element name="city">
|
862
970
|
<text/>
|
863
971
|
</element>
|
864
972
|
</define>
|
973
|
+
<define name="biblioregion">
|
974
|
+
<element name="region">
|
975
|
+
<ref name="RegionType"/>
|
976
|
+
</element>
|
977
|
+
</define>
|
978
|
+
<define name="bibliocountry">
|
979
|
+
<element name="country">
|
980
|
+
<ref name="RegionType"/>
|
981
|
+
</element>
|
982
|
+
</define>
|
983
|
+
<define name="RegionType">
|
984
|
+
<optional>
|
985
|
+
<attribute name="iso"/>
|
986
|
+
</optional>
|
987
|
+
<optional>
|
988
|
+
<attribute name="recommended">
|
989
|
+
<data type="boolean"/>
|
990
|
+
</attribute>
|
991
|
+
</optional>
|
992
|
+
<text/>
|
993
|
+
</define>
|
865
994
|
<define name="bprice">
|
866
995
|
<element name="price">
|
867
996
|
<attribute name="currency"/>
|
@@ -957,36 +1086,34 @@
|
|
957
1086
|
<ref name="SeriesType"/>
|
958
1087
|
</attribute>
|
959
1088
|
</optional>
|
960
|
-
<
|
1089
|
+
<optional>
|
961
1090
|
<ref name="formattedref"/>
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
</group>
|
989
|
-
</choice>
|
1091
|
+
</optional>
|
1092
|
+
<ref name="btitle"/>
|
1093
|
+
<optional>
|
1094
|
+
<ref name="bplace"/>
|
1095
|
+
</optional>
|
1096
|
+
<optional>
|
1097
|
+
<ref name="seriesorganization"/>
|
1098
|
+
</optional>
|
1099
|
+
<optional>
|
1100
|
+
<ref name="abbreviation"/>
|
1101
|
+
</optional>
|
1102
|
+
<optional>
|
1103
|
+
<ref name="seriesfrom"/>
|
1104
|
+
</optional>
|
1105
|
+
<optional>
|
1106
|
+
<ref name="seriesto"/>
|
1107
|
+
</optional>
|
1108
|
+
<optional>
|
1109
|
+
<ref name="seriesnumber"/>
|
1110
|
+
</optional>
|
1111
|
+
<optional>
|
1112
|
+
<ref name="seriespartnumber"/>
|
1113
|
+
</optional>
|
1114
|
+
<optional>
|
1115
|
+
<ref name="seriesrun"/>
|
1116
|
+
</optional>
|
990
1117
|
</element>
|
991
1118
|
</define>
|
992
1119
|
<define name="SeriesType">
|
@@ -1145,7 +1272,7 @@
|
|
1145
1272
|
</element>
|
1146
1273
|
</optional>
|
1147
1274
|
<element name="bibitem">
|
1148
|
-
<ref name="
|
1275
|
+
<ref name="ReducedBibliographicItem"/>
|
1149
1276
|
</element>
|
1150
1277
|
<choice>
|
1151
1278
|
<zeroOrMore>
|
@@ -1170,9 +1297,9 @@
|
|
1170
1297
|
<optional>
|
1171
1298
|
<ref name="revision-date"/>
|
1172
1299
|
</optional>
|
1173
|
-
<
|
1300
|
+
<optional>
|
1174
1301
|
<ref name="draft"/>
|
1175
|
-
</
|
1302
|
+
</optional>
|
1176
1303
|
</element>
|
1177
1304
|
</define>
|
1178
1305
|
<define name="vedition">
|
data/lib/relaton_omg/scrapper.rb
CHANGED
@@ -13,7 +13,7 @@ module RelatonOmg
|
|
13
13
|
url += "/#{version}" if version
|
14
14
|
doc = Nokogiri::HTML OpenURI.open_uri(url, open_timeout: 10)
|
15
15
|
OmgBibliographicItem.new(**item(doc, acronym))
|
16
|
-
rescue OpenURI::HTTPError, URI::InvalidURIError => e
|
16
|
+
rescue OpenURI::HTTPError, URI::InvalidURIError, Net::OpenTimeout => e
|
17
17
|
if e.is_a?(URI::InvalidURIError) || e.io.status[0] == "404"
|
18
18
|
warn %{[relaton-omg] no document found for "#{ref}" reference.}
|
19
19
|
return
|
@@ -65,7 +65,7 @@ module RelatonOmg
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def fetch_version(doc)
|
68
|
-
RelatonBib::BibliographicItem::Version.new
|
68
|
+
[RelatonBib::BibliographicItem::Version.new(pub_date(doc), version(doc))]
|
69
69
|
end
|
70
70
|
|
71
71
|
def version(doc)
|
data/lib/relaton_omg/version.rb
CHANGED
data/relaton_omg.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-omg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.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: 2022-
|
11
|
+
date: 2022-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.13.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.13.0
|
125
125
|
description: 'RelatonOmg: retrieve OMG Standards for bibliographic using the IsoBibliographicItem
|
126
126
|
model'
|
127
127
|
email:
|