metanorma-taste 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +106 -46
  3. data/data/csa/config.yaml +25 -23
  4. data/data/csa/csa.standard.xsl +58 -76
  5. data/data/elf/config.yaml +10 -8
  6. data/data/enosema/config.yaml +10 -8
  7. data/data/icc/config.yaml +14 -12
  8. data/data/mbxif/config.yaml +26 -0
  9. data/data/mbxif/copyright.adoc +36 -0
  10. data/data/mbxif/i18n.yaml +4 -0
  11. data/data/mbxif/mbxif-back-cover.pdf +3504 -7
  12. data/data/mbxif/mbxif-front-cover.pdf +54968 -16
  13. data/data/mbxif/mbxif-logos.pdf +11330 -46
  14. data/data/mbxif/mbxif-logos_caeif.svg +1 -0
  15. data/data/mbxif/mbxif-logos_caxif.svg +1 -0
  16. data/data/mbxif/mbxif-logos_ewisif.svg +1 -0
  17. data/data/mbxif/mbxif-logos_jtif.svg +1 -0
  18. data/data/mbxif/mbxif-logos_lotar.svg +1 -0
  19. data/data/mbxif/mbxif-logos_mbxif.svg +1 -0
  20. data/data/mbxif/mbxif-logos_pdmif.svg +1 -0
  21. data/data/mbxif/mbxif.xsl +361 -0
  22. data/data/pdfa/config.yaml +16 -14
  23. data/data/pdfa/i18n.yaml +2 -4
  24. data/data/pdfa/pdfa-logo.emf +0 -0
  25. data/data/pdfa/pdfa-logo.svg +1 -1
  26. data/data/pdfa/pdfa.xsl +47 -10
  27. data/data/swf/config.yaml +14 -8
  28. data/data/swf/copyright.adoc +3 -4
  29. data/data/swf/swf-back-cover.pdf +3504 -7
  30. data/data/swf/swf-front-cover.pdf +3472 -3
  31. data/data/swf/swf-logo-with-graphic.svg +1 -0
  32. data/data/swf/swf-logo.svg +1 -0
  33. data/data/swf/swf.xsl +361 -0
  34. data/lib/metanorma/taste/base.rb +23 -19
  35. data/lib/metanorma/taste/base_override.rb +7 -47
  36. data/lib/metanorma/taste/filename_attributes.rb +53 -0
  37. data/lib/metanorma/taste/taste_config.rb +0 -34
  38. data/lib/metanorma/taste/value_attributes.rb +59 -0
  39. data/lib/metanorma/taste/version.rb +1 -1
  40. data/lib/metanorma/taste_register.rb +6 -6
  41. metadata +23 -2
@@ -12,23 +12,6 @@ module Metanorma
12
12
  attribute :flavor, :string
13
13
  attribute :owner, :string
14
14
  attribute :base_flavor, :string
15
- attribute :copyright_notice, :string
16
- attribute :i18n_dictionary, :string
17
- attribute :publisher_logo, :string
18
- attribute :htmlcoverpage, :string
19
- attribute :htmlintropage, :string
20
- attribute :htmlstylesheet, :string
21
- attribute :htmlstylesheet_override, :string
22
- attribute :wordcoverpage, :string
23
- attribute :wordintropage, :string
24
- attribute :wordstylesheet, :string
25
- attribute :wordstylesheet_override, :string
26
- attribute :header, :string
27
- attribute :standardstylesheet, :string
28
- attribute :standardstylesheet_override, :string
29
- attribute :pdfstylesheet, :string
30
- attribute :pdfstylesheet_override, :string
31
- attribute :customize, :string
32
15
  attribute :base_override, BaseOverride
33
16
  attribute :doctypes, DoctypeConfig, collection: true
34
17
  attribute :stages, StageConfig, collection: true
@@ -38,25 +21,8 @@ module Metanorma
38
21
  map "flavor", to: :flavor
39
22
  map "owner", to: :owner
40
23
  map "base-flavor", to: :base_flavor
