relaton-3gpp 1.18.0 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +6 -13
- data/grammars/basicdoc.rng +3 -0
- data/lib/relaton_3gpp/bibliographic_item.rb +5 -5
- data/lib/relaton_3gpp/bibliography.rb +3 -3
- data/lib/relaton_3gpp/data_fetcher.rb +23 -34
- data/lib/relaton_3gpp/document_type.rb +2 -2
- data/lib/relaton_3gpp/parser.rb +96 -100
- data/lib/relaton_3gpp/util.rb +1 -4
- data/lib/relaton_3gpp/version.rb +1 -1
- data/lib/relaton_3gpp/xml_parser.rb +4 -0
- data/lib/relaton_3gpp.rb +0 -1
- data/relaton_3gpp.gemspec +2 -4
- metadata +5 -34
- data/lib/relaton_3gpp/config.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ff1174543dfbd48b4d626209d606068d47ae500cd7b9bbf5cd76fa349286d04
|
4
|
+
data.tar.gz: df03d0d8c121fdf64838e5d4d4c5ee763d7e44296a25d028203284dbd5fccd87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c829da8ad2a8c9cadba2293d87e0f8cf90db08ce35f91b411d00f3c261d990c6b3d2a105ac81bc9112e726acf913e471b364c8bc5c44af762e36c1b89cf5ea
|
7
|
+
data.tar.gz: 1e6d5b9679d1ea1c59aee4a43c807772bfadb0a28943d56930f0295cd75aa1bddfbfdc958406616b3622d54afa8d427a26b08d476d505130dd5585ede977cef4
|
data/README.adoc
CHANGED
@@ -23,24 +23,13 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
== Usage
|
25
25
|
|
26
|
-
===
|
27
|
-
|
28
|
-
Configuration is optional. The available option is `logger` which is a `Logger` instance. By default, the logger is `Logger.new($stderr)` with `Logger::WARN` level. To change the logger level, use `Relaton3gpp.configure` block.
|
26
|
+
=== Search for a standard using keywords
|
29
27
|
|
30
28
|
[source,ruby]
|
31
29
|
----
|
32
|
-
require
|
30
|
+
require "relaton_3gpp"
|
33
31
|
=> true
|
34
32
|
|
35
|
-
Relaton3gpp.configure do |config|
|
36
|
-
config.logger.level = Logger::DEBUG
|
37
|
-
end
|
38
|
-
----
|
39
|
-
|
40
|
-
=== Search for a standard using keywords
|
41
|
-
|
42
|
-
[source,ruby]
|
43
|
-
----
|
44
33
|
item = Relaton3gpp::Bibliography.get "3GPP TR 00.01U:UMTS/3.0.0"
|
45
34
|
[relaton-3gpp] (3GPP TR 00.01U:UMTS/3.0.0) Fetching repository ...
|
46
35
|
[relaton-3gpp] (3GPP TR 00.01U:UMTS/3.0.0) Found: `3GPP TR 00.01U:UMTS/3.0.0`
|
@@ -156,6 +145,10 @@ Done in: 557 sec.
|
|
156
145
|
=> nil
|
157
146
|
----
|
158
147
|
|
148
|
+
=== Logging
|
149
|
+
|
150
|
+
Relaton3gpp uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the https://github.com/relaton/relaton-logger#usage[relaton-logger] documentation.
|
151
|
+
|
159
152
|
== Development
|
160
153
|
|
161
154
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/grammars/basicdoc.rng
CHANGED
@@ -11,17 +11,17 @@ module Relaton3gpp
|
|
11
11
|
# @param [Relaton3gpp::Release] release
|
12
12
|
#
|
13
13
|
def initialize(**args) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
14
|
-
Util.warn "
|
14
|
+
Util.warn "Doctype is missing" if args[:type].nil?
|
15
15
|
@radiotechnology = args.delete(:radiotechnology)
|
16
16
|
if @radiotechnology && !RADIOTECHNOLOGIES.include?(@radiotechnology)
|
17
|
-
Util.warn "
|
18
|
-
Util.warn "
|
17
|
+
Util.warn "Unknown radiotechnology type: `#{@radiotechnology}`"
|
18
|
+
Util.warn "Possible radiotechnology types: `#{RADIOTECHNOLOGIES.join '`, `'}`"
|
19
19
|
end
|
20
20
|
@common_ims_spec = args.delete(:common_ims_spec)
|
21
21
|
@release = args.delete(:release)
|
22
22
|
if args[:docsubtype] && !DOCSUBTYPES.include?(args[:docsubtype])
|
23
|
-
Util.warn "
|
24
|
-
Util.warn "
|
23
|
+
Util.warn "Unknown docsubtype: `#{args[:docsubtype]}`"
|
24
|
+
Util.warn "Possible docsubtypes: `#{DOCSUBTYPES.join '`, `'}`"
|
25
25
|
end
|
26
26
|
super(**args)
|
27
27
|
end
|
@@ -34,14 +34,14 @@ module Relaton3gpp
|
|
34
34
|
# @param opts [Hash] options
|
35
35
|
# @return [RelatonBib::BibliographicItem]
|
36
36
|
def get(ref, _year = nil, _opts = {})
|
37
|
-
Util.
|
37
|
+
Util.info "Fetching from Relaton repository ...", key: ref
|
38
38
|
result = search(ref)
|
39
39
|
unless result
|
40
|
-
Util.
|
40
|
+
Util.info "Not found.", key: ref
|
41
41
|
return
|
42
42
|
end
|
43
43
|
|
44
|
-
Util.
|
44
|
+
Util.info "Found: `#{result.docidentifier[0].id}`", key: ref
|
45
45
|
result
|
46
46
|
end
|
47
47
|
|
@@ -10,8 +10,7 @@ module Relaton3gpp
|
|
10
10
|
def initialize(output, format)
|
11
11
|
require "fileutils"
|
12
12
|
require "net/ftp"
|
13
|
-
require "
|
14
|
-
require "mdb"
|
13
|
+
require "csv"
|
15
14
|
|
16
15
|
@output = output
|
17
16
|
@format = format
|
@@ -47,25 +46,14 @@ module Relaton3gpp
|
|
47
46
|
#
|
48
47
|
def fetch(renewal) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
49
48
|
file = get_file renewal
|
50
|
-
return unless file
|
49
|
+
return unless file && File.exist?(file) && File.size(file) > 20_000_000
|
51
50
|
|
52
|
-
|
53
|
-
enntry = zip_file.glob("status_smg_3GPP.mdb").first
|
54
|
-
File.open("status_smg_3GPP.mdb", "wb") do |f|
|
55
|
-
f.write enntry.get_input_stream.read
|
56
|
-
end
|
57
|
-
end
|
58
|
-
dbs = Mdb.open "status_smg_3GPP.mdb"
|
59
|
-
specs = dbs["Specs_GSM+3G"]
|
60
|
-
specrels = dbs["Specs_GSM+3G_release-info"]
|
61
|
-
releases = dbs["Releases"]
|
62
|
-
tstatus = dbs["temp-status"]
|
63
|
-
if renewal && dbs["2001-04-25_schedule"].any?
|
51
|
+
if renewal
|
64
52
|
FileUtils.rm_f File.join(@output, "/*") # if renewal && dbs["2001-04-25_schedule"].any?
|
65
53
|
index.remove_all # if renewal
|
66
54
|
end
|
67
|
-
|
68
|
-
|
55
|
+
CSV.open(file, "r:bom|utf-8", headers: true, col_sep: ";").each do |row|
|
56
|
+
save_doc Parser.parse(row)
|
69
57
|
end
|
70
58
|
File.write CURRENT, @current.to_yaml, encoding: "UTF-8"
|
71
59
|
index.save
|
@@ -86,17 +74,18 @@ module Relaton3gpp
|
|
86
74
|
ftp = Net::FTP.new("www.3gpp.org")
|
87
75
|
ftp.resume = true
|
88
76
|
ftp.login
|
89
|
-
ftp.chdir "/Information/Databases/
|
90
|
-
file_path = ftp.list("*.
|
77
|
+
ftp.chdir "/Information/Databases/"
|
78
|
+
file_path = ftp.list("*.csv").first
|
91
79
|
return unless file_path
|
92
80
|
|
93
81
|
d, t, _, file = file_path.split
|
94
|
-
|
95
|
-
|
96
|
-
return
|
82
|
+
dt = DateTime.strptime("#{d} #{t}", "%m-%d-%y %I:%M%p")
|
83
|
+
if !renewal && file == @current["file"] && !@current["date"].empty? && dt == DateTime.parse(@current["date"])
|
84
|
+
return
|
97
85
|
end
|
98
86
|
|
99
|
-
|
87
|
+
tmp_file = File.join Dir.tmpdir, "3gpp.csv"
|
88
|
+
ftp.get(file, tmp_file)
|
100
89
|
rescue Net::ReadTimeout => e
|
101
90
|
n += 1
|
102
91
|
retry if n < 5
|
@@ -104,7 +93,7 @@ module Relaton3gpp
|
|
104
93
|
end
|
105
94
|
@current["file"] = file
|
106
95
|
@current["date"] = dt.to_s
|
107
|
-
|
96
|
+
tmp_file
|
108
97
|
end
|
109
98
|
|
110
99
|
#
|
@@ -118,15 +107,15 @@ module Relaton3gpp
|
|
118
107
|
#
|
119
108
|
# @return [Relaton3gpp::BibliographicItem, nil] bibliographic item
|
120
109
|
#
|
121
|
-
def fetch_doc(row, specs, specrels, releases, tstatus)
|
122
|
-
|
123
|
-
|
124
|
-
rescue StandardError => e
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
end
|
110
|
+
# def fetch_doc(row, specs, specrels, releases, tstatus)
|
111
|
+
# doc = Parser.parse row, specs, specrels, releases, tstatus
|
112
|
+
# save_doc doc
|
113
|
+
# rescue StandardError => e
|
114
|
+
# warn "Error: #{e.message}"
|
115
|
+
# warn "PubID: #{row[:spec]}:#{row[:release]}/#{row[:MAJOR_VERSION_NB]}."\
|
116
|
+
# "#{row[:TECHNICAL_VERSION_NB]}.#{row[:EDITORIAL_VERSION_NB]}"
|
117
|
+
# warn e.backtrace[0..5].join("\n")
|
118
|
+
# end
|
130
119
|
|
131
120
|
#
|
132
121
|
# Save document to file
|
@@ -143,7 +132,7 @@ module Relaton3gpp
|
|
143
132
|
end
|
144
133
|
file = file_name(bib)
|
145
134
|
if @files.include? file
|
146
|
-
warn "File #{file} already exists. Document: #{bib.docnumber}"
|
135
|
+
Util.warn "File #{file} already exists. Document: #{bib.docnumber}"
|
147
136
|
else
|
148
137
|
@files << file
|
149
138
|
end
|
@@ -10,8 +10,8 @@ module Relaton3gpp
|
|
10
10
|
# @param type [String]
|
11
11
|
def check(type)
|
12
12
|
unless DOCTYPES.include? type
|
13
|
-
Util.warn "
|
14
|
-
Util.warn "
|
13
|
+
Util.warn "Unknown doctype: `#{type}`"
|
14
|
+
Util.warn "Possible doctypes: `#{DOCTYPES.join '`, `'}`"
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/relaton_3gpp/parser.rb
CHANGED
@@ -1,39 +1,25 @@
|
|
1
1
|
module Relaton3gpp
|
2
2
|
class Parser
|
3
|
+
DOCTYPES = { "TS" => "Technical Specification", "TR" => "Technical Report"}.freeze
|
4
|
+
|
3
5
|
#
|
4
6
|
# Document parser initalization
|
5
7
|
#
|
6
|
-
# @param [
|
7
|
-
# @param [Array<Hash>] specrels Spec + Release table
|
8
|
-
# @param [Array<Hash>] relaeases Releases table
|
9
|
-
# @param [Array<Hash>] specs Specs table
|
10
|
-
# @param [Array<Hash>] tstatus temp status-table
|
8
|
+
# @param [CSV::Row] row CSV row
|
11
9
|
#
|
12
|
-
def initialize(row
|
10
|
+
def initialize(row)
|
13
11
|
@row = row
|
14
|
-
@spec = specs.detect { |s| s[:Number] == row[:spec] }
|
15
|
-
if @spec
|
16
|
-
@specrel = specrels.detect do |sr|
|
17
|
-
sr[:Spec] == row[:spec] && sr[:Release] == row[:release]
|
18
|
-
end
|
19
|
-
@rel = releases.detect { |r| r[:Release_code] == row[:release] }
|
20
|
-
end
|
21
|
-
@tstatus = tstatus.detect { |t| t[:Number] == row[:spec] }
|
22
12
|
end
|
23
13
|
|
24
14
|
#
|
25
15
|
# Initialize document parser and run it
|
26
16
|
#
|
27
|
-
# @param [
|
28
|
-
# @param [Array<Hash>] specrels Spec + Release table
|
29
|
-
# @param [Array<Hash>] relaeases Releases table
|
30
|
-
# @param [Array<Hash>] specs Specs table
|
31
|
-
# @param [Array<Hash>] tstatus temp status-table
|
17
|
+
# @param [CSV:Row] row CSV row
|
32
18
|
#
|
33
19
|
# @return [RelatonBib:BibliographicItem, nil] bibliographic item
|
34
20
|
#
|
35
|
-
def self.parse(row
|
36
|
-
new(row
|
21
|
+
def self.parse(row)
|
22
|
+
new(row).parse
|
37
23
|
end
|
38
24
|
|
39
25
|
#
|
@@ -42,24 +28,22 @@ module Relaton3gpp
|
|
42
28
|
# @return [Relaton3gpp:BibliographicItem, nil] bibliographic item
|
43
29
|
#
|
44
30
|
def parse # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
45
|
-
return unless @spec && @row[:"3guId"]
|
46
|
-
|
47
31
|
Relaton3gpp::BibliographicItem.new(
|
48
32
|
type: "standard",
|
49
33
|
language: ["en"],
|
50
34
|
script: ["Latn"],
|
51
35
|
title: parse_title,
|
52
36
|
link: parse_link,
|
53
|
-
abstract: parse_abstract,
|
37
|
+
# abstract: parse_abstract,
|
54
38
|
docid: parse_docid,
|
55
39
|
docnumber: number,
|
56
40
|
date: parse_date,
|
57
|
-
doctype:
|
41
|
+
doctype: parse_doctype,
|
58
42
|
editorialgroup: parse_editorialgroup,
|
59
|
-
biblionote: parse_note,
|
60
|
-
docstatus: parse_status,
|
43
|
+
# biblionote: parse_note,
|
44
|
+
# docstatus: parse_status,
|
61
45
|
radiotechnology: parse_radiotechnology,
|
62
|
-
common_ims_spec: @spec[:ComIMS] == "1",
|
46
|
+
# common_ims_spec: @spec[:ComIMS] == "1",
|
63
47
|
# internal: @spec[:"For publication"] == "0",
|
64
48
|
release: parse_release,
|
65
49
|
contributor: parse_contributor,
|
@@ -73,7 +57,7 @@ module Relaton3gpp
|
|
73
57
|
# @return [RelatonBib::TypedTitleStringCollection] title
|
74
58
|
#
|
75
59
|
def parse_title
|
76
|
-
t = RelatonBib::TypedTitleString.new content: @
|
60
|
+
t = RelatonBib::TypedTitleString.new content: @row["Title"], type: "main"
|
77
61
|
RelatonBib::TypedTitleStringCollection.new [t]
|
78
62
|
end
|
79
63
|
|
@@ -83,10 +67,9 @@ module Relaton3gpp
|
|
83
67
|
# @return [Array<RelatonBib::TypedUri>] link
|
84
68
|
#
|
85
69
|
def parse_link
|
86
|
-
return [] unless @row[
|
70
|
+
return [] unless @row["Link"]
|
87
71
|
|
88
|
-
content
|
89
|
-
[RelatonBib::TypedUri.new(type: "src", content: content)]
|
72
|
+
[RelatonBib::TypedUri.new(type: "src", content: @row["Link"])]
|
90
73
|
end
|
91
74
|
|
92
75
|
#
|
@@ -94,11 +77,11 @@ module Relaton3gpp
|
|
94
77
|
#
|
95
78
|
# @return [Array<RelatonBib::FormattedString>]
|
96
79
|
#
|
97
|
-
def parse_abstract
|
98
|
-
|
80
|
+
# def parse_abstract
|
81
|
+
# return [] unless @spec[:description]
|
99
82
|
|
100
|
-
|
101
|
-
end
|
83
|
+
# [RelatonBib::FormattedString.new(content: @spec[:description])]
|
84
|
+
# end
|
102
85
|
|
103
86
|
#
|
104
87
|
# Parse docidentifier
|
@@ -115,7 +98,21 @@ module Relaton3gpp
|
|
115
98
|
# @return [String] number
|
116
99
|
#
|
117
100
|
def number
|
118
|
-
"#{
|
101
|
+
num = "#{doctype_abbr} #{@row[0]}"
|
102
|
+
num += ":#{release}" if release
|
103
|
+
"#{num}/#{@row['Version']}"
|
104
|
+
end
|
105
|
+
|
106
|
+
def doctype_abbr
|
107
|
+
@row["Is TS"] == "1" ? "TS" : "TR"
|
108
|
+
end
|
109
|
+
|
110
|
+
def release
|
111
|
+
@release ||= case @row["WPM Code 2G"]
|
112
|
+
when /Release_(\d+)/ then "R#{$1}"
|
113
|
+
when /PH(\d+)/ then "Ph#{$1}"
|
114
|
+
else @row["Release"]
|
115
|
+
end
|
119
116
|
end
|
120
117
|
|
121
118
|
#
|
@@ -123,9 +120,9 @@ module Relaton3gpp
|
|
123
120
|
#
|
124
121
|
# @return [String] version
|
125
122
|
#
|
126
|
-
def version
|
127
|
-
|
128
|
-
end
|
123
|
+
# def version
|
124
|
+
# "#{@row[:MAJOR_VERSION_NB]}.#{@row[:TECHNICAL_VERSION_NB]}.#{@row[:EDITORIAL_VERSION_NB]}"
|
125
|
+
# end
|
129
126
|
|
130
127
|
#
|
131
128
|
# Parse date
|
@@ -133,32 +130,31 @@ module Relaton3gpp
|
|
133
130
|
# @return [Array<RelatonBib::BibliographicDate>] date
|
134
131
|
#
|
135
132
|
def parse_date
|
136
|
-
dates =
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
cd = Date.parse(@row[k]).to_s
|
141
|
-
d << RelatonBib::BibliographicDate.new(type: t, on: cd)
|
142
|
-
end
|
143
|
-
if @spec[:"title verified"]
|
144
|
-
td = Date.parse(@spec[:"title verified"]).to_s
|
145
|
-
dates << RelatonBib::BibliographicDate.new(type: "confirmed", on: td)
|
133
|
+
dates = []
|
134
|
+
if @row["Date"]
|
135
|
+
on = Date.parse(@row["Date"]).to_s
|
136
|
+
dates << RelatonBib::BibliographicDate.new(type: "published", on: on)
|
146
137
|
end
|
147
138
|
dates
|
148
139
|
end
|
149
140
|
|
141
|
+
def parse_doctype
|
142
|
+
# type = DOCTYPES[doctype_abbr]
|
143
|
+
DocumentType.new(type: doctype_abbr)
|
144
|
+
end
|
145
|
+
|
150
146
|
#
|
151
147
|
# Parse editorialgroup
|
152
148
|
#
|
153
149
|
# @return [RelatonBib::EditorialGroup] editorialgroups
|
154
150
|
#
|
155
151
|
def parse_editorialgroup # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
156
|
-
eg = [
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
eg << create_workgroup(
|
152
|
+
eg = []
|
153
|
+
prime = @row["Responsible Primary"]
|
154
|
+
eg << create_workgroup(prime, "prime") if prime
|
155
|
+
|
156
|
+
@row["Responsible Secondary"].strip.split(", ").each do |wg|
|
157
|
+
eg << create_workgroup(wg, "other")
|
162
158
|
end
|
163
159
|
RelatonBib::EditorialGroup.new eg
|
164
160
|
end
|
@@ -173,29 +169,29 @@ module Relaton3gpp
|
|
173
169
|
#
|
174
170
|
# @return [RelatonBib::BiblioNoteCollection] notes
|
175
171
|
#
|
176
|
-
def parse_note
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
end
|
172
|
+
# def parse_note
|
173
|
+
# n = []
|
174
|
+
# if @specrel && @specrel[:remarks] && @specrel[:remarks] != "."
|
175
|
+
# n << RelatonBib::BiblioNote.new(type: "remark", content: @specrel[:remarks])
|
176
|
+
# end
|
177
|
+
# if @row[:comment] && @row[:comment] != "."
|
178
|
+
# n << RelatonBib::BiblioNote.new(type: "comment", content: @row[:comment])
|
179
|
+
# end
|
180
|
+
# RelatonBib::BiblioNoteCollection.new n
|
181
|
+
# end
|
186
182
|
|
187
183
|
#
|
188
184
|
# Prase status
|
189
185
|
#
|
190
186
|
# @return [RelatnoBib::DocumentStatus, nil] status
|
191
187
|
#
|
192
|
-
def parse_status
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
end
|
188
|
+
# def parse_status
|
189
|
+
# if @specrel && @specrel[:withdrawn] == "1"
|
190
|
+
# RelatonBib::DocumentStatus.new stage: "withdrawn"
|
191
|
+
# elsif @spec[:"For publication"] == "1"
|
192
|
+
# RelatonBib::DocumentStatus.new stage: "published"
|
193
|
+
# end
|
194
|
+
# end
|
199
195
|
|
200
196
|
#
|
201
197
|
# Parse radio technology
|
@@ -203,10 +199,11 @@ module Relaton3gpp
|
|
203
199
|
# @return [String] radio technology
|
204
200
|
#
|
205
201
|
def parse_radiotechnology
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
202
|
+
case @row[:"WPM Code 3G"]
|
203
|
+
when /5G/ then "5G"
|
204
|
+
when /4G/ then "LTE"
|
205
|
+
when /3G/ then "3G"
|
206
|
+
else @row[:"WPM Code 2G"] && "2G"
|
210
207
|
end
|
211
208
|
end
|
212
209
|
|
@@ -216,24 +213,22 @@ module Relaton3gpp
|
|
216
213
|
# @return [Relaton3gpp::Release, nil] release
|
217
214
|
#
|
218
215
|
def parse_release # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
219
|
-
if @
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
)
|
236
|
-
end
|
216
|
+
project_start = Date.parse(@row["Project Start"]).to_s if @row["Project Start"]
|
217
|
+
project_end = Date.parse(@row["Project End"]).to_s if @row["Project End"]
|
218
|
+
Release.new(
|
219
|
+
# version2g: @rel[:version_2g],
|
220
|
+
# version3g: @rel[:version_3g],
|
221
|
+
# defunct: @rel[:defunct] == "1",
|
222
|
+
wpm_code_2g: @row["WPM Code 2G"],
|
223
|
+
wpm_code_3g: @row["WPM Code 3G"],
|
224
|
+
# freeze_meeting: @rel[:"freeze meeting"],
|
225
|
+
freeze_stage1_meeting: @row["Stage 1 Freeze"],
|
226
|
+
freeze_stage2_meeting: @row["Stage 2 Freeze"],
|
227
|
+
freeze_stage3_meeting: @row["Stage 3 Freeze"],
|
228
|
+
close_meeting: @row["Close Meeting"],
|
229
|
+
project_start: project_start,
|
230
|
+
project_end: project_end,
|
231
|
+
)
|
237
232
|
end
|
238
233
|
|
239
234
|
#
|
@@ -251,15 +246,16 @@ module Relaton3gpp
|
|
251
246
|
)
|
252
247
|
roles = [{ type: "author" }, { type: "publisher" }]
|
253
248
|
contribs = [RelatonBib::ContributionInfo.new(entity: org, role: roles)]
|
254
|
-
return contribs unless @
|
249
|
+
return contribs unless @row["Last Name"] && @row["Last Name"] != "Vacant"
|
255
250
|
|
256
251
|
aff = []
|
257
|
-
if @
|
258
|
-
org = RelatonBib::Organization.new(name: @
|
259
|
-
cn = RelatonBib::LocalizedString.new @tstatus[:rapporteur], "en", "Latn"
|
260
|
-
name = RelatonBib::FullName.new(completename: cn)
|
252
|
+
if @row["Organisation"]
|
253
|
+
org = RelatonBib::Organization.new(name: @row["Organisation"])
|
261
254
|
aff << RelatonBib::Affiliation.new(organization: org)
|
262
255
|
end
|
256
|
+
surname = RelatonBib::LocalizedString.new @row["Last Name"], "en", "Latn"
|
257
|
+
forename = RelatonBib::LocalizedString.new @row["First Name"], "en", "Latn"
|
258
|
+
name = RelatonBib::FullName.new(surname: surname, forename: [forename])
|
263
259
|
person = RelatonBib::Person.new(name: name, affiliation: aff)
|
264
260
|
role = { type: "author" }
|
265
261
|
contribs << RelatonBib::ContributionInfo.new(entity: person, role: [role])
|
data/lib/relaton_3gpp/util.rb
CHANGED
data/lib/relaton_3gpp/version.rb
CHANGED
data/lib/relaton_3gpp.rb
CHANGED
@@ -4,7 +4,6 @@ require "net/http"
|
|
4
4
|
require "relaton/index"
|
5
5
|
require "relaton_bib"
|
6
6
|
require_relative "relaton_3gpp/version"
|
7
|
-
require_relative "relaton_3gpp/config"
|
8
7
|
require_relative "relaton_3gpp/util"
|
9
8
|
require_relative "relaton_3gpp/document_type"
|
10
9
|
require_relative "relaton_3gpp/release"
|
data/relaton_3gpp.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "lib/relaton_3gpp/version"
|
4
4
|
|
5
|
-
Gem::Specification.new do |spec|
|
5
|
+
Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
6
6
|
spec.name = "relaton-3gpp"
|
7
7
|
spec.version = Relaton3gpp::VERSION
|
8
8
|
spec.authors = ["Ribose Inc."]
|
@@ -36,9 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
# For more information and examples about making a new gem, checkout our
|
37
37
|
# guide at: https://bundler.io/guides/creating_gem.html
|
38
38
|
|
39
|
-
spec.add_dependency "mdb", "~> 0.5.0"
|
40
39
|
spec.add_dependency "net-ftp", "~> 0.1.0"
|
41
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
40
|
+
spec.add_dependency "relaton-bib", "~> 1.19.0"
|
42
41
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
43
|
-
spec.add_dependency "rubyzip", "~> 2.3.0"
|
44
42
|
end
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-3gpp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.19.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: 2024-
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: mdb
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.5.0
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 0.5.0
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: net-ftp
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +30,14 @@ dependencies:
|
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
33
|
+
version: 1.19.0
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
40
|
+
version: 1.19.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: relaton-index
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +52,6 @@ dependencies:
|
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: 0.2.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubyzip
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 2.3.0
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 2.3.0
|
83
55
|
description: 'Relaton3gpp: Ruby XMLDOC impementation.'
|
84
56
|
email:
|
85
57
|
- open.source@ribose.com
|
@@ -107,7 +79,6 @@ files:
|
|
107
79
|
- lib/relaton_3gpp.rb
|
108
80
|
- lib/relaton_3gpp/bibliographic_item.rb
|
109
81
|
- lib/relaton_3gpp/bibliography.rb
|
110
|
-
- lib/relaton_3gpp/config.rb
|
111
82
|
- lib/relaton_3gpp/data_fetcher.rb
|
112
83
|
- lib/relaton_3gpp/document_type.rb
|
113
84
|
- lib/relaton_3gpp/hash_converter.rb
|
@@ -138,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
109
|
- !ruby/object:Gem::Version
|
139
110
|
version: '0'
|
140
111
|
requirements: []
|
141
|
-
rubygems_version: 3.3.
|
112
|
+
rubygems_version: 3.3.27
|
142
113
|
signing_key:
|
143
114
|
specification_version: 4
|
144
115
|
summary: 'Relaton3gpp: Ruby XMLDOC impementation.'
|