pubid-nist 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pubid/nist/addendum.rb +21 -0
  3. data/lib/pubid/nist/edition.rb +26 -14
  4. data/lib/pubid/nist/identifier.rb +21 -18
  5. data/lib/pubid/nist/nist_tech_pubs.rb +7 -1
  6. data/lib/pubid/nist/parser.rb +21 -15
  7. data/lib/pubid/nist/parsers/{nbs_circ.rb → circ.rb} +2 -2
  8. data/lib/pubid/nist/parsers/{nbs_crpl.rb → crpl.rb} +3 -3
  9. data/lib/pubid/nist/parsers/{nbs_csm.rb → csm.rb} +2 -2
  10. data/lib/pubid/nist/parsers/default.rb +6 -5
  11. data/lib/pubid/nist/parsers/fips.rb +10 -3
  12. data/lib/pubid/nist/parsers/{nist_gcr.rb → gcr.rb} +1 -1
  13. data/lib/pubid/nist/parsers/{nbs_hb.rb → hb.rb} +2 -10
  14. data/lib/pubid/nist/parsers/{nbs_mp.rb → mp.rb} +1 -1
  15. data/lib/pubid/nist/parsers/{nist_ncstar.rb → ncstar.rb} +1 -1
  16. data/lib/pubid/nist/parsers/{nist_owmwp.rb → owmwp.rb} +1 -1
  17. data/lib/pubid/nist/parsers/{nbs_rpt.rb → rpt.rb} +1 -1
  18. data/lib/pubid/nist/parsers/{nist_sp.rb → sp.rb} +5 -3
  19. data/lib/pubid/nist/parsers/tn.rb +17 -0
  20. data/lib/pubid/nist/publisher.rb +1 -5
  21. data/lib/pubid/nist/renderer/addendum.rb +20 -0
  22. data/lib/pubid/nist/renderer/base.rb +202 -0
  23. data/lib/pubid/nist/series.rb +30 -0
  24. data/lib/pubid/nist/stage.rb +2 -2
  25. data/lib/pubid/nist/transformer.rb +10 -2
  26. data/lib/pubid/nist/update.rb +1 -1
  27. data/lib/pubid/nist/version.rb +1 -1
  28. data/lib/pubid/nist.rb +4 -2
  29. data/series.yaml +60 -82
  30. data/update_codes.yaml +4 -4
  31. metadata +19 -23
  32. data/lib/pubid/nist/parsers/nbs_bh.rb +0 -6
  33. data/lib/pubid/nist/parsers/nbs_fips.rb +0 -14
  34. data/lib/pubid/nist/parsers/nbs_mn.rb +0 -6
  35. data/lib/pubid/nist/parsers/nbs_sp.rb +0 -13
  36. data/lib/pubid/nist/parsers/nbs_tn.rb +0 -9
  37. data/lib/pubid/nist/parsers/nist_hb.rb +0 -9
  38. data/lib/pubid/nist/parsers/nist_tn.rb +0 -13
  39. data/lib/pubid/nist/renderer.rb +0 -213
  40. data/lib/pubid/nist/serie.rb +0 -29
