relaton-ietf 1.7.4 → 1.9.1
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 -11
- data/.rubocop.yml +1 -1
- data/README.adoc +30 -4
- data/grammars/basicdoc.rng +165 -20
- data/grammars/biblio.rng +5 -6
- data/grammars/ietf.rng +42 -0
- data/grammars/isodoc.rng +532 -16
- data/grammars/reqt.rng +31 -2
- data/lib/relaton_ietf/committee.rb +8 -0
- data/lib/relaton_ietf/hash_converter.rb +1 -1
- data/lib/relaton_ietf/ietf_bibliographic_item.rb +2 -2
- data/lib/relaton_ietf/ietf_bibliography.rb +5 -1
- data/lib/relaton_ietf/scrapper.rb +354 -340
- data/lib/relaton_ietf/version.rb +1 -1
- data/lib/relaton_ietf/xml_parser.rb +1 -1
- data/lib/relaton_ietf.rb +1 -0
- data/relaton_ietf.gemspec +3 -5
- metadata +11 -10
data/grammars/reqt.rng
CHANGED
@@ -30,15 +30,34 @@
|
|
30
30
|
<data type="boolean"/>
|
31
31
|
</attribute>
|
32
32
|
</optional>
|
33
|
+
<optional>
|
34
|
+
<attribute name="number"/>
|
35
|
+
</optional>
|
33
36
|
<optional>
|
34
37
|
<attribute name="subsequence"/>
|
35
38
|
</optional>
|
39
|
+
<optional>
|
40
|
+
<attribute name="keep-with-next">
|
41
|
+
<data type="boolean"/>
|
42
|
+
</attribute>
|
43
|
+
</optional>
|
44
|
+
<optional>
|
45
|
+
<attribute name="keep-lines-together">
|
46
|
+
<data type="boolean"/>
|
47
|
+
</attribute>
|
48
|
+
</optional>
|
36
49
|
<attribute name="id">
|
37
50
|
<data type="ID"/>
|
38
51
|
</attribute>
|
39
52
|
<optional>
|
40
53
|
<attribute name="filename"/>
|
41
54
|
</optional>
|
55
|
+
<optional>
|
56
|
+
<attribute name="model"/>
|
57
|
+
</optional>
|
58
|
+
<optional>
|
59
|
+
<attribute name="type"/>
|
60
|
+
</optional>
|
42
61
|
<optional>
|
43
62
|
<ref name="reqtitle"/>
|
44
63
|
</optional>
|
@@ -48,9 +67,9 @@
|
|
48
67
|
<optional>
|
49
68
|
<ref name="subject"/>
|
50
69
|
</optional>
|
51
|
-
<
|
70
|
+
<zeroOrMore>
|
52
71
|
<ref name="reqinherit"/>
|
53
|
-
</
|
72
|
+
</zeroOrMore>
|
54
73
|
<zeroOrMore>
|
55
74
|
<ref name="classification"/>
|
56
75
|
</zeroOrMore>
|
@@ -135,6 +154,16 @@
|
|
135
154
|
<data type="boolean"/>
|
136
155
|
</attribute>
|
137
156
|
</optional>
|
157
|
+
<optional>
|
158
|
+
<attribute name="keep-with-next">
|
159
|
+
<data type="boolean"/>
|
160
|
+
</attribute>
|
161
|
+
</optional>
|
162
|
+
<optional>
|
163
|
+
<attribute name="keep-lines-together">
|
164
|
+
<data type="boolean"/>
|
165
|
+
</attribute>
|
166
|
+
</optional>
|
138
167
|
<oneOrMore>
|
139
168
|
<ref name="BasicBlock"/>
|
140
169
|
</oneOrMore>
|
@@ -21,7 +21,7 @@ module RelatonIetf
|
|
21
21
|
# @return [RelatonIetf::IetfBibliographicItem]
|
22
22
|
def self.from_hash(hash)
|
23
23
|
item_hash = ::RelatonIetf::HashConverter.hash_to_bib(hash)
|
24
|
-
new
|
24
|
+
new(**item_hash)
|
25
25
|
end
|
26
26
|
|
27
27
|
# @param opts [Hash]
|
@@ -32,7 +32,7 @@ module RelatonIetf
|
|
32
32
|
# @return [String] XML
|
33
33
|
def to_xml(**opts)
|
34
34
|
opts[:date_format] ||= :short
|
35
|
-
super
|
35
|
+
super(**opts)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -20,7 +20,11 @@ module RelatonIetf
|
|
20
20
|
def get(code, _year = nil, _opts = {})
|
21
21
|
warn "[relaton-ietf] (\"#{code}\") fetching..."
|
22
22
|
result = search code
|
23
|
-
|
23
|
+
if result
|
24
|
+
warn "[relaton-ietf] (\"#{code}\") found #{result.docidentifier.first.id}"
|
25
|
+
else
|
26
|
+
warn "[relaton-ietf] (\"#{code}\") not found"
|
27
|
+
end
|
24
28
|
result
|
25
29
|
end
|
26
30
|
end
|