relaton-nist 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_nist/nist_bibliography.rb +7 -6
- data/lib/relaton_nist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b76a47785318a2497fae5a3fdab022b16d6117ad91470a23c46e73773e1e59ea
|
4
|
+
data.tar.gz: b33350d778c2c378f208443e5d9a7b636d2f22ee1908a953b6200abed97a7fb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ae73a5ae455ca08d1cefaf446a419c07fd1984f7f2e6105666aa87ed2dc01206c8c832d2b0a01cd273cbd5b6248b93b971ab8e68bfb36b2fe8a46a1e95bd09a
|
7
|
+
data.tar.gz: 20c7e25ea1fdaa2af341213dfe85ad81357bd40abd035a18468c0f168c5b149eb3e8e5a35d724bbc8838e184233774e6a66fdaaef6a5b1aaf8dc4c12dee63502
|
@@ -111,21 +111,22 @@ module RelatonNist
|
|
111
111
|
{ years: missed_years }
|
112
112
|
end
|
113
113
|
|
114
|
-
def fetch_pages(
|
115
|
-
workers = RelatonBib::WorkersPool.new
|
114
|
+
def fetch_pages(hits, threads)
|
115
|
+
workers = RelatonBib::WorkersPool.new threads
|
116
116
|
workers.worker { |w| { i: w[:i], hit: w[:hit].fetch } }
|
117
|
-
|
117
|
+
hits.each_with_index { |hit, i| workers << { i: i, hit: hit } }
|
118
118
|
workers.end
|
119
|
-
workers.result.
|
119
|
+
workers.result.sort_by { |a| a[:i] }.map { |x| x[:hit] }
|
120
120
|
end
|
121
121
|
|
122
122
|
def nistbib_search_filter(code, year, opts)
|
123
|
-
|
123
|
+
idregex = %r{[0-9-]{3,}}
|
124
|
+
docid = code.match(idregex).to_s
|
124
125
|
serie = code.match(%r{(FISP|SP|NISTIR)(?=\s)})
|
125
126
|
warn "[relaton-nist] (\"#{code}\") fetching..."
|
126
127
|
result = search(code, year, opts)
|
127
128
|
result.select do |i|
|
128
|
-
i.hit[:code]&.
|
129
|
+
i.hit[:code]&.match(idregex).to_s == docid && (!serie || i.hit[:serie] == serie.to_s)
|
129
130
|
end
|
130
131
|
end
|
131
132
|
|
data/lib/relaton_nist/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|