relaton-bipm 1.12.3 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6da8165d7298a3658db3d941f2e0540e61bc53ddd726a79383cc36dc77f1b9a
4
- data.tar.gz: 6748ecb244655bbbe8ef3226c5f72572d89104f591c256fe3db9f59cd3730b83
3
+ metadata.gz: 60cc8b3979fffe05b9bc5d554e7bc6b486867a5a32f332b30c8fb30601b49b18
4
+ data.tar.gz: 3e20d99bb7d1055b6bedc2ab42a8c9eb074738ee8ebd8d26aba67f824a4935d0
5
5
  SHA512:
6
- metadata.gz: c58dfe2d3407b0b0ec5bcc42a412eb740ff7834559a533e7f8677789590f78016ef58111936cc7021a76b263f6f4dfce5d636b559d0fd83a5484c822a2aa2bb4
7
- data.tar.gz: b5e9ad9000dd8605eefc6cc06957d9841e9b283f3f471616ba681f64086ffc70004ca929c0d291dd66a3b46a56491cf96ca4dceaf2e36de599a876f84aef40d0
6
+ metadata.gz: 5a59447492ae98160a67ed7a5f2843f211edbca658a452e685f521a5a940d102ee47d2b7d39265077407ff5a0cf9892f9d9c19e0719ad7c46e304b9f797e4709
7
+ data.tar.gz: d0c55fe5d12003e400cc660c6561bcf5878741b955785951089405ee64b4e94bc3067b8181f72b88ec7bb04a27dd93163cf19b289bdd3c3c1ccfff68b85579a1
data/grammars/biblio.rng CHANGED
@@ -225,9 +225,9 @@
225
225
  <zeroOrMore>
226
226
  <ref name="forename"/>
227
227
  </zeroOrMore>
228
- <zeroOrMore>
229
- <ref name="initial"/>
230
- </zeroOrMore>
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="initial">
251
- <element name="initial">
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>
data/grammars/isodoc.rng CHANGED
@@ -69,6 +69,17 @@
69
69
  </zeroOrMore>
70
70
  </element>
71
71
  </define>
72
+ <define name="AdmonitionType">
73
+ <choice>
74
+ <value>warning</value>
75
+ <value>note</value>
76
+ <value>tip</value>
77
+ <value>important</value>
78
+ <value>caution</value>
79
+ <value>statement</value>
80
+ <value>editorial</value>
81
+ </choice>
82
+ </define>
72
83
  <define name="index">
73
84
  <element name="index">
74
85
  <optional>
@@ -1274,7 +1285,12 @@
1274
1285
  </define>
1275
1286
  <define name="span">
1276
1287
  <element name="span">
1277
- <attribute name="class"/>
1288
+ <optional>
1289
+ <attribute name="class"/>
1290
+ </optional>
1291
+ <optional>
1292
+ <attribute name="style"/>
1293
+ </optional>
1278
1294
  <oneOrMore>
1279
1295
  <ref name="TextElement"/>
1280
1296
  </oneOrMore>
@@ -2493,6 +2509,16 @@
2493
2509
  <text/>
2494
2510
  </element>
2495
2511
  </optional>
2512
+ <optional>
2513
+ <element name="amendment">
2514
+ <text/>
2515
+ </element>
2516
+ </optional>
2517
+ <optional>
2518
+ <element name="corrigendum">
2519
+ <text/>
2520
+ </element>
2521
+ </optional>
2496
2522
  <optional>
2497
2523
  <element name="language">
2498
2524
  <text/>
@@ -57,7 +57,13 @@ module RelatonBipm
57
57
  # Parse SI brochure and write them to YAML files
58
58
  #
59
59
  def parse_si_brochure # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
60
+ # puts "Parsing SI brochure..."
61
+ # puts "Ls #{Dir['*']}"
62
+ # puts "Ls #{Dir['bipm-si-brochure/*']}"
63
+ # puts "Ls #{Dir['bipm-si-brochure/site/*']}"
64
+ # puts "Ls #{Dir['bipm-si-brochure/site/documents/*']}"
60
65
  Dir["bipm-si-brochure/site/documents/*.rxl"].each do |f|
66
+ puts "Parsing #{f}"
61
67
  docstd = Nokogiri::XML File.read f
62
68
  doc = docstd.at "/bibdata"
63
69
  hash1 = RelatonBipm::XMLParser.from_xml(doc.to_xml).to_hash
@@ -75,6 +81,7 @@ module RelatonBipm
75
81
  end
76
82
  item = RelatonBipm::BipmBibliographicItem.from_hash(**hash)
77
83
  write_file outfile, item, warn_duplicate: warn_duplicate
84
+ puts "Saved to #{outfile}"
78
85
  end
79
86
  end
80
87
 
@@ -117,9 +124,9 @@ module RelatonBipm
117
124
  def fetch_type(dir, body) # rubocop:disable Metrics/AbcSize
118
125
  type = dir.split("/").last.split("-").first.sub(/s$/, "")
119
126
  body_dir = File.join @output, body.downcase
120
- Dir.mkdir body_dir unless Dir.exist? body_dir
127
+ FileUtils.mkdir_p body_dir
121
128
  outdir = File.join body_dir, type.downcase
122
- Dir.mkdir outdir unless Dir.exist? outdir
129
+ FileUtils.mkdir_p outdir
123
130
  Dir[File.join(dir, "*.{yml,yaml}")].each { |en_file| fetch_meeting en_file, body, type, outdir }
124
131
  end
125
132
 
@@ -228,7 +235,7 @@ module RelatonBipm
228
235
  file += "-#{num_justed}" if num.size < 4
229
236
  file += ".yaml"
230
237
  out_dir = File.join args[:dir], r["type"].downcase
231
- Dir.mkdir out_dir unless Dir.exist? out_dir
238
+ FileUtils.mkdir_p out_dir
232
239
  path = File.join out_dir, file
233
240
  write_file path, item
234
241
  @index[["#{args[:body]} #{type} #{year}-#{num_justed}", "#{args[:body]} #{type} #{args[:num]}-#{num_justed}"]] = path
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.12.3".freeze
2
+ VERSION = "1.13.0".freeze
3
3
  end
data/relaton_bipm.gemspec CHANGED
@@ -42,7 +42,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
42
42
 
43
43
  spec.add_dependency "faraday", "~> 1.0"
44
44
  spec.add_dependency "mechanize", "~> 2.8.0"
45
- spec.add_dependency "relaton-bib", "~> 1.12.0"
45
+ spec.add_dependency "relaton-bib", "~> 1.13.0"
46
46
  spec.add_dependency "rubyzip", "~> 2.3.0"
47
47
  spec.add_dependency "serrano", "~> 1.0"
48
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.3
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-08-02 00:00:00.000000000 Z
11
+ date: 2022-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.12.0
145
+ version: 1.13.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.12.0
152
+ version: 1.13.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rubyzip
155
155
  requirement: !ruby/object:Gem::Requirement