41
- map "copyright-notice", to: :copyright_notice
42
- map "i18n-dictionary", to: :i18n_dictionary
43
- map "publisher-logo", to: :publisher_logo
44
- map "htmlcoverpage", to: :htmlcoverpage
45
- map "htmlintropage", to: :htmlintropage
46
- map "htmlstylesheet", to: :htmlstylesheet
47
- map "htmlstylesheet-override", to: :htmlstylesheet_override
48
- map "wordcoverpage", to: :wordcoverpage
49
- map "wordintropage", to: :wordintropage
50
- map "wordstylesheet", to: :wordstylesheet
51
- map "wordstylesheet-override", to: :wordstylesheet_override
52
- map "standardstylesheet", to: :wordstylesheet
53
- map "standardstylesheet-override", to: :wordstylesheet_override
54
- map "header", to: :header
55
- map "pdf-stylesheet", to: :pdfstylesheet
56
- map "pdf-stylesheet-override", to: :pdfstylesheet_override
57
24
  map "base-override", to: :base_override
58
25
  map "doctypes", to: :doctypes
59
- map "customize", to: :customize
60
26
  end
61
27
  end
62
28
  end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Metanorma
6
+ module Taste
7
+ # Model for value-based attributes configuration
8
+ # These are Metanorma document attributes that contain values (not filenames)
9
+ class ValueAttributes < Lutaml::Model::Serializable
10
+ attribute :publisher, :string
11
+ attribute :publisher_abbr, :string
12
+ attribute :body_font, :string
13
+ attribute :header_font, :string
14
+ attribute :monospace_font, :string
15
+ attribute :presentation_metadata_color_secondary, :string
16
+ attribute :presentation_metadata_backcover_text, :string
17
+ attribute :presentation_metadata_ul_label_list, :string
18
+ attribute :presentation_metadata_annex_delim, :string
19
+ attribute :presentation_metadata_middle_title, :string
20
+ attribute :presentation_metadata_ol_label_template_alphabet, :string
21
+ attribute :presentation_metadata_ol_label_template_alphabet_upper, :string
22
+ attribute :presentation_metadata_ol_label_template_roman, :string
23
+ attribute :presentation_metadata_ol_label_template_roman_upper, :string
24
+ attribute :presentation_metadata_ol_label_template_arabic, :string
25
+ attribute :fonts, :string
26
+ attribute :output_extensions, :string
27
+
28
+ key_value do
29
+ map "publisher", to: :publisher
30
+ map "publisher_abbr", to: :publisher_abbr
31
+ map "body-font", to: :body_font
32
+ map "header-font", to: :header_font
33
+ map "monospace-font", to: :monospace_font
34
+ map "fonts", to: :fonts
35
+ map "presentation-metadata-color-secondary",
36
+ to: :presentation_metadata_color_secondary
37
+ map "presentation-metadata-backcover-text",
38
+ to: :presentation_metadata_backcover_text
39
+ map "presentation-metadata-ul-label-list",
40
+ to: :presentation_metadata_ul_label_list
41
+ map "presentation-metadata-annex-delim",
42
+ to: :presentation_metadata_annex_delim
43
+ map "presentation-metadata-middle-title",
44
+ to: :presentation_metadata_middle_title
45
+ map "presentation-metadata-ol-label-template-alphabet",
46
+ to: :presentation_metadata_ol_label_template_alphabet
47
+ map "presentation-metadata-ol-label-template-alphabet_upper",
48
+ to: :presentation_metadata_ol_label_template_alphabet_upper
49
+ map "presentation-metadata-ol-label-template-roman",
50
+ to: :presentation_metadata_ol_label_template_roman
51
+ map "presentation-metadata-ol-label-template-roman_upper",
52
+ to: :presentation_metadata_ol_label_template_roman_upper
53
+ map "presentation-metadata-ol-label-template-arabic",
54
+ to: :presentation_metadata_ol_label_template_arabic
55
+ map "output-extensions", to: :output_extensions
56
+ end
57
+ end
58
+ end
59
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Metanorma
4
4
  module Taste
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
@@ -187,21 +187,21 @@ module Metanorma
187
187
  raise InvalidTasteConfigError, "Taste must have a flavor name"