@@ -0,0 +1,202 @@
1
+ module Pubid::Nist
2
+ module Renderer
3
+ class Base < Pubid::Core::Renderer::Base
4
+ def render_base_identifier(**opts)
5
+ prerender(**opts)
6
+
7
+ render_identifier(@prerendered_params, opts)
8
+ end
9
+
10
+ def render_identifier(params, opts)
11
+ case opts[:format]
12
+ when :short, :mr
13
+ "%{series}%{code}%{volume}%{part}%{edition}%{revision}%{version}"\
14
+ "%{supplement}%{section}%{appendix}%{errata}%{index}%{insert}%{update}"\
15
+ "%{stage}%{translation}" % params
16
+ else
17
+ "%{series}%{code}%{stage}%{volume}%{part}%{edition}%{revision}%{version}"\
18
+ "%{supplement}%{section}%{appendix}%{errata}%{index}%{insert}%{update}"\
19
+ "%{translation}" % params
20
+ end
21
+ end
22
+
23
+ def render_series(series, opts, params)
24
+ if series.to_s(opts[:format]).include?(params[:publisher].to_s(opts[:format]))
25
+ return series.to_s(opts[:format])
26
+ end
27
+
28
+ "#{params[:publisher].to_s(opts[:format])}" +
29
+ (opts[:format] == :mr ? "." : " ") +
30
+ "#{series.to_s(opts[:format])}"
31
+ end
32
+
33
+ def render_code(code, opts, _params)
34
+ (opts[:format] == :mr ? "." : " ") + code.to_s
35
+ end
36
+
37
+ def render_edition(edition, opts, _params)
38
+ return if opts[:without_edition]
39
+
40
+ case opts[:format]
41
+ when :long
42
+ " #{edition.to_s(format: :long)}"
43
+ when :abbrev
44
+ " Ed. " + edition.to_s
45
+ when :short, :mr
46
+ "e" + edition.to_s
47
+ end
48
+ end
49
+
50
+ def render_revision(revision, opts, _params)
51
+ case opts[:format]
52
+ when :long
53
+ ", Revision "
54
+ when :abbrev
55
+ ", Rev. "
56
+ when :short, :mr
57
+ "r"
58
+ end + (revision == '' ? '1' : revision).to_s
59
+ end
60
+
61
+ def render_version(version, opts, _params)
62
+ case opts[:format]
63
+ when :long
64
+ ", Version "
65
+ when :abbrev
66
+ ", Ver. "
67
+ when :short, :mr
68
+ "ver"
69
+ end + version
70
+ end
71
+
72
+ def render_volume(volume, opts, params)
73
+ case opts[:format]
74
+ when :long
75
+ ", Volume "
76
+ when :abbrev
77
+ ", Vol. "
78
+ when :short
79
+ params[:code] ? "v" : " v"
80
+ when :mr
81
+ params[:code] ? "v" : ".v"
82
+ end + volume
83
+ end
84
+
85
+ def render_update(update, opts, _params)
86
+ update_text = update.number.to_s
87
+ update_text += "-#{update.year}" if update.year
88
+ update_text += sprintf("%02d", update.month) if update.month
89
+
90
+ case opts[:format]
91
+ when :long
92
+ " Update #{update_text}"
93
+ when :abbrev
94
+ " Upd. #{update_text}"
95
+ when :short
96
+ "/Upd#{update_text}"
97
+ when :mr
98
+ ".u#{update_text}"
99
+ end
100
+ end
101
+
102
+ def render_translation(translation, opts, _params)
103
+ case opts[:format]
104
+ when :long, :abbrev
105
+ " (#{translation.upcase})"
106
+ when :mr
107
+ ".#{translation}"
108
+ when :short
109
+ " #{translation}"
110
+ end
111
+ end
112
+
113
+ def render_part(part, opts, _params)
114
+ case opts[:format]
115
+ when :long
116
+ " Part "
117
+ when :abbrev
118
+ " Pt. "
119
+ when :short, :mr
120
+ "pt"
121
+ end + part
122
+ end
123
+
124
+ def render_supplement(supplement, opts, _params)
125
+ case opts[:format]
126
+ when :long
127
+ " Supplement "
128
+ when :abbrev
129
+ " Suppl. "
130
+ when :short, :mr
131
+ "sup"
132
+ end + supplement
133
+ end
134
+
135
+ def render_appendix(appendix, opts, _params)
136
+ case opts[:format]
137
+ when :long
138
+ " Appendix "
139
+ when :abbrev
140
+ " App. "
141
+ when :short, :mr
142
+ "app"
143
+ end
144
+ end
145
+
146
+ def render_section(section, opts, _params)
147
+ case opts[:format]
148
+ when :long
149
+ " Section "
150
+ when :abbrev
151
+ " Sec. "
152
+ when :short, :mr
153
+ "sec"
154
+ end + section
155
+ end
156
+
157
+ def render_errata(errata, opts, _params)
158
+ case opts[:format]
159
+ when :long
160
+ " Errata "
161
+ when :abbrev
162
+ " Err. "
163
+ when :short, :mr
164
+ "err"
165
+ end
166
+ end
167
+
168
+ def render_index(index, opts, _params)
169
+ case opts[:format]
170
+ when :long
171
+ " Index "
172
+ when :abbrev
173
+ " Index. "
174
+ when :short, :mr
175
+ "indx"
176
+ end
177
+ end
178
+
179
+ def render_insert(insert, opts, _params)
180
+ case opts[:format]
181
+ when :long
182
+ " Insert "
183
+ when :abbrev
184
+ " Ins. "
185
+ when :short, :mr
186
+ "ins"
187
+ end
188
+ end
189
+
190
+ def render_stage(stage, opts, _params)
191
+ case opts[:format]
192
+ when :mr
193
+ "."
194
+ when :short
195
+ " "
196
+ else
197
+ " "
198
+ end + stage.to_s(opts[:format])
199
+ end
200
+ end
201
+ end
202
+ end
@@ -0,0 +1,30 @@
1
+ SERIES = YAML.load_file(File.join(File.dirname(__FILE__), "../../../series.yaml"))
2
+
3
+ module Pubid::Nist
4
+ class Series
5
+ attr_accessor :series, :parsed
6
+
7
+ def initialize(series:, parsed: nil)
8
+ raise Errors::SerieInvalidError, "#{series} is not valid series" unless SERIES["long"].key?(series)
9
+
10
+ @series = series
11
+ @parsed = parsed
12
+ end
13
+
14
+ def to_s(format = :short)
15
+ # return SERIES["abbrev"][@serie] ||
16
+ return @series if format == :short
17
+
18
+ result = SERIES[format.to_s][@series]
19
+ return @series if result.nil? && format == :mr
20
+
21
+ return SERIES["long"][@series] if result.nil?
22
+
23
+ result
24
+ end
25
+
26
+ def ==(other)
27
+ other.series == @series
28
+ end
29
+ end
30
+ end
@@ -1,7 +1,7 @@
1
1
  STAGES = YAML.load_file(File.join(File.dirname(__FILE__), "../../../stages.yaml"))
