metanorma-jis 0.2.7 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module JIS
3
- VERSION = "0.2.7".freeze
3
+ VERSION = "0.2.9".freeze
4
4
  end
5
5
  end
6
6
 
data/lib/metanorma-jis.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require "asciidoctor" unless defined? Asciidoctor::Converter
2
2
  require_relative "metanorma/jis/converter"
3
- require_relative "metanorma/plateau/converter"
4
3
  require_relative "metanorma/jis/version"
5
4
  require "isodoc/jis/html_convert"
6
5
  require "isodoc/jis/word_convert"
@@ -8,18 +7,10 @@ require "isodoc/jis/pdf_convert"
8
7
  require "isodoc/jis/presentation_xml_convert"
9
8
  require "isodoc/jis/metadata"
10
9
  require "isodoc/jis/xref"
11
- require "isodoc/plateau/html_convert"
12
- require "isodoc/plateau/word_convert"
13
- require "isodoc/plateau/pdf_convert"
14
- require "isodoc/plateau/presentation_xml_convert"
15
- require "isodoc/plateau/metadata"
16
- require "isodoc/plateau/xref"
17
10
  require "metanorma"
18
11
 
19
12
  if defined? Metanorma::Registry
20
13
  require_relative "metanorma/jis"
21
14
  Metanorma::Registry.instance.register(Metanorma::JIS::Processor)
22
- require_relative "metanorma/plateau"
23
- Metanorma::Registry.instance.register(Metanorma::Plateau::Processor)
24
15
  end
25
16
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ["Ribose Inc."]
11
11
  spec.email = ["open.source@ribose.com"]
12
12
 
13
- spec.summary = "metanorma-jis lets you write BSI standards "\
13
+ spec.summary = "metanorma-jis lets you write JIS standards "\
14
14
  "in AsciiDoc."
15
15
  spec.description = <<~DESCRIPTION
16
16
  metanorma-jis lets you write JIS standards in AsciiDoc syntax.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-jis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-22 00:00:00.000000000 Z
11
+ date: 2024-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: japanese_calendar
@@ -282,12 +282,6 @@ files:
282
282
  - lib/isodoc/jis/word_cleanup.rb
283
283
  - lib/isodoc/jis/word_convert.rb
284
284
  - lib/isodoc/jis/xref.rb
285
- - lib/isodoc/plateau/html_convert.rb
286
- - lib/isodoc/plateau/metadata.rb
287
- - lib/isodoc/plateau/pdf_convert.rb
288
- - lib/isodoc/plateau/presentation_xml_convert.rb
289
- - lib/isodoc/plateau/word_convert.rb
290
- - lib/isodoc/plateau/xref.rb
291
285
  - lib/metanorma-jis.rb
292
286
  - lib/metanorma/jis.rb
293
287
  - lib/metanorma/jis/basicdoc.rng
@@ -306,9 +300,6 @@ files:
306
300
  - lib/metanorma/jis/reqt.rng
307
301
  - lib/metanorma/jis/validate.rb
308
302
  - lib/metanorma/jis/version.rb
309
- - lib/metanorma/plateau.rb
310
- - lib/metanorma/plateau/converter.rb
311
- - lib/metanorma/plateau/processor.rb
312
303
  - metanorma-jis.gemspec
313
304
  homepage: https://github.com/metanorma/metanorma-jis
314
305
  licenses:
@@ -329,8 +320,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
320
  - !ruby/object:Gem::Version
330
321
  version: '0'
331
322
  requirements: []
332
- rubygems_version: 3.3.26
323
+ rubygems_version: 3.3.27
333
324
  signing_key:
334
325
  specification_version: 4
335
- summary: metanorma-jis lets you write BSI standards in AsciiDoc.
326
+ summary: metanorma-jis lets you write JIS standards in AsciiDoc.
336
327
  test_files: []
