asciidoctor-gb 0.1.5 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.tb.yml +20 -10
  3. data/LICENSE +25 -0
  4. data/README.adoc +262 -34
  5. data/asciidoctor-gb.gemspec +2 -1
  6. data/bin/rspec +18 -0
  7. data/lib/asciidoctor/gb/biblio.rng +602 -0
  8. data/lib/asciidoctor/gb/converter.rb +104 -70
  9. data/lib/asciidoctor/gb/front.rb +109 -61
  10. data/lib/asciidoctor/gb/gbstandard.rng +135 -31
  11. data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.gif +0 -0
  12. data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.png +0 -0
  13. data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.svg +980 -0
  14. data/lib/asciidoctor/gb/html/{gb.css → gb.scss} +133 -219
  15. data/lib/asciidoctor/gb/html/html_gb_intro.html +1 -37
  16. data/lib/asciidoctor/gb/html/html_gb_titlepage.html +6 -5
  17. data/lib/asciidoctor/gb/html/{htmlstyle.css → htmlstyle.scss} +85 -3
  18. data/lib/asciidoctor/gb/html/word_gb_intro.html +1 -1
  19. data/lib/asciidoctor/gb/html/word_gb_titlepage.html +320 -166
  20. data/lib/asciidoctor/gb/html/{wordstyle.css → wordstyle.scss} +605 -429
  21. data/lib/asciidoctor/gb/isodoc.rng +36 -564
  22. data/lib/asciidoctor/gb/isostandard.rng +198 -91
  23. data/lib/asciidoctor/gb/section_input.rb +21 -56
  24. data/lib/asciidoctor/gb/validate.rb +115 -0
  25. data/lib/asciidoctor/gb/version.rb +1 -1
  26. data/lib/asciidoctor-gb.rb +2 -1
  27. data/lib/isodoc/gb/agencies.rb +327 -0
  28. data/lib/isodoc/gb/block_output.rb +86 -0
  29. data/lib/isodoc/gb/gbcleanup.rb +87 -0
  30. data/lib/isodoc/gb/gbconvert.rb +153 -0
  31. data/lib/isodoc/gb/gbwordconvert.rb +89 -0
  32. data/lib/isodoc/gb/html/blank.png +0 -0
  33. data/lib/isodoc/gb/html/footer.png +0 -0
  34. data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.gif +0 -0
  35. data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.png +0 -0
  36. data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.svg +980 -0
  37. data/lib/isodoc/gb/html/gb-logos/gb-standard-db.gif +0 -0
  38. data/lib/isodoc/gb/html/gb-logos/gb-standard-db.png +0 -0
  39. data/lib/isodoc/gb/html/gb-logos/gb-standard-db.svg +1 -0
  40. data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.gif +0 -0
  41. data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.png +0 -0
  42. data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.svg +1 -0
  43. data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.gif +0 -0
  44. data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.png +0 -0
  45. data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.svg +1 -0
  46. data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.gif +0 -0
  47. data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.png +0 -0
  48. data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.svg +1 -0
  49. data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.gif +0 -0
  50. data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.png +0 -0
  51. data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.svg +1 -0
  52. data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.gif +0 -0
  53. data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.png +0 -0
  54. data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.svg +13 -0
  55. data/lib/isodoc/gb/html/gb.scss +556 -0
  56. data/lib/isodoc/gb/html/header.html +216 -0
  57. data/lib/isodoc/gb/html/html_gb_intro.html +9 -0
  58. data/lib/isodoc/gb/html/html_gb_titlepage.html +99 -0
  59. data/lib/isodoc/gb/html/htmlstyle.scss +269 -0
  60. data/lib/isodoc/gb/html/logo.png +0 -0
  61. data/lib/isodoc/gb/html/scripts.html +71 -0
  62. data/lib/isodoc/gb/html/word_gb_intro.html +3 -0
  63. data/lib/isodoc/gb/html/word_gb_titlepage.html +388 -0
  64. data/lib/isodoc/gb/html/wordstyle.scss +2543 -0
  65. data/lib/isodoc/gb/i18n-en.yaml +12 -0
  66. data/lib/isodoc/gb/i18n-zh-Hans.yaml +12 -0
  67. data/lib/isodoc/gb/i18n.rb +20 -0
  68. data/lib/isodoc/gb/metadata.rb +216 -0
  69. data/lib/{asciidoctor → isodoc}/gb/section_output.rb +22 -4
  70. data/lib/isodoc/gb/xref_gen.rb +17 -0
  71. metadata +75 -15
  72. data/lib/asciidoctor/gb/agencies.rb +0 -186
  73. data/lib/asciidoctor/gb/gbconvert.rb +0 -86
  74. data/lib/asciidoctor/gb/metadata.rb +0 -186
  75. data/lib/asciidoctor/gb/xref_gen.rb +0 -25
@@ -1,25 +0,0 @@
1
- require "isodoc"
2
-
3
- module Asciidoctor
4
- module Gb
5
- # A {Converter} implementation that generates GB output, and a document
6
- # schema encapsulation of the document for validation
7
- class GbConvert < IsoDoc::Convert
8
- def format_ref(ref, isopub)
9
- return "ISO #{ref}" if isopub
10
- return "[#{ref}]" if /^\d+$/.match?(ref) && !/^\[.*\]$/.match?(ref)
11
- ref
12
- end
13
-
14
- def reference_names(ref)
15
- isopub = ref.at(ns(ISO_PUBLISHER_XPATH))
16
- docid = ref.at(ns("./docidentifier"))
17
- return ref_names(ref) unless docid
18
- date = ref.at(ns("./date[@type = 'published']"))
19
- reference = format_ref(docid.text, isopub)
20
- reference += ": #{date.text}" if date && isopub
21
- @anchors[ref["id"]] = { xref: reference }
22
- end
23
- end
24
- end
25
- end