2
2
 
3
3
  module Pubid::Nist
4
- class Stage
4
+ class Stage < Pubid::Core::Entity
5
5
  attr_accessor :id, :type
6
6
 
7
7
  def initialize(id:, type:)
@@ -17,7 +17,7 @@ module Pubid::Nist
17
17
  when :mr
18
18
  "#{@id}#{@type}"
19
19
  else
20
- "#{STAGES['id'][@id]} #{STAGES['type'][@type]}"
20
+ "(#{STAGES['id'][@id]} #{STAGES['type'][@type]})"
21
21
  end
22
22
  end
23
23
 
@@ -10,8 +10,16 @@ module Pubid::Nist
10
10
  end
11
11
 
12
12
  rule(series: subtree(:series)) do |context|
13
- { serie: Serie.new(serie: context[:series].to_s.gsub(".", " ")),
14
- publisher: Publisher.parse(context[:series]) }
13
+ if context[:publisher]
14
+ if context[:series]
15
+ { series: Series.new(series: context[:series].to_s.gsub(".", " ")) }
16
+ else
17
+ {}
18
+ end
19
+ else
20
+ { series: Series.new(series: context[:series].to_s.gsub(".", " ")),
21
+ publisher: Publisher.parse(context[:series]) }
22
+ end
15
23
  end
16
24
 
17
25
  # remove :second_report_number from output
@@ -1,5 +1,5 @@
1
1
  module Pubid::Nist
2
- class Update
2
+ class Update < Pubid::Core::Entity
3
3
  attr_accessor :number, :year, :month
4
4
 
5
5
  def initialize(number: nil, year: nil, month: nil)
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Nist
3
- VERSION = "0.2.4".freeze
3
+ VERSION = "0.3.0".freeze
4
4
  end
5
5
  end
data/lib/pubid/nist.rb CHANGED
@@ -10,12 +10,13 @@ module Pubid
10
10
  end
11
11
  end
12
12
 
13
- require_relative "nist/serie"
13
+ require_relative "nist/series"
14
14
  require_relative "nist/parsers/default"
15
15
  require_relative "nist/update"
16
16
  require_relative "nist/transformer"
17
17
  require_relative "nist/parser"
18
- require_relative "nist/renderer"
18
+ require_relative "nist/renderer/base"
19
+ require_relative "nist/renderer/addendum"
19
20
 