@@ -1,10 +0,0 @@
1
- module IsoDoc
2
- module Plateau
3
- class HtmlConvert < IsoDoc::JIS::HtmlConvert
4
- def initialize(options)
5
- super
6
- @libdir = File.dirname(__FILE__)
7
- end
8
- end
9
- end
10
- end
@@ -1,6 +0,0 @@
1
- module IsoDoc
2
- module Plateau
3
- class Metadata < IsoDoc::JIS::Metadata
4
- end
5
- end
6
- end
@@ -1,14 +0,0 @@
1
- module IsoDoc
2
- module Plateau
3
- class PdfConvert < IsoDoc::JIS::PdfConvert
4
- def initialize(options)
5
- @libdir = File.dirname(__FILE__)
6
- super
7
- end
8
-
9
- def pdf_stylesheet(_docxml)
10
- "jis.international-standard.xsl"
11
- end
12
- end
13
- end
14
- end
@@ -1,6 +0,0 @@
1
- module IsoDoc
2
- module Plateau
3
- class PresentationXMLConvert < IsoDoc::JIS::PresentationXMLConvert
4
- end
5
- end
6
- end
@@ -1,11 +0,0 @@
1
- module IsoDoc
2
- module Plateau
3
- class WordConvert < IsoDoc::JIS::WordConvert
4
- def initialize(options)
5
- @libdir = File.dirname(__FILE__)
6
- super
7
- @libdir = File.dirname(__FILE__)
8
- end
9
- end
10
- end
11
- end
@@ -1,6 +0,0 @@
1
- module IsoDoc
2
- module Plateau
3
- class Xref < IsoDoc::JIS::Xref
4
- end
5
- end
6
- end
@@ -1,55 +0,0 @@
1
- module Metanorma
2
- module Plateau
3
- class Converter < JIS::Converter
4
- register_for "plateau"
5
-
6
- def version
7
- flavour = "JIS"
8
- Metanorma.versioned(Metanorma, flavour)[-1]::VERSION
9
- end
10
-
11
- def schema_version
12
- f = File.read(File.join(File.dirname(__FILE__), "..", "jis", "isodoc.rng"))
13
- m = / VERSION (v\S+)/.match(f)
14
- m[1]
15
- end
16
-
17
- def html_converter(node)
18
- if node.nil?
19
- IsoDoc::Plateau::HtmlConvert.new({})
20
- else
21
- IsoDoc::Plateau::HtmlConvert.new(html_extract_attributes(node))
22
- end
23
- end
24
-
25
- def doc_converter(node)
26
- if node.nil?
27
- IsoDoc::Plateau::WordConvert.new({})
28
- else
29
- IsoDoc::Plateau::WordConvert.new(doc_extract_attributes(node))
30
- end
31
- end
32
-
33
- def pdf_converter(node)
34
- return if node.attr("no-pdf")
35
-
36
- if node.nil?
37
- IsoDoc::Plateau::PdfConvert.new({})
38
- else
39
- IsoDoc::Plateau::PdfConvert.new(pdf_extract_attributes(node))
40
- end
41
- end
42
-
43
- def presentation_xml_converter(node)
44
- if node.nil?
45
- IsoDoc::Plateau::PresentationXMLConvert.new({})
46
- else
47
- IsoDoc::Plateau::PresentationXMLConvert
48
- .new(doc_extract_attributes(node)
49
- .merge(output_formats: ::Metanorma::Plateau::Processor.new
50
- .output_formats))
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,57 +0,0 @@
1
- require "metanorma/processor"
2
-
3
- module Metanorma
4
- module Plateau
5
- class Processor < Metanorma::JIS::Processor
6
- def initialize # rubocop:disable Lint/MissingSuper
7
- @short = :plateau
8
- @input_format = :asciidoc
9
- @asciidoctor_backend = :plateau
10
- end
11
-
12
- def output_formats
13
- super.merge(
14
- html: "html",
15
- pdf: "pdf",
16
- doc: "doc",
17
- )
18
- end
19
-
20
- def fonts_manifest
21
- {
22
- "STIX Two Math" => nil,
23
- "IPAexGothic" => nil,
24
- "IPAexMincho" => nil,
25
- "Courier New" => nil,
26
- "Cambria Math" => nil,
27
- "Times New Roman" => nil,
28
- "Arial" => nil,
29
- }
30
- end
31
-
32
- def version
33
- "Metanorma::JIS #{Metanorma::JIS::VERSION}"
34
- end
35
-
36
- def output(xml, inname, outname, format, options = {})
37
- options_preprocess(options)
38
- case format
39
- when :html
40
- IsoDoc::Plateau::HtmlConvert.new(options).convert(inname, xml, nil,
41
- outname)
42
- when :doc
43
- IsoDoc::Plateau::WordConvert.new(options).convert(inname, xml, nil,
44
- outname)
45
- when :pdf
46
- IsoDoc::Plateau::PdfConvert.new(options).convert(inname, xml, nil,
47
- outname)
48
- when :presentation
49
- IsoDoc::Plateau::PresentationXMLConvert.new(options).convert(inname, xml,
50
- nil, outname)
51
- else
52
- super
53
- end
54
- end
55
- end
56
- end
57
- end
@@ -1,6 +0,0 @@
1
- require_relative "./plateau/processor"
2
-
3
- module Metanorma
4
- module Plateau
5
- end
6
- end