metanorma-ogc 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.hound.yml +3 -0
  4. data/.rubocop.yml +10 -0
  5. data/.travis.yml +16 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE +25 -0
  9. data/README.adoc +323 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/rspec +17 -0
  13. data/bin/setup +8 -0
  14. data/lib/asciidoctor/ogc.rb +7 -0
  15. data/lib/asciidoctor/ogc/biblio.rng +890 -0
  16. data/lib/asciidoctor/ogc/converter.rb +253 -0
  17. data/lib/asciidoctor/ogc/front.rb +163 -0
  18. data/lib/asciidoctor/ogc/isodoc.rng +1091 -0
  19. data/lib/asciidoctor/ogc/isostandard.rng +1068 -0
  20. data/lib/asciidoctor/ogc/ogc.rng +210 -0
  21. data/lib/isodoc/ogc.rb +10 -0
  22. data/lib/isodoc/ogc/html/header.html +181 -0
  23. data/lib/isodoc/ogc/html/html_ogc_intro.html +85 -0
  24. data/lib/isodoc/ogc/html/html_ogc_titlepage.html +172 -0
  25. data/lib/isodoc/ogc/html/htmlstyle.scss +1054 -0
  26. data/lib/isodoc/ogc/html/ogc.scss +644 -0
  27. data/lib/isodoc/ogc/html/scripts.html +82 -0
  28. data/lib/isodoc/ogc/html/scripts.pdf.html +70 -0
  29. data/lib/isodoc/ogc/html/word_ogc_intro.html +92 -0
  30. data/lib/isodoc/ogc/html/word_ogc_titlepage.html +194 -0
  31. data/lib/isodoc/ogc/html/wordstyle.scss +1104 -0
  32. data/lib/isodoc/ogc/html_convert.rb +355 -0
  33. data/lib/isodoc/ogc/i18n-en.yaml +1 -0
  34. data/lib/isodoc/ogc/metadata.rb +102 -0
  35. data/lib/isodoc/ogc/pdf_convert.rb +357 -0
  36. data/lib/isodoc/ogc/word_convert.rb +345 -0
  37. data/lib/metanorma-ogc.rb +8 -0
  38. data/lib/metanorma/ogc.rb +11 -0
  39. data/lib/metanorma/ogc/processor.rb +43 -0
  40. data/lib/metanorma/ogc/version.rb +5 -0
  41. data/metanorma-ogc.gemspec +45 -0
  42. metadata +338 -0