20
21
  Dir[File.join(__dir__, 'nist/parsers', '*.rb')].each do |file|
21
22
  require file
@@ -34,3 +35,4 @@ require_relative "nist/stage"
34
35
  require_relative "nist/errors"
35
36
  require_relative "nist/nist_tech_pubs"
36
37
  require_relative "nist/edition"
38
+ require_relative "nist/addendum"
data/series.yaml CHANGED
@@ -1,137 +1,115 @@
1
1
  long:
2
- NIST AMS: Advanced Manufacturing Standard
3
- NIST BSS: Building Science Series
4
- NBS BSS: Building Science Series
5
- NBS BMS: Building Material Structures Report
2
+ AMS: Advanced Manufacturing Series
3
+ BSS: Building Science Series
4
+ BMS: Building Material Structures Report
6
5
  NBS BRPD-CRPL-D: Basic Radio Propagation Predictions Series
7
- NBS BH: Building and Housing Reports
8
- NBS CRPL: Central Radio Propagation Laboratory Reports
6
+ BH: Building and Housing
7
+ CRPL: Central Radio Propagation Laboratory Reports
9
8
  NBS CRPL-F-A: CRPL Ionospheric Data
10
9
  NBS CRPL-F-B: CRPL Solar-Geophysical Data
11
10
  NBS IP: CRPL Ionospheric Predictions
12
- NBS CIRC: Circulars
11
+ CIRC: Circulars
13
12
  NBS CIS: Consumer Information Series
14
- NBS CS: Commercial Standards
13
+ CS: Commercial Standards
15
14
  NBS CS-E: Commercial Standards (emergency)
16
- NBS CSM: Commercial Standards Monthly
17
- NBS FIPS: Federal Information Processing Standards Publication
15
+ CSM: Commercial Standards Monthly
18
16
  FIPS: Federal Information Processing Standards Publication
19
- NIST GCR: Grant/Contract Reports
20
- NBS GCR: Grant/Contract Reports
21
- NIST HB: Handbook
22
- NBS HB: Handbook
17
+ GCR: Grant/Contract Reports
18
+ HB: Handbooks
23
19
  NBS HR: Hydraulic Research in the United States
24
20
  NBS IRPL: Interservice Radio Propagation Laboratory
25
21
  ITL Bulletin: ITL Bulletin
26
22
  NIST LC: Letter Circular
27
23
  NBS LC: Letter Circular
28
- NIST MN: Monograph
29
- NBS MN: Monograph
30
- NBS MP: Miscellaneous Publications
31
- NIST NCSTAR: National Construction Safety Team Report
32
- NIST NSRDS: National Standard Reference Data Series
24
+ MONO: Monograph
25
+ MP: Miscellaneous Publications
26
+ NCSTAR: National Construction Safety Team Act Reports
27
+ NSRDS: National Standard Reference Data Series
33
28
  NSRDS-NBS: National Standard Reference Data Series
34
- NIST IR: Interagency or Internal Report
35
- NBS IR: Interagency or Internal Report
36
- NIST OWMWP: Office of Weights and Measures White Papers
37
- NBS PC: Photographic Circulars
38
- NBS RPT: Reports
29
+ IR: Interagency or Internal Report
30
+ OWMWP: Office of Weights and Measures White Papers
31
+ PC: Photographic Laboratory Circulars
32
+ RPT: Reports
39
33
  NIST PS: Voluntary Product Standards
40
- NBS SIBS: Special Interior Ballistics Studies
34
+ SIBS: Special Interior Ballistics Studies
41
35
  NBS PS: Voluntary Product Standards
42
- NIST SP: Special Publication
43
- NBS SP: Special Publication
44
- NIST TN: Technical Note
45
- NBS TN: Technical Note
46
- NBS TIBM: Technical Information on Building Materials
47
- NIST TTB: Technology Transfer Brief
36
+ SP: Special Publication
37
+ TN: Technical Notes
38
+ TIBM: Technical Information on Building Materials for Use in the Design of Low Cost Housing
39
+ TTB: Technology Transfer Briefs
48
40
  NIST DCI: Data Collection Instruments
