relaton-nist 1.11.2 → 1.11.3
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/lib/relaton_nist/data_fetcher.rb +41 -13
- data/lib/relaton_nist/series.yaml +49 -0
- data/lib/relaton_nist/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b6b0ce8787fdc41eb5b334df6e1d8f65c2bbfe6437ab8b36124d917c7549a869
|
|
4
|
+
data.tar.gz: d9b3bd1f467450a874ba8f9bc8d98c669a3296a0014c6083b248522bb4f6cd2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: beb5e04d0d431263d209e5172a419b940afe614888fd7a9158c360b7277d61312edf8824fef3989608a543c3bb36bd8612d1e737a07e7349d027aa9578d6c829
|
|
7
|
+
data.tar.gz: f46f37e146aedc51b9d91896ba38604af5bb95cc93e2d19c17e4f3894cffe5adac98fd05b176aa6830bed802b30e8163371d38caa25021742dc91fc8b0d11a10
|
|
@@ -158,20 +158,37 @@ module RelatonNist
|
|
|
158
158
|
{ entity: person, role: [{ type: p["contributor_role"] }] }
|
|
159
159
|
end
|
|
160
160
|
contribs + doc.xpath("publisher").map do |p|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
161
|
+
{ entity: create_org(p), role: [{ type: "publisher" }] }
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
#
|
|
166
|
+
# Create publisher organization
|
|
167
|
+
#
|
|
168
|
+
# @param [Nokogiri::XML::Element] pub publisher element
|
|
169
|
+
#
|
|
170
|
+
# @return [RelatonBib::Organization] publisher organization
|
|
171
|
+
#
|
|
172
|
+
def create_org(pub)
|
|
173
|
+
name = pub.at("publisher_name").text
|
|
174
|
+
abbr = pub.at("../institution[institution_name[.='#{name}']]/institution_acronym")&.text
|
|
175
|
+
place = pub.at("./publisher_place") ||
|
|
176
|
+
pub.at("../institution[institution_name[.='#{name}']]/institution_place")
|
|
177
|
+
cont = []
|
|
178
|
+
if place
|
|
179
|
+
city, state = place.text.split(", ")
|
|
180
|
+
cont << RelatonBib::Address.new(street: [], city: city, state: state, country: "US")
|
|
172
181
|
end
|
|
182
|
+
RelatonBib::Organization.new name: name, abbreviation: abbr, contact: cont
|
|
173
183
|
end
|
|
174
184
|
|
|
185
|
+
#
|
|
186
|
+
# Create affiliation organization
|
|
187
|
+
#
|
|
188
|
+
# @param [Nokogiri::XML::Element] doc affiliation element
|
|
189
|
+
#
|
|
190
|
+
# @return [Array<RelatonBib::Affiliation>] affiliation
|
|
191
|
+
#
|
|
175
192
|
def affiliation(doc)
|
|
176
193
|
doc.xpath("./institution/institution_department").map do |id|
|
|
177
194
|
org = RelatonBib::Organization.new name: id.text
|
|
@@ -185,9 +202,20 @@ module RelatonNist
|
|
|
185
202
|
doc.xpath("institution/institution_place").map(&:text)
|
|
186
203
|
end
|
|
187
204
|
|
|
205
|
+
#
|
|
206
|
+
# Fetches series
|
|
207
|
+
#
|
|
208
|
+
# @param [Nokogiri::XML::Element] doc document element
|
|
209
|
+
#
|
|
210
|
+
# @return [Array<RelatonBib::Series>] series
|
|
211
|
+
#
|
|
188
212
|
def fetch_series(doc)
|
|
189
|
-
|
|
190
|
-
|
|
213
|
+
series_path = File.expand_path("series.yaml", __dir__)
|
|
214
|
+
series = YAML.load_file series_path
|
|
215
|
+
prf, srs, = pub_id(doc).split
|
|
216
|
+
sname = series[srs] || srs
|
|
217
|
+
title = RelatonBib::TypedTitleString.new(content: "#{prf} #{sname}")
|
|
218
|
+
[RelatonBib::Series.new(title: title, number: "#{prf} #{srs}")]
|
|
191
219
|
end
|
|
192
220
|
|
|
193
221
|
#
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
AMS: Advanced Manufacturing Series
|
|
3
|
+
BRPD: Basic Radio Propagation Predictions Series
|
|
4
|
+
BH: Building and Housing Reports
|
|
5
|
+
BMS: Building Materials and Structures Reports
|
|
6
|
+
BSS: Building Science Series
|
|
7
|
+
CRPL: CRPL Solar-Geophysical Data
|
|
8
|
+
IP: CRPL Ionospheric Predictions
|
|
9
|
+
CIRC: Circulars
|
|
10
|
+
CIS: Consumer Information Series
|
|
11
|
+
CS: Commercial Standards
|
|
12
|
+
CSM: Commercial Standards Monthly
|
|
13
|
+
CSWP: Cybersecurity White Papers
|
|
14
|
+
EAB: Economic Analysis Briefs
|
|
15
|
+
FIPS: Federal Information Processing Standards Publications
|
|
16
|
+
GCR: Grant/Contractor Reports
|
|
17
|
+
HB: Handbooks
|
|
18
|
+
HR: Hydraulic Research in the United States
|
|
19
|
+
IRPL: Interservice Radio Propagation Laboratory
|
|
20
|
+
LCIRC: Letter Circular
|
|
21
|
+
MONO: Monographs
|
|
22
|
+
MP: Miscellaneous Publications
|
|
23
|
+
NCSTAR: National Construction Safety Team Act Reports
|
|
24
|
+
NSRDS: National Standard Reference Data Series
|
|
25
|
+
IR: NISTIRs (Interagency/Internal Reports)
|
|
26
|
+
OWMWP: Office of Weights and Measures White Papers
|
|
27
|
+
PC: Photographic Circulars
|
|
28
|
+
RPT: NBS Reports
|
|
29
|
+
SIBS: Special Interior Ballistics Studies
|
|
30
|
+
SP: Special Publications (General)
|
|
31
|
+
SP250: 'SP 250: Calibration Services'
|
|
32
|
+
SP260: 'SP 260: Standard Reference Materials'
|
|
33
|
+
SP300: 'SP 300: Precision Measurement and Calibration'
|
|
34
|
+
SP400: 'SP 400: Semiconductor Measurement Technology'
|
|
35
|
+
SP480: 'SP 480: Law Enforcement Technology'
|
|
36
|
+
SP500: 'SP 500: Computer Systems Technology'
|
|
37
|
+
SP700: 'SP 700: Industrial Measurement Series'
|
|
38
|
+
SP800: 'SP 800: Computer Security Series'
|
|
39
|
+
SP823: 'SP 823: Integrated Services Digital Network Series'
|
|
40
|
+
SP960: 'SP 960: NIST Recommended Practice Guides'
|
|
41
|
+
SP1200: 'SP 1200: Protocols'
|
|
42
|
+
SP1500: 'SP 1500: Working Group Papers'
|
|
43
|
+
SP1800: 'SP 1800: NIST Cybersecurity Practice Guides'
|
|
44
|
+
SP1900: 'SP 1900: Cyber-Physical Systems'
|
|
45
|
+
SP2000: 'SP 2000: Standards Coordination'
|
|
46
|
+
SP2100: 'SP 2100: Conference Proceedings'
|
|
47
|
+
TIBM: Technical Information on Building Materials
|
|
48
|
+
TN: Technical Notes
|
|
49
|
+
TTB: Technology Transfer Brief
|
data/lib/relaton_nist/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-nist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.11.
|
|
4
|
+
version: 1.11.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -185,6 +185,7 @@ files:
|
|
|
185
185
|
- lib/relaton_nist/nist_bibliography.rb
|
|
186
186
|
- lib/relaton_nist/processor.rb
|
|
187
187
|
- lib/relaton_nist/scrapper.rb
|
|
188
|
+
- lib/relaton_nist/series.yaml
|
|
188
189
|
- lib/relaton_nist/version.rb
|
|
189
190
|
- lib/relaton_nist/xml_parser.rb
|
|
190
191
|
- relaton_nist.gemspec
|