relaton-gb 1.3.0 → 1.4.0
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/README.adoc +4 -22
- data/grammars/isodoc.rng +130 -21
- data/grammars/isostandard.rng +1 -1
- data/lib/relaton_gb/version.rb +1 -1
- data/relaton_gb.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: c6fad471830e1c0f9172e7edd3b06affad5aca2da674e83dbe2faa8c098e7b8b
|
|
4
|
+
data.tar.gz: e0ac69e2e95a397c038538a4c6e1e7dd66c80d9732403ab3971329d955a63d95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b960cff84c679239f909ea92fc4ac36ab2c4ab40c6446f065cd4d633df492a81898865f5fafaa4d172fad3c63fe2bfa381d95c3c4378acc7deda90ac3c1440a
|
|
7
|
+
data.tar.gz: b8b755a5d5e9d86627d56254038b57cbd7fa9656bf2d277f99e3792ef76b76046b73880efc7c25173d621e0d6cc5039630b860c12306baccf1a11b17e7dd6a84
|
data/README.adoc
CHANGED
|
@@ -46,28 +46,10 @@ Or install it yourself as:
|
|
|
46
46
|
require 'relaton_gb'
|
|
47
47
|
|
|
48
48
|
hit_collection = RelatonGb::GbBibliography.search "GB/T 20223-2006"
|
|
49
|
-
=>
|
|
50
|
-
<RelatonGb::Hit:0x007f97572b7208 @fullIdentifier="" @title="20010320-T-424 棉短绒">,
|
|
51
|
-
<RelatonGb::Hit:0x007f97572b70c8 @fullIdentifier="" @title="GB/T 20223-2018 棉短绒">,
|
|
52
|
-
<RelatonGb::Hit:0x007f97572b6fb0 @fullIdentifier="" @title="NB/T 20223-2013 核电厂安全重要机械设备维修指南">,
|
|
53
|
-
<RelatonGb::Hit:0x007f97572b6e98 @fullIdentifier="" @title="20130458-T-424 棉短绒">,
|
|
54
|
-
<RelatonGb::Hit:0x007f97572b6d80 @fullIdentifier="" @title="GB 12995-2006 机动轮椅车">,
|
|
55
|
-
<RelatonGb::Hit:0x007f97572b6c68 @fullIdentifier="" @title="GB 14866-2006 个人用眼护具技术要求">,
|
|
56
|
-
<RelatonGb::Hit:0x007f97572b6b28 @fullIdentifier="" @title="GB/T 20788-2006 饲草揉碎机">,
|
|
57
|
-
<RelatonGb::Hit:0x007f97572b6a10 @fullIdentifier="" @title="GB/T 20707-2006 可可脂">,
|
|
58
|
-
<RelatonGb::Hit:0x007f97572b68f8 @fullIdentifier="" @title="GB/T 20706-2006 可可粉">]
|
|
59
|
-
|
|
60
|
-
hit_collection.size
|
|
61
|
-
=> 10
|
|
49
|
+
=> <RelatonGb::HitCollection:0x007fc8d8a26d10 @ref= @fetched=false>
|
|
62
50
|
|
|
63
51
|
hit_collection.first
|
|
64
|
-
=> <RelatonGb::Hit:
|
|
65
|
-
|
|
66
|
-
hit_collection[1]
|
|
67
|
-
=> <RelatonGb::Hit:0x007f97572b7208 @fullIdentifier="" @title="20010320-T-424 棉短绒">
|
|
68
|
-
|
|
69
|
-
hit_collection.first.title
|
|
70
|
-
=> "GB/T 20223-2006 棉短绒"
|
|
52
|
+
=> <RelatonGb::Hit:0x007fc8d8a27c88 @fullIdentifier="" @docref="GB/T 20223-2006">
|
|
71
53
|
----
|
|
72
54
|
|
|
73
55
|
=== Scrape document form collection
|
|
@@ -111,7 +93,7 @@ hit_collection.first.fetch.date
|
|
|
111
93
|
=> [#<RelatonBib::BibliographicDate:0x007f975a0207d0 @from=nil, @on=2006-03-10 00:00:00 +0100, @to=nil, @type="published">]
|
|
112
94
|
----
|
|
113
95
|
|
|
114
|
-
=== Create bibliographic item
|
|
96
|
+
=== Create bibliographic item from YAML
|
|
115
97
|
[source,ruby]
|
|
116
98
|
----
|
|
117
99
|
hash = YAML.load_file 'spec/examples/gb_bib_item.yml'
|
|
@@ -131,7 +113,7 @@ RelatonGb::GbBibliographicItem.new bib_hash
|
|
|
131
113
|
[source,ruby]
|
|
132
114
|
----
|
|
133
115
|
hit_collection.first.fetch.to_xml
|
|
134
|
-
=>"<bibitem id="GB/T20223-2006" type="
|
|
116
|
+
=>"<bibitem id="GB/T20223-2006" type="standard\">
|
|
135
117
|
<title type="title-main" format="text/plain" language="zh" script="Hans">棉短绒</title>
|
|
136
118
|
<title type="main" format="text/plain" language="zh" script="Hans">棉短绒</title>
|
|
137
119
|
<title type="title-main" format="text/plain" language="en" script="Latn">Cotton linter</title>
|
data/grammars/isodoc.rng
CHANGED
|
@@ -42,8 +42,11 @@
|
|
|
42
42
|
</define>
|
|
43
43
|
<define name="xref">
|
|
44
44
|
<element name="xref">
|
|
45
|
+
<!-- attribute target { xsd:IDREF }, -->
|
|
45
46
|
<attribute name="target">
|
|
46
|
-
<data type="
|
|
47
|
+
<data type="string">
|
|
48
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
|
49
|
+
</data>
|
|
47
50
|
</attribute>
|
|
48
51
|
<optional>
|
|
49
52
|
<attribute name="type">
|
|
@@ -61,6 +64,11 @@
|
|
|
61
64
|
</choice>
|
|
62
65
|
</attribute>
|
|
63
66
|
</optional>
|
|
67
|
+
<optional>
|
|
68
|
+
<attribute name="droploc">
|
|
69
|
+
<data type="boolean"/>
|
|
70
|
+
</attribute>
|
|
71
|
+
</optional>
|
|
64
72
|
<text/>
|
|
65
73
|
</element>
|
|
66
74
|
</define>
|
|
@@ -578,6 +586,8 @@
|
|
|
578
586
|
<ref name="ol"/>
|
|
579
587
|
<ref name="dl"/>
|
|
580
588
|
<ref name="formula"/>
|
|
589
|
+
<ref name="quote"/>
|
|
590
|
+
<ref name="sourcecode"/>
|
|
581
591
|
</choice>
|
|
582
592
|
</oneOrMore>
|
|
583
593
|
</element>
|
|
@@ -661,6 +671,16 @@
|
|
|
661
671
|
</choice>
|
|
662
672
|
</attribute>
|
|
663
673
|
</optional>
|
|
674
|
+
<optional>
|
|
675
|
+
<attribute name="valign">
|
|
676
|
+
<choice>
|
|
677
|
+
<value>top</value>
|
|
678
|
+
<value>middle</value>
|
|
679
|
+
<value>bottom</value>
|
|
680
|
+
<value>baseline</value>
|
|
681
|
+
</choice>
|
|
682
|
+
</attribute>
|
|
683
|
+
</optional>
|
|
664
684
|
<choice>
|
|
665
685
|
<zeroOrMore>
|
|
666
686
|
<choice>
|
|
@@ -697,6 +717,16 @@
|
|
|
697
717
|
</choice>
|
|
698
718
|
</attribute>
|
|
699
719
|
</optional>
|
|
720
|
+
<optional>
|
|
721
|
+
<attribute name="valign">
|
|
722
|
+
<choice>
|
|
723
|
+
<value>top</value>
|
|
724
|
+
<value>middle</value>
|
|
725
|
+
<value>bottom</value>
|
|
726
|
+
<value>baseline</value>
|
|
727
|
+
</choice>
|
|
728
|
+
</attribute>
|
|
729
|
+
</optional>
|
|
700
730
|
<choice>
|
|
701
731
|
<zeroOrMore>
|
|
702
732
|
<choice>
|
|
@@ -855,7 +885,7 @@
|
|
|
855
885
|
<oneOrMore>
|
|
856
886
|
<choice>
|
|
857
887
|
<ref name="content"/>
|
|
858
|
-
<ref name="
|
|
888
|
+
<ref name="abstract"/>
|
|
859
889
|
<ref name="foreword"/>
|
|
860
890
|
<ref name="introduction"/>
|
|
861
891
|
<ref name="acknowledgements"/>
|
|
@@ -922,6 +952,9 @@
|
|
|
922
952
|
<optional>
|
|
923
953
|
<attribute name="script"/>
|
|
924
954
|
</optional>
|
|
955
|
+
<optional>
|
|
956
|
+
<attribute name="type"/>
|
|
957
|
+
</optional>
|
|
925
958
|
<optional>
|
|
926
959
|
<attribute name="obligation">
|
|
927
960
|
<choice>
|
|
@@ -961,9 +994,6 @@
|
|
|
961
994
|
</define>
|
|
962
995
|
<define name="content-subsection">
|
|
963
996
|
<element name="clause">
|
|
964
|
-
<optional>
|
|
965
|
-
<attribute name="type"/>
|
|
966
|
-
</optional>
|
|
967
997
|
<ref name="Content-Section"/>
|
|
968
998
|
</element>
|
|
969
999
|
</define>
|
|
@@ -992,6 +1022,9 @@
|
|
|
992
1022
|
</choice>
|
|
993
1023
|
</attribute>
|
|
994
1024
|
</optional>
|
|
1025
|
+
<optional>
|
|
1026
|
+
<attribute name="type"/>
|
|
1027
|
+
</optional>
|
|
995
1028
|
<optional>
|
|
996
1029
|
<ref name="section-title"/>
|
|
997
1030
|
</optional>
|
|
@@ -1011,9 +1044,6 @@
|
|
|
1011
1044
|
</define>
|
|
1012
1045
|
<define name="clause">
|
|
1013
1046
|
<element name="clause">
|
|
1014
|
-
<optional>
|
|
1015
|
-
<attribute name="type"/>
|
|
1016
|
-
</optional>
|
|
1017
1047
|
<ref name="Clause-Section"/>
|
|
1018
1048
|
</element>
|
|
1019
1049
|
</define>
|
|
@@ -1042,18 +1072,24 @@
|
|
|
1042
1072
|
</choice>
|
|
1043
1073
|
</attribute>
|
|
1044
1074
|
</optional>
|
|
1075
|
+
<optional>
|
|
1076
|
+
<attribute name="type"/>
|
|
1077
|
+
</optional>
|
|
1045
1078
|
<optional>
|
|
1046
1079
|
<ref name="section-title"/>
|
|
1047
1080
|
</optional>
|
|
1048
1081
|
<group>
|
|
1049
|
-
<
|
|
1050
|
-
<
|
|
1051
|
-
<
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
<
|
|
1055
|
-
|
|
1056
|
-
|
|
1082
|
+
<choice>
|
|
1083
|
+
<group>
|
|
1084
|
+
<zeroOrMore>
|
|
1085
|
+
<ref name="BasicBlock"/>
|
|
1086
|
+
</zeroOrMore>
|
|
1087
|
+
<zeroOrMore>
|
|
1088
|
+
<ref name="note"/>
|
|
1089
|
+
</zeroOrMore>
|
|
1090
|
+
</group>
|
|
1091
|
+
<ref name="amend"/>
|
|
1092
|
+
</choice>
|
|
1057
1093
|
<zeroOrMore>
|
|
1058
1094
|
<choice>
|
|
1059
1095
|
<ref name="clause-subsection"/>
|
|
@@ -1180,6 +1216,9 @@
|
|
|
1180
1216
|
<optional>
|
|
1181
1217
|
<attribute name="script"/>
|
|
1182
1218
|
</optional>
|
|
1219
|
+
<optional>
|
|
1220
|
+
<attribute name="type"/>
|
|
1221
|
+
</optional>
|
|
1183
1222
|
<optional>
|
|
1184
1223
|
<attribute name="obligation">
|
|
1185
1224
|
<choice>
|
|
@@ -1447,11 +1486,6 @@
|
|
|
1447
1486
|
</optional>
|
|
1448
1487
|
</element>
|
|
1449
1488
|
</define>
|
|
1450
|
-
<define name="preface_abstract">
|
|
1451
|
-
<element name="abstract">
|
|
1452
|
-
<ref name="Basic-Section"/>
|
|
1453
|
-
</element>
|
|
1454
|
-
</define>
|
|
1455
1489
|
<define name="term-clause">
|
|
1456
1490
|
<element name="clause">
|
|
1457
1491
|
<optional>
|
|
@@ -1501,4 +1535,79 @@
|
|
|
1501
1535
|
<ref name="CitationType"/>
|
|
1502
1536
|
</element>
|
|
1503
1537
|
</define>
|
|
1538
|
+
<define name="amend">
|
|
1539
|
+
<element name="amend">
|
|
1540
|
+
<optional>
|
|
1541
|
+
<attribute name="id">
|
|
1542
|
+
<data type="ID"/>
|
|
1543
|
+
</attribute>
|
|
1544
|
+
</optional>
|
|
1545
|
+
<attribute name="change">
|
|
1546
|
+
<choice>
|
|
1547
|
+
<value>add</value>
|
|
1548
|
+
<value>modify</value>
|
|
1549
|
+
<value>delete</value>
|
|
1550
|
+
</choice>
|
|
1551
|
+
</attribute>
|
|
1552
|
+
<optional>
|
|
1553
|
+
<attribute name="path"/>
|
|
1554
|
+
</optional>
|
|
1555
|
+
<optional>
|
|
1556
|
+
<attribute name="path_end"/>
|
|
1557
|
+
</optional>
|
|
1558
|
+
<optional>
|
|
1559
|
+
<attribute name="title"/>
|
|
1560
|
+
</optional>
|
|
1561
|
+
<optional>
|
|
1562
|
+
<element name="location">
|
|
1563
|
+
<zeroOrMore>
|
|
1564
|
+
<ref name="locality"/>
|
|
1565
|
+
</zeroOrMore>
|
|
1566
|
+
</element>
|
|
1567
|
+
</optional>
|
|
1568
|
+
<zeroOrMore>
|
|
1569
|
+
<ref name="autonumber"/>
|
|
1570
|
+
</zeroOrMore>
|
|
1571
|
+
<optional>
|
|
1572
|
+
<element name="description">
|
|
1573
|
+
<zeroOrMore>
|
|
1574
|
+
<ref name="BasicBlock"/>
|
|
1575
|
+
</zeroOrMore>
|
|
1576
|
+
</element>
|
|
1577
|
+
</optional>
|
|
1578
|
+
<optional>
|
|
1579
|
+
<element name="newcontent">
|
|
1580
|
+
<zeroOrMore>
|
|
1581
|
+
<ref name="BasicBlock"/>
|
|
1582
|
+
</zeroOrMore>
|
|
1583
|
+
</element>
|
|
1584
|
+
</optional>
|
|
1585
|
+
<optional>
|
|
1586
|
+
<element name="description">
|
|
1587
|
+
<zeroOrMore>
|
|
1588
|
+
<ref name="BasicBlock"/>
|
|
1589
|
+
</zeroOrMore>
|
|
1590
|
+
</element>
|
|
1591
|
+
</optional>
|
|
1592
|
+
</element>
|
|
1593
|
+
</define>
|
|
1594
|
+
<define name="autonumber">
|
|
1595
|
+
<element name="autonumber">
|
|
1596
|
+
<attribute name="type">
|
|
1597
|
+
<choice>
|
|
1598
|
+
<value>requirement</value>
|
|
1599
|
+
<value>recommendation</value>
|
|
1600
|
+
<value>permission</value>
|
|
1601
|
+
<value>table</value>
|
|
1602
|
+
<value>figure</value>
|
|
1603
|
+
<value>admonition</value>
|
|
1604
|
+
<value>formula</value>
|
|
1605
|
+
<value>sourcecode</value>
|
|
1606
|
+
<value>example</value>
|
|
1607
|
+
<value>note</value>
|
|
1608
|
+
</choice>
|
|
1609
|
+
</attribute>
|
|
1610
|
+
<text/>
|
|
1611
|
+
</element>
|
|
1612
|
+
</define>
|
|
1504
1613
|
</grammar>
|
data/grammars/isostandard.rng
CHANGED
data/lib/relaton_gb/version.rb
CHANGED
data/relaton_gb.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-gb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.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-09-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: debase
|
|
@@ -184,14 +184,14 @@ dependencies:
|
|
|
184
184
|
requirements:
|
|
185
185
|
- - ">="
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: 1.
|
|
187
|
+
version: 1.4.0
|
|
188
188
|
type: :runtime
|
|
189
189
|
prerelease: false
|
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
191
191
|
requirements:
|
|
192
192
|
- - ">="
|
|
193
193
|
- !ruby/object:Gem::Version
|
|
194
|
-
version: 1.
|
|
194
|
+
version: 1.4.0
|
|
195
195
|
description: 'RelatonGb: retrieve Chinese GB Standards for bibliographic use using
|
|
196
196
|
the BibliographicItem model.'
|
|
197
197
|
email:
|
|
@@ -241,7 +241,7 @@ homepage: https://github.com/metanorma/relaton_gb
|
|
|
241
241
|
licenses:
|
|
242
242
|
- BSD-2-Clause
|
|
243
243
|
metadata: {}
|
|
244
|
-
post_install_message:
|
|
244
|
+
post_install_message:
|
|
245
245
|
rdoc_options: []
|
|
246
246
|
require_paths:
|
|
247
247
|
- lib
|
|
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
257
257
|
version: '0'
|
|
258
258
|
requirements: []
|
|
259
259
|
rubygems_version: 3.0.6
|
|
260
|
-
signing_key:
|
|
260
|
+
signing_key:
|
|
261
261
|
specification_version: 4
|
|
262
262
|
summary: 'RelatonGb: retrieve Chinese GB Standards for bibliographic use using the
|
|
263
263
|
BibliographicItem model.'
|