49
- NIST EAB: Economic Analysis Brief
41
+ EAB: Economic Analysis Brief
50
42
  NIST Other: Other
51
- CSRC White Paper: Cybersecurity Resource Center White Paper
43
+ CSWP: Cybersecurity White Papers
52
44
  CSRC Book: Cybersecurity Resource Center Book
53
45
  CSRC Use Case: Cybersecurity Resource Center Use Case
54
46
  CSRC Building Block: Cybersecurity Resource Center Building Block
55
47
  JPCRD: Journal of Physical and Chemical Reference Data
56
48
  JRES: Journal of Research of NIST
57
49
  abbrev:
58
- NIST AMS: Adv. Man. Ser
59
- NIST BSS: Bldg. Sci. Ser.
60
- NBS BSS: Bldg. Sci. Ser.
61
- NBS FIPS: Federal Inf. Process. Stds.
50
+ AMS: Adv. Man. Ser
51
+ BSS: Bldg. Sci. Ser.
62
52
  FIPS: Federal Inf. Process. Stds.
63
- NIST HB: Handb.
64
- NBS HB: Handb.
65
- NIST MN: Monogr.
66
- NBS MN: Monogr.
67
- NIST NCSTAR: Natl. Constr. Tm. Act Rpt.
68
- NIST NSRDS: Natl. Stand. Ret. Data Ser.
53
+ HB: Handb.
54
+ MONO: Monogr.
55
+ NCSTAR: Natl. Constr. Tm. Act Rpt.
56
+ NSRDS: Natl. Stand. Ret. Data Ser.
69
57
  NSRDS-NBS: Natl. Stand. Ret. Data Ser.
70
58
  NIST PS: Prod. Stand.
71
59
  NBS PS: Prod. Stand.
72
- NIST SP: Spec. Publ.
73
- NBS SP: Spec. Publ.
74
- NIST TN: Tech. Note
75
- NBS TN: Tech. Note
60
+ SP: Spec. Publ.
61
+ TN: Tech. Note
76
62
  NIST DCI: Data Collect. Instr.
77
63
  NIST Other: Other
78
- CSRC White Paper: CSWP
64
+ CSWP: CSWP
79
65
  CSRC Book: CSRC Book
80
66
  CSRC Use Case: CSRC Use Case
81
67
  CSRC Building Block: CSRC Building Block
82
68
  JPCRD: J. Phys. & Chem. Ref. Data
83
69
  JRES: J. Res. Natl. Inst. Stan.
84
70
  mr:
85
- NIST AMS: NIST.AMS
86
- NIST BSS: NIST.BSS
87
- NBS BSS: NBS.BSS
88
- NBS BMS: NBS.BMS
71
+ AMS: AMS
72
+ BSS: BSS
73
+ BMS: BMS
89
74
  NBS BRPD-CRPL-D: NBS.BRPD-CRPL-D
90
- NBS BH: NBS.BH
91
- NBS CRPL: NBS.CRPL
75
+ BH: BH
76
+ CRPL: CRPL
92
77
  NBS CRPL-F-A: NBS.CRPL-F-A
93
78
  NBS CRPL-F-B: NBS.CRPL-F-B
94
79
  NBS IP: NBS.IP
95
- NBS CIRC: NBS.CIRC
80
+ CIRC: CIRC
96
81
  NBS CIS: NBS.CIS
97
- NBS CS: NBS.CS
82
+ CS: CS
98
83
  NBS CS-E: NBS.CS-E
99
- NBS CSM: NBS.CSM
100
- NBS FIPS: NBS.FIPS
101
- FIPS: NIST.FIPS
102
- NIST GCR: NIST.GCR
103
- NBS GCR: NBS.GCR
104
- NIST HB: NIST.HB
105
- NBS HB: NBS.HB
84
+ CSM: CSM
85
+ FIPS: FIPS
86
+ GCR: GCR
87
+ HB: HB
106
88
  NBS HR: NBS.HR
107
89
  NBS IRPL: NBS.IRPL
108
90
  ITL Bulletin: NIST.ITLB
109
91
  NIST LC: NIST.LC
110
92
  NBS LC: NBS.LC