@@ -0,0 +1,8 @@
1
+ require "metanorma/ogc"
2
+ require "asciidoctor"
3
+ require "asciidoctor/ogc"
4
+ require "isodoc/ogc"
5
+
6
+ if defined? Metanorma
7
+ Metanorma::Registry.instance.register(Metanorma::Ogc::Processor)
8
+ end
@@ -0,0 +1,11 @@
1
+ require "metanorma/ogc/processor"
2
+
3
+ module Metanorma
4
+ module Ogc
5
+
6
+ ORGANIZATION_NAME_SHORT = "OGC"
7
+ ORGANIZATION_NAME_LONG = "Open Geospatial Consortium"
8
+ DOCUMENT_NAMESPACE = "https://standards.opengeospatial.org/document"
9
+
10
+ end
11
+ end
@@ -0,0 +1,43 @@
1
+ require "metanorma/processor"
2
+
3
+ module Metanorma
4
+ module Ogc
5
+ class Processor < Metanorma::Processor
6
+
7
+ def initialize
8
+ @short = :ogc
9
+ @input_format = :asciidoc
10
+ @asciidoctor_backend = :ogc
11
+ end
12
+
13
+ def output_formats
14
+ super.merge(
15
+ html: "html",
16
+ doc: "doc",
17
+ pdf: "pdf"
18
+ )
19
+ end
20
+
21
+ def version
22
+ "Metanorma::Ogc #{Metanorma::Ogc::VERSION}"
23
+ end
24
+
25
+ def input_to_isodoc(file, filename)
26
+ Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
27
+ end
28
+
29
+ def output(isodoc_node, outname, format, options={})
30
+ case format
31
+ when :html
32
+ IsoDoc::Ogc::HtmlConvert.new(options).convert(outname, isodoc_node)
33
+ when :doc
34
+ IsoDoc::Ogc::WordConvert.new(options).convert(outname, isodoc_node)
35
+ when :pdf
36
+ IsoDoc::Ogc::PdfConvert.new(options).convert(outname, isodoc_node)
37
+ else
38
+ super
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,5 @@
1
+ module Metanorma
2
+ module Ogc
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
@@ -0,0 +1,45 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "metanorma/ogc/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "metanorma-ogc"
7
+ spec.version = Metanorma::Ogc::VERSION
8
+ spec.authors = ["Ribose Inc."]
9
+ spec.email = ["open.source@ribose.com"]
10
+
11
+ spec.summary = "Metanorma for the Open Geospatial Consortium."
12
+ spec.description = <<~DESCRIPTION
13
+ Metanorma for the Open Geospatial Consortium.
14
+ DESCRIPTION
15
+
16
+ spec.homepage = "https://github.com/riboseinc/metanorma-ogc"
17
+ spec.license = "BSD-2-Clause"
18
+
19
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
+ f.match(%r{^(test|spec|features)/})
21
+ end
22
+ spec.bindir = "exe"
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ["lib"]
25
+
26
+ spec.add_dependency "asciidoctor", "~> 1.5.7"
27
+ spec.add_dependency "htmlentities", "~> 4.3.4"
28
+ spec.add_dependency "ruby-jing"
29
+ spec.add_dependency "metanorma-standoc", "~> 1.0.8"
30
+ spec.add_dependency "isodoc", "~> 0.9.0"
31
+ spec.add_dependency "iso-639"
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.15"
34
+ spec.add_development_dependency "byebug", "~> 9.1"
35
+ spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
+ spec.add_development_dependency "guard", "~> 2.14"
37
+ spec.add_development_dependency "guard-rspec", "~> 4.7"
38
+ spec.add_development_dependency "rake", "~> 12.0"
39
+ spec.add_development_dependency "rspec", "~> 3.6"
40
+ spec.add_development_dependency "rubocop", "= 0.54.0"
41
+ spec.add_development_dependency "simplecov", "~> 0.15"
42
+ spec.add_development_dependency "timecop", "~> 0.9"
43
+ spec.add_development_dependency "metanorma", "~> 0.3.0"
44
+ spec.add_development_dependency "metanorma-cli", "~> 1.0.3"
45
+ end
metadata ADDED
@@ -0,0 +1,338 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: metanorma-ogc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Ribose Inc.
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-12-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: asciidoctor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.5.7
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.5.7
27
+ - !ruby/object:Gem::Dependency
28
+ name: htmlentities
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 4.3.4
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 4.3.4
41
+ - !ruby/object:Gem::Dependency
42
+ name: ruby-jing
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: metanorma-standoc
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.8
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.8
69
+ - !ruby/object:Gem::Dependency
70
+ name: isodoc
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.9.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.9.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: iso-639
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.15'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.15'
111
+ - !ruby/object:Gem::Dependency
112
+ name: byebug
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '9.1'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '9.1'
125
+ - !ruby/object:Gem::Dependency
126
+ name: equivalent-xml
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.6'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.6'
139
+ - !ruby/object:Gem::Dependency
140
+ name: guard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '2.14'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '2.14'
153
+ - !ruby/object:Gem::Dependency
154
+ name: guard-rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '4.7'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '4.7'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rake
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '12.0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '12.0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rspec
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '3.6'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '3.6'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - '='
200
+ - !ruby/object:Gem::Version
201
+ version: 0.54.0
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - '='
207
+ - !ruby/object:Gem::Version
208
+ version: 0.54.0
209
+ - !ruby/object:Gem::Dependency
210
+ name: simplecov
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '0.15'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '0.15'
223
+ - !ruby/object:Gem::Dependency
224
+ name: timecop
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: '0.9'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '0.9'
237
+ - !ruby/object:Gem::Dependency
238
+ name: metanorma
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: 0.3.0
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: 0.3.0
251
+ - !ruby/object:Gem::Dependency
252
+ name: metanorma-cli
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: 1.0.3
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: 1.0.3
265
+ description: 'Metanorma for the Open Geospatial Consortium.
266
+
267
+ '
268
+ email:
269
+ - open.source@ribose.com
270
+ executables: []
271
+ extensions: []
272
+ extra_rdoc_files: []
273
+ files:
274
+ - ".gitignore"
275
+ - ".hound.yml"
276
+ - ".rubocop.yml"
277
+ - ".travis.yml"
278
+ - CODE_OF_CONDUCT.md
279
+ - Gemfile
280
+ - LICENSE
281
+ - README.adoc
282
+ - Rakefile
283
+ - bin/console
284
+ - bin/rspec
285
+ - bin/setup
286
+ - lib/asciidoctor/ogc.rb
287
+ - lib/asciidoctor/ogc/biblio.rng
288
+ - lib/asciidoctor/ogc/converter.rb
289
+ - lib/asciidoctor/ogc/front.rb
290
+ - lib/asciidoctor/ogc/isodoc.rng
291
+ - lib/asciidoctor/ogc/isostandard.rng
292
+ - lib/asciidoctor/ogc/ogc.rng
293
+ - lib/isodoc/ogc.rb
294
+ - lib/isodoc/ogc/html/header.html
295
+ - lib/isodoc/ogc/html/html_ogc_intro.html
296
+ - lib/isodoc/ogc/html/html_ogc_titlepage.html
297
+ - lib/isodoc/ogc/html/htmlstyle.scss
298
+ - lib/isodoc/ogc/html/ogc.scss
299
+ - lib/isodoc/ogc/html/scripts.html
300
+ - lib/isodoc/ogc/html/scripts.pdf.html
301
+ - lib/isodoc/ogc/html/word_ogc_intro.html
302
+ - lib/isodoc/ogc/html/word_ogc_titlepage.html
303
+ - lib/isodoc/ogc/html/wordstyle.scss
304
+ - lib/isodoc/ogc/html_convert.rb
305
+ - lib/isodoc/ogc/i18n-en.yaml
306
+ - lib/isodoc/ogc/metadata.rb
307
+ - lib/isodoc/ogc/pdf_convert.rb
308
+ - lib/isodoc/ogc/word_convert.rb
309
+ - lib/metanorma-ogc.rb
310
+ - lib/metanorma/ogc.rb
311
+ - lib/metanorma/ogc/processor.rb
312
+ - lib/metanorma/ogc/version.rb
313
+ - metanorma-ogc.gemspec
314
+ homepage: https://github.com/riboseinc/metanorma-ogc
315
+ licenses:
316
+ - BSD-2-Clause
317
+ metadata: {}
318
+ post_install_message:
319
+ rdoc_options: []
320
+ require_paths:
321
+ - lib
322
+ required_ruby_version: !ruby/object:Gem::Requirement
323
+ requirements:
324
+ - - ">="
325
+ - !ruby/object:Gem::Version
326
+ version: '0'
327
+ required_rubygems_version: !ruby/object:Gem::Requirement
328
+ requirements:
329
+ - - ">="
330
+ - !ruby/object:Gem::Version
331
+ version: '0'
332
+ requirements: []
333
+ rubyforge_project:
334
+ rubygems_version: 2.7.6
335
+ signing_key:
336
+ specification_version: 4
337
+ summary: Metanorma for the Open Geospatial Consortium.
338
+ test_files: []