188
188
  end
189
189
 
190
- # Validate that base-override.output-extensions is present and not empty
191
- unless config.base_override&.output_extensions&.strip&.length&.positive?
192
- raise InvalidTasteConfigError, "Taste must have base-override.output-extensions defined"
190
+ # Validate that base-override.value-attributes.output-extensions is present and not empty
191
+ unless config.base_override&.value_attributes&.output_extensions&.strip&.length&.positive?
192
+ raise InvalidTasteConfigError, "Taste must have base-override.value-attributes.output-extensions defined"
193
193
  end
194
194
 
195
195
  # Auto-enhance output-extensions: if it contains xml and any of html/doc/pdf,
196
196
  # and doesn't already contain "presentation", then add "presentation"
197
- if config.base_override&.output_extensions
198
- extensions = config.base_override.output_extensions.split(',').map(&:strip)
197
+ if config.base_override&.value_attributes&.output_extensions
198
+ extensions = config.base_override.value_attributes.output_extensions.split(',').map(&:strip)
199
199
 
200
200
  if extensions.include?('xml') &&
201
201
  (extensions.include?('html') || extensions.include?('doc') || extensions.include?('pdf')) &&
202
202
  !extensions.include?('presentation')
203
203
  extensions << 'presentation'
204
- config.base_override.output_extensions = extensions.join(',')
204
+ config.base_override.value_attributes.output_extensions = extensions.join(',')
205
205
  end
206
206
  end
207
207
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-taste
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-16 00:00:00.000000000 Z
11
+ date: 2025-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -339,6 +339,20 @@ files:
339
339
  - data/icc/icc-small-new.svg
340
340
  - data/icc/icc-small.emf
341
341
  - data/icc/icc-small.svg
342
+ - data/mbxif/config.yaml
343
+ - data/mbxif/copyright.adoc
344
+ - data/mbxif/i18n.yaml
345
+ - data/mbxif/mbxif-back-cover.pdf
346
+ - data/mbxif/mbxif-front-cover.pdf
347
+ - data/mbxif/mbxif-logos.pdf
348
+ - data/mbxif/mbxif-logos_caeif.svg
349
+ - data/mbxif/mbxif-logos_caxif.svg
350
+ - data/mbxif/mbxif-logos_ewisif.svg
351
+ - data/mbxif/mbxif-logos_jtif.svg
352
+ - data/mbxif/mbxif-logos_lotar.svg
353
+ - data/mbxif/mbxif-logos_mbxif.svg
354
+ - data/mbxif/mbxif-logos_pdmif.svg
355
+ - data/mbxif/mbxif.xsl
342
356
  - data/pdfa/config.yaml
343
357
  - data/pdfa/copyright-de.adoc
344
358
  - data/pdfa/copyright.adoc
@@ -353,16 +367,23 @@ files:
353
367
  - data/swf/config.yaml
354
368
  - data/swf/copyright.adoc
355
369
  - data/swf/i18n.yaml
370
+ - data/swf/swf-back-cover.pdf
371
+ - data/swf/swf-front-cover.pdf
356
372
  - data/swf/swf-full.svg
357
373
  - data/swf/swf-icon.svg
374
+ - data/swf/swf-logo-with-graphic.svg
358
375
  - data/swf/swf-logo.pdf
376
+ - data/swf/swf-logo.svg
377
+ - data/swf/swf.xsl
359
378
  - lib/metanorma-taste.rb
360
379
  - lib/metanorma/taste.rb
361
380
  - lib/metanorma/taste/base.rb
362
381
  - lib/metanorma/taste/base_override.rb
363
382
  - lib/metanorma/taste/doctype_config.rb
383
+ - lib/metanorma/taste/filename_attributes.rb
364
384
  - lib/metanorma/taste/stage_config.rb
365
385
  - lib/metanorma/taste/taste_config.rb
386
+ - lib/metanorma/taste/value_attributes.rb
366
387
  - lib/metanorma/taste/version.rb
367
388
  - lib/metanorma/taste_register.rb
368
389
  - metanorma-taste.gemspec