111
- NIST MN: NIST.MN
112
- NBS MN: NBS.MN
113
- NBS MP: NBS.MP
114
- NIST NCSTAR: NIST.NCSTAR
115
- NIST NSRDS: NIST.NSRDS
93
+ MONO: MN
94
+ MP: MP
95
+ NCSTAR: NCSTAR
96
+ NSRDS: NSRDS
116
97
  NSRDS-NBS: NBS.NSRDS
117
- NIST IR: NIST.IR
118
- NBS IR: NBS.IR
119
- NIST OWMWP: NIST.OWMWP
120
- NBS PC: NBS.PC
121
- NBS RPT: NBS.RPT
98
+ IR: IR
99
+ OWMWP: OWMWP
100
+ PC: PC
101
+ RPT: RPT
122
102
  NIST PS: NIST.PS
123
- NBS SIBS: NBS.SIBS
103
+ SIBS: SIBS
124
104
  NBS PS: NBS.PS
125
- NIST SP: NIST.SP
126
- NBS SP: NBS.SP
127
- NIST TN: NIST.TN
128
- NBS TN: NBS.TN
129
- NBS TIBM: NBS.TIBM
130
- NIST TTB: NIST.TTB
105
+ SP: SP
106
+ TN: TN
107
+ TIBM: TIBM
108
+ TTB: TTB
131
109
  NIST DCI: NIST.DCI
132
- NIST EAB: NIST.EAB
110
+ EAB: EAB
133
111
  NIST Other: NIST.O
134
- CSRC White Paper: NIST.CSWP
112
+ CSWP: CSWP
135
113
  CSRC Book: NIST.CSB
136
114
  CSRC Use Case: NIST.CSUC
137
115
  CSRC Building Block: NIST.CSBB
data/update_codes.yaml CHANGED
@@ -1,15 +1,15 @@
1
- NBS MONO: NBS MN
2
- NIST MONO: NIST MN
1
+ NBS MN: NBS MONO
2
+ NIST MN: NIST MONO
3
3
  NIST MP: NBS MP
4
4
  NIST SP 260-162 2006ed.: NIST SP 260-162e2006
5
5
  NBS CIRC 154suprev: NBS CIRC 154r1sup
6
6
  NBS CIRC supJun1925-Jun1926: NBS CIRC 24e7sup2
7
7
  NBS CIRC supJun1925-Jun1927: NBS CIRC 24e7sup3
8
- NBS CIRC sup: NBS CIRC 24e7sup
8
+ /^NBS CIRC sup$/: NBS CIRC 24e7sup
9
9
  NBS CIRC e2: NBS CIRC 2e2
10
10
  NBS CIRC 25sup-1924: NBS CIRC 25sup
11
11
  NIST SP 260-126 rev 2013: NIST SP 260-126r2013
12
- NIST CSWP: CSRC White Paper
12
+ NIST CSRC White Paper: NIST CSWP
13
13
  NIST SP 800-56ar: NIST SP 800-56Ar1
14
14
  NIST.LCIRC: NIST.LC
15
15
  NBS.LCIRC: NBS.LC
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid-nist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.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: 2023-11-15 00:00:00.000000000 Z
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.10.3
131
+ version: 1.12.2
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.10.3
138
+ version: 1.12.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubyzip
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -165,36 +165,32 @@ files:
165
165
  - exe/pubid-nist
166
166
  - lib/pubid-nist.rb
167
167
  - lib/pubid/nist.rb
168
+ - lib/pubid/nist/addendum.rb
168
169
  - lib/pubid/nist/edition.rb
169
170
  - lib/pubid/nist/errors.rb
170
171
  - lib/pubid/nist/identifier.rb
171
172
  - lib/pubid/nist/nist_tech_pubs.rb
172
173
  - lib/pubid/nist/parser.rb
174
+ - lib/pubid/nist/parsers/circ.rb
175
+ - lib/pubid/nist/parsers/crpl.rb
176
+ - lib/pubid/nist/parsers/csm.rb
173
177
  - lib/pubid/nist/parsers/default.rb
174
178
  - lib/pubid/nist/parsers/fips.rb
175
- - lib/pubid/nist/parsers/nbs_bh.rb
176
- - lib/pubid/nist/parsers/nbs_circ.rb
177
- - lib/pubid/nist/parsers/nbs_crpl.rb
178
- - lib/pubid/nist/parsers/nbs_csm.rb
179
- - lib/pubid/nist/parsers/nbs_fips.rb
180
- - lib/pubid/nist/parsers/nbs_hb.rb
179
+ - lib/pubid/nist/parsers/gcr.rb
180
+ - lib/pubid/nist/parsers/hb.rb
181
+ - lib/pubid/nist/parsers/mp.rb
181
182
  - lib/pubid/nist/parsers/nbs_ir.rb
182
183
  - lib/pubid/nist/parsers/nbs_lc.rb
183
- - lib/pubid/nist/parsers/nbs_mn.rb
184
- - lib/pubid/nist/parsers/nbs_mp.rb
185
- - lib/pubid/nist/parsers/nbs_rpt.rb
186
- - lib/pubid/nist/parsers/nbs_sp.rb
187
- - lib/pubid/nist/parsers/nbs_tn.rb
188
- - lib/pubid/nist/parsers/nist_gcr.rb
189
- - lib/pubid/nist/parsers/nist_hb.rb
184
+ - lib/pubid/nist/parsers/ncstar.rb
190
185
  - lib/pubid/nist/parsers/nist_ir.rb
191
- - lib/pubid/nist/parsers/nist_ncstar.rb
192
- - lib/pubid/nist/parsers/nist_owmwp.rb
193
- - lib/pubid/nist/parsers/nist_sp.rb
194
- - lib/pubid/nist/parsers/nist_tn.rb
186
+ - lib/pubid/nist/parsers/owmwp.rb
187
+ - lib/pubid/nist/parsers/rpt.rb
188
+ - lib/pubid/nist/parsers/sp.rb
189
+ - lib/pubid/nist/parsers/tn.rb
195
190
  - lib/pubid/nist/publisher.rb
196
- - lib/pubid/nist/renderer.rb
197
- - lib/pubid/nist/serie.rb
191
+ - lib/pubid/nist/renderer/addendum.rb
192
+ - lib/pubid/nist/renderer/base.rb
193
+ - lib/pubid/nist/series.rb
198
194
  - lib/pubid/nist/stage.rb
199
195
  - lib/pubid/nist/transformer.rb
200
196
  - lib/pubid/nist/update.rb
@@ -1,6 +0,0 @@
1
- module Pubid::Nist
2
- module Parsers
3
- class NbsBh < Default
4
- end
5
- end
6
- end
@@ -1,14 +0,0 @@
1
- module Pubid::Nist
2
- module Parsers
3
- class NbsFips < Default
4
- rule(:edition) do
5
- str("-") >> (
6
- (month_letters.as(:edition_month) >> year_digits.as(:edition_year)) |
7
- year_digits.as(:edition_year) |
8
- (month_letters.as(:edition_month) >> match('\d').repeat(2, 2).as(:edition_day) >>
9
- str("/") >> year_digits.as(:edition_year))
10
- )
11
- end
12
- end
13
- end
14
- end
@@ -1,6 +0,0 @@
1
- module Pubid::Nist
2
- module Parsers
3
- class NbsMn < Default
4
- end
5
- end
6
- end
@@ -1,13 +0,0 @@
1
- module Pubid::Nist
2
- module Parsers
3
- class NbsSp < Default
4
- rule(:part_prefixes) do
5
- str("p") | str("P")
6
- end
7
-
8
- rule(:volume) do
9
- str("v") >> (match('[\da-z-]').repeat(1) >> match("[A-Z]").repeat).as(:volume)
10
- end
11
- end
12
- end
13
- end
@@ -1,9 +0,0 @@
1
- module Pubid::Nist
2
- module Parsers
3
- class NbsTn < Default
4
- rule(:second_report_number) do
5
- (digits_with_suffix | str("A")).as(:second_report_number)
6
- end
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- require_relative "nbs_hb"
2
-
3
- module Pubid::Nist
4
- module Parsers
5
- class NistHb < NbsHb
6
- rule(:number_suffix) { match("[a-zA-Z]") }
7
- end
8
- end
9
- end