reverse_adoc 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/README.adoc +4 -294
  4. data/Rakefile +2 -13
  5. data/reverse_adoc.gemspec +2 -20
  6. metadata +5 -246
  7. data/.editorconfig +0 -15
  8. data/.github/workflows/rake.yml +0 -15
  9. data/.gitignore +0 -10
  10. data/.hound.yml +0 -5
  11. data/.rubocop.yml +0 -10
  12. data/LICENSE.txt +0 -25
  13. data/exe/reverse_adoc +0 -70
  14. data/exe/w2a +0 -72
  15. data/lib/reverse_adoc/cleaner.rb +0 -113
  16. data/lib/reverse_adoc/config.rb +0 -54
  17. data/lib/reverse_adoc/converters/a.rb +0 -42
  18. data/lib/reverse_adoc/converters/aside.rb +0 -16
  19. data/lib/reverse_adoc/converters/audio.rb +0 -29
  20. data/lib/reverse_adoc/converters/base.rb +0 -100
  21. data/lib/reverse_adoc/converters/blockquote.rb +0 -27
  22. data/lib/reverse_adoc/converters/br.rb +0 -15
  23. data/lib/reverse_adoc/converters/bypass.rb +0 -81
  24. data/lib/reverse_adoc/converters/code.rb +0 -56
  25. data/lib/reverse_adoc/converters/div.rb +0 -18
  26. data/lib/reverse_adoc/converters/drop.rb +0 -22
  27. data/lib/reverse_adoc/converters/em.rb +0 -55
  28. data/lib/reverse_adoc/converters/figure.rb +0 -25
  29. data/lib/reverse_adoc/converters/h.rb +0 -42
  30. data/lib/reverse_adoc/converters/head.rb +0 -23
  31. data/lib/reverse_adoc/converters/hr.rb +0 -15
  32. data/lib/reverse_adoc/converters/ignore.rb +0 -16
  33. data/lib/reverse_adoc/converters/img.rb +0 -93
  34. data/lib/reverse_adoc/converters/li.rb +0 -17
  35. data/lib/reverse_adoc/converters/mark.rb +0 -21
  36. data/lib/reverse_adoc/converters/math.rb +0 -31
  37. data/lib/reverse_adoc/converters/ol.rb +0 -64
  38. data/lib/reverse_adoc/converters/p.rb +0 -23
  39. data/lib/reverse_adoc/converters/pass_through.rb +0 -13
  40. data/lib/reverse_adoc/converters/pre.rb +0 -55
  41. data/lib/reverse_adoc/converters/q.rb +0 -16
  42. data/lib/reverse_adoc/converters/strong.rb +0 -52
  43. data/lib/reverse_adoc/converters/sub.rb +0 -16
  44. data/lib/reverse_adoc/converters/sup.rb +0 -16
  45. data/lib/reverse_adoc/converters/table.rb +0 -69
  46. data/lib/reverse_adoc/converters/td.rb +0 -83
  47. data/lib/reverse_adoc/converters/text.rb +0 -65
  48. data/lib/reverse_adoc/converters/th.rb +0 -14
  49. data/lib/reverse_adoc/converters/tr.rb +0 -22
  50. data/lib/reverse_adoc/converters/video.rb +0 -29
  51. data/lib/reverse_adoc/converters.rb +0 -32
  52. data/lib/reverse_adoc/errors.rb +0 -10
  53. data/lib/reverse_adoc/html_converter.rb +0 -61
  54. data/lib/reverse_adoc/version.rb +0 -3
  55. data/lib/reverse_adoc.rb +0 -27
  56. data/spec/assets/anchors.html +0 -30
  57. data/spec/assets/basic.html +0 -61
  58. data/spec/assets/code.html +0 -22
  59. data/spec/assets/escapables.html +0 -17
  60. data/spec/assets/external_images.docx +0 -0
  61. data/spec/assets/external_images.html +0 -35
  62. data/spec/assets/from_the_wild.html +0 -23
  63. data/spec/assets/full_example.html +0 -49
  64. data/spec/assets/html_fragment.html +0 -3
  65. data/spec/assets/lists.html +0 -137
  66. data/spec/assets/minimum.html +0 -4
  67. data/spec/assets/paragraphs.html +0 -24
  68. data/spec/assets/quotation.html +0 -12
  69. data/spec/assets/tables.html +0 -99
  70. data/spec/assets/unknown_tags.html +0 -9
  71. data/spec/bin/reverse_adoc_spec.rb +0 -33
  72. data/spec/bin/w2a_spec.rb +0 -35
  73. data/spec/components/anchors_spec.rb +0 -32
  74. data/spec/components/basic_spec.rb +0 -63
  75. data/spec/components/code_spec.rb +0 -25
  76. data/spec/components/escapables_spec.rb +0 -30
  77. data/spec/components/from_the_wild_spec.rb +0 -15
  78. data/spec/components/html_fragment_spec.rb +0 -9
  79. data/spec/components/lists_spec.rb +0 -90
  80. data/spec/components/paragraphs_spec.rb +0 -14
  81. data/spec/components/quotation_spec.rb +0 -12
  82. data/spec/components/tables_spec.rb +0 -42
  83. data/spec/components/unknown_tags_spec.rb +0 -41
  84. data/spec/lib/reverse_adoc/cleaner_spec.rb +0 -180
  85. data/spec/lib/reverse_adoc/config_spec.rb +0 -25
  86. data/spec/lib/reverse_adoc/converters/aside_spec.rb +0 -11
  87. data/spec/lib/reverse_adoc/converters/audio_spec.rb +0 -15
  88. data/spec/lib/reverse_adoc/converters/blockquote_spec.rb +0 -23
  89. data/spec/lib/reverse_adoc/converters/br_spec.rb +0 -9
  90. data/spec/lib/reverse_adoc/converters/code_spec.rb +0 -15
  91. data/spec/lib/reverse_adoc/converters/div_spec.rb +0 -15
  92. data/spec/lib/reverse_adoc/converters/figure_spec.rb +0 -10
  93. data/spec/lib/reverse_adoc/converters/img_spec.rb +0 -25
  94. data/spec/lib/reverse_adoc/converters/li_spec.rb +0 -11
  95. data/spec/lib/reverse_adoc/converters/mark_spec.rb +0 -10
  96. data/spec/lib/reverse_adoc/converters/p_spec.rb +0 -10
  97. data/spec/lib/reverse_adoc/converters/pre_spec.rb +0 -43
  98. data/spec/lib/reverse_adoc/converters/q_spec.rb +0 -10
  99. data/spec/lib/reverse_adoc/converters/strong_spec.rb +0 -21
  100. data/spec/lib/reverse_adoc/converters/text_spec.rb +0 -67
  101. data/spec/lib/reverse_adoc/converters/video_spec.rb +0 -15
  102. data/spec/lib/reverse_adoc/converters_spec.rb +0 -22
  103. data/spec/lib/reverse_adoc.rb +0 -90
  104. data/spec/spec_helper.rb +0 -25
  105. data/spec/support/shell_helpers.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69ca642594cadc268f47a51d4d9fc10852d7f0e51f2987ecb7839702187f345a
4
- data.tar.gz: 7e0ca6f3c222616d8fc1d0d4b94853a97abb9b310418aa531e2c4abde3ce1a39
3
+ metadata.gz: 25f2be20e5e84e1d83ff78423485e7d6d25df90fcb1df1550c45d1cb416bdca4
4
+ data.tar.gz: 4c188639d798097fb0dcd95b9af46c9c533db118d64a1ee814e76d51d38852f4
5
5
  SHA512:
6
- metadata.gz: a625dfb2610efafebcb38b8427a2f414b8358c0261a463627f60190e3cb45d18f643b1e29c62135c9a76d402db380189bea234e82af3d658871f3ce2f56c6655
7
- data.tar.gz: 9076811a8e823ab0b52c4565b1bd8996931721b59d84b603494ab0fe475bc72a9f35f6e585722f6afbb535b945d6abe1c8fdf097c7ef97ac181335b8a1157137
6
+ metadata.gz: f0121371a32bb3a2aff6b19c2d37f7d42f1b337fdda426c98f9bd431e563482eeebfb06cb3432aa3333eb4bec67f8eedc3c77762dcd80f9f75756d78d5439d35
7
+ data.tar.gz: 0e2d79f8cb7021857d09ff84066d6a2aacd44288feb42524538051fa4e5f15cef6418278271aa716d5da7a227f2a57d050502d8e7d43eddccfe54413a4c1da57
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
3
+ source "https://rubygems.org"
4
4
 
5
- # Specify your gem's dependencies in reverse_adoc.gemspec
6
5
  gemspec
6
+ gem "rake"
data/README.adoc CHANGED
@@ -1,296 +1,6 @@
1
- = AsciiDoc from HTML and Microsoft Word: reverse_adoc
1
+ # AsciiDoc from HTML and Microsoft Word: reverse_adoc
2
2
 
3
- https://github.com/metanorma/reverse_adoc[reverse_adoc] image:https://img.shields.io/gem/v/reverse_adoc.svg["Gem Version", link="https://rubygems.org/gems/reverse_adoc"]::
4
- image:https://github.com/metanorma/reverse_adoc/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/reverse_adoc/actions?workflow=rake"]
5
- image:https://codeclimate.com/github/metanorma/reverse_adoc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/reverse_adoc"]
6
- image:https://img.shields.io/github/issues-pr-raw/metanorma/reverse_adoc.svg["Pull Requests", link="https://github.com/metanorma/reverse_adoc/pulls"]
7
- image:https://img.shields.io/github/commits-since/metanorma/reverse_adoc/latest.svg["Commits since latest",link="https://github.com/metanorma/reverse_adoc/releases"]
8
-
9
- == Purpose
10
-
11
- Transforms HTML and Microsoft Word into AsciiDoc.
12
-
13
- Based on https://github.com/xijo/reverse_markdown
14
-
15
-
16
- == Installation
17
-
18
- Install the gem:
19
-
20
- [source,console]
21
- ----
22
- [sudo] gem install reverse_adoc
23
- ----
24
-
25
- or add it to your `Gemfile`:
26
-
27
- [source,ruby]
28
- ----
29
- gem 'reverse_adoc'
30
- ----
31
-
32
-
33
- == Command-line usage
34
-
35
- === HTML to AsciiDoc: `reverse_adoc`
36
-
37
- Convert HTML files to AsciiDoc:
38
-
39
- [source,console]
40
- ----
41
- $ reverse_adoc file.html > file.adoc
42
- $ cat file.html | reverse_adoc > file.adoc
43
- ----
44
-
45
-
46
- === Microsoft Word to AsciiDoc: `w2a`
47
-
48
- Convert Word `.doc` or `.docx` files to AsciiDoc:
49
-
50
- [source,console]
51
- ----
52
- $ w2a file.docx > file.adoc
53
- ----
54
-
55
- [source,console]
56
- ----
57
- $ w2a input.docx -o output.adoc
58
- ----
59
-
60
- Help:
61
-
62
- [source,console]
63
- ----
64
- $ w2a -h
65
- Usage: w2a [options] <file>
66
- -a, --mathml2asciimath Convert MathML to AsciiMath
67
- -o, --output=FILENAME Output file to write to
68
- -e, --external-images Export images if data URI
69
- -v, --version Version information
70
- -h, --help Prints this help
71
- ----
72
-
73
-
74
- NOTE: `w2a` requires LibreOffice to be installed. It uses LibreOffice's
75
- export to XHTML. LibreOffice's export of XHTML is superior to the native Microsoft Word export
76
- to HTML: it exports lists (which Word keeps as paragraphs), and it exports OOMML into MathML.
77
- On the other hand, the LibreOffice export relies on default styling being used in the
78
- document, and it may not cope with ordered lists or headings with customised appearance.
79
- For best results, reset the styles in the document you're converting to those in
80
- the default `Normal.dot` template.
81
-
82
- NOTE: `w2a` requires the command-line version of LibreOffice, `soffice`. As it turns out,
83
- LibreOffice v6 appears to render formulae in HTML as images instead of MathML expressions;
84
- use LibreOffice v5. If you have both LibreOffice v5 and LibreOffice v6 installed, make sure
85
- that your OS path searches for the LibreOffice v5 version of `soffice` first; e.g. on Mac,
86
- include something like `/Applications/LibreOffice5.4.7.2.app/Contents/MacOS` in your PATH
87
- environment.
88
-
89
- NOTE: Some information in OOMML is not preserved in the export to MathML from LibreOffice;
90
- in particular, font shifts such as double-struck fonts.
91
- The LibreOffice exporter does seem to drop some text (possibly associated with
92
- MathML); use with caution.
93
-
94
- NOTE: Adapted from `w2m` of
95
- https://github.com/benbalter/word-to-markdown[Ben Balter's word-to-markdown]
96
-
97
-
98
- === Common options
99
-
100
-
101
- ==== MathML to AsciiMath conversion
102
-
103
- If you wish to convert the MathML in the document to AsciiMath, run the script with the
104
- `--mathml2asciimath` option:
105
-
106
- [source,console]
107
- ----
108
- $ w2a --mathml2asciimath document.docx > document.adoc
109
- ----
110
-
111
-
112
- ==== Extracting images
113
-
114
- Images referred by the HTML can be extracted into the destination output folder by using:
115
-
116
- [source,console]
117
- ----
118
- $ reverse_adoc input.docx -o output/file.adoc -e
119
- $ reverse_adoc input.docx --output output/file.adoc --external-images
120
- ----
121
-
122
-
123
- Word embedded images can be extracted into the destination output folder by using:
124
-
125
- [source,console]
126
- ----
127
- $ w2a input.docx -o output/file.adoc -e
128
- $ w2a input.docx --output output/file.adoc --external-images
129
- ----
130
-
131
-
132
- ==== Handling unknown HTML tags
133
-
134
- The `--unknown_tags` option allows you to specify how to handle unknown tags
135
- (default `pass_through`).
136
-
137
- Valid options are:
138
-
139
- * `pass_through` - Include the unknown tag completely into the result
140
- * `drop` - Drop the unknown tag and its content
141
- * `bypass` - Ignore the unknown tag but try to convert its content
142
- * `raise` - Raise an error to let you know
143
-
144
-
145
- ==== Tagging of borders
146
-
147
- Specify how to handle tag borders with the option `--tag_border` (default `' '`).
148
-
149
- Valid options are:
150
-
151
- * `' '` - Add whitespace if there is none at tag borders.
152
- * `''` - Do not not add whitespace.
153
-
154
-
155
- == Features
156
-
157
- === General
158
-
159
- `reverse_adoc` shares features as a port of `reverse_markdown`:
160
-
161
- * Module based -- if you miss a tag, just add it
162
- * Can deal with nested lists
163
- * Inline and block code is supported
164
- * Supports blockquote
165
-
166
- It supports the following HTML tags (these are supported by `reverse_markdown`):
167
-
168
- * `a`
169
- * `blockquote`
170
- * `br`
171
- * `code`, `tt` (added: `kbd`, `samp`, `var`)
172
- * `div`, `article`
173
- * `em`, `i` (added: `cite`)
174
- * `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `hr`
175
- * `img`
176
- * `li`, `ol`, `ul` (added: `dir`)
177
- * `p`, `pre`
178
- * `strong`, `b`
179
- * `table`, `td`, `th`, `tr`
180
-
181
- [NOTE]
182
- ====
183
- * reverse_adoc does *not* support `del` or `strike`, because Asciidoctor does not out of the box.
184
- * As with reverse_markdown, `pre` is only treated as sourcecode if it is contained in a `div@class = highlight-` element, or has a `@brush` attribute naming the language (Confluence).
185
- * The gem does not support `p@align`, because Asciidoctor doesn't
186
- ====
187
-
188
- In addition, it supports:
189
-
190
- * `aside`
191
- * `audio`, `video` (with `@src` attributes)
192
- * `figure`, `figcaption`
193
- * `mark`
194
- * `q`
195
- * `sub`, `sup`
196
- * `@id` anchors
197
- * `blockquote@cite`
198
- * `img/@width`, `img/@height`
199
- * `ol/@style`, `ol/@start`, `ol/@reversed`, `ul/@type`
200
- * `td/@colspan`, `td/@rowspan`, `td@/align`, `td@/valign`
201
- * `table/caption`, `table/@width`, `table/@frame` (partial), `table/@rules` (partial)
202
- * Lists and paragraphs within cells
203
- ** Not tables within cells: Asciidoctor cannot deal with nested tables
204
-
205
- The gem does not support:
206
-
207
- * `col`, `colgroup`
208
- * `source`, `picture`
209
- * `bdi`, `bdo`, `ruby`, `rt`, `rp`, `wbr`
210
- * `frame`, `frameset`, `iframe`, `noframes`, `noscript`, `script`, `input`, `output`, `progress`
211
- * `map`, `canvas`, `dialog`, `embed`, `object`, `param`, `svg`, `track`
212
- * `fieldset`, `button`, `datalist`, `form`, `label`, `legend`, `menu`, `menulist`, `optgroup`, `option`, `select`, `textarea`
213
- * `big`, `dfn`, `font`, `s`, `small`, `span`, `strike`, `u`
214
- * `center`
215
- * `data`, `meter`
216
- * `del`, `ins`
217
- * `footer`, `header`, `main`, `nav`, `details`, `section`, `summary`, `template`
218
-
219
-
220
- === MathML support
221
-
222
- If you are using this gem in the context of https://www.metanorma.com[Metanorma],
223
- Metanorma AsciiDoc accepts MathML as a native mathematical format. So you do not need
224
- to convert the MathML to AsciiMath.
225
-
226
- The gem will optionally invoke the https://github.com/metanorma/mathml2asciimath
227
- gem, to convert MathML to AsciiMath. The conversion is not perfect, and will need to be
228
- post-edited; but it's a lot better than nothing.
229
-
230
- NOTE: Asciidoctor does not support MathML input. HTML uses MathML.
231
- The gem will recognize MathML expressions in HTML, and will wrap them in Asciidoctor
232
- `stem:[ ]` macros. The result of this gem is not actually legal Asciidoctor for `stem`:
233
- Asciidoctor will presumably
234
- think this is AsciiMath in the `stem:[ ]` macro, try to pass it into MathJax as
235
- AsciiMath, and fail. But of course, MathJax has no problem with MathML, and some postprocessing
236
- on the Asciidoctor output can ensure that the MathML is treated by MathJax (or whatever else
237
- uses the output) as such; so this is still much better than nothing for stem processing.
238
-
239
- === Word cleanup
240
-
241
- This gem is routinely used in the Metanorma project to export Word documents to AsciiDoc.
242
- The HTML export from Word that the gem uses, from LibreOffice, is much cleaner than the
243
- native HTML 4 export from Word; but it has some infelicities which this gem cleans up:
244
-
245
- * The HTML export has trouble with subscripts, and routinely exports them as headings; the `w2a`
246
- script tries to clean them up.
247
- * The `w2a` cleans up spaces, but it does not strip them.
248
- * Spaces are removed from anchors and cross-references.
249
- * Double underscores are removed from anchors and cross-references.
250
- * Cross-references to `_GoBack` and to `_Toc` followed by numbers (used to construct tables of contents) are ignored.
251
-
252
- == Ruby library usage
253
-
254
- === General
255
-
256
- Simple to use.
257
-
258
- [source,ruby]
259
- ----
260
- result = ReverseAdoc.convert input
261
- result.inspect # " *feelings* "
262
- ----
263
-
264
- === Configure with options
265
-
266
- Just pass your chosen configuration options in after the input. The given options will last for this operation only.
267
-
268
- [source,ruby]
269
- ----
270
- ReverseAdoc.convert(input, unknown_tags: :raise, mathml2asciimath: true)
271
- ----
272
-
273
-
274
- === Preconfigure using an initializer
275
-
276
- Or configure it block style on a initializer level. These configurations will last for all conversions until they are set to something different.
277
-
278
- [source,ruby]
279
- ----
280
- ReverseAdoc.config do |config|
281
- config.unknown_tags = :bypass
282
- config.mathml2asciimath = true
283
- config.tag_border = ''
284
- end
285
- ----
286
-
287
-
288
- == Related stuff
289
-
290
- * https://github.com/xijo/reverse_markdown[Xijo's original reverse_markdown gem]
291
- * https://github.com/xijo/reverse_markdown/wiki/Write-your-own-converter[Write custom converters] - Wiki entry about how to write your own converter
292
- * https://github.com/harlantwood/html_massage[html_massage] - A gem by Harlan T. Wood to convert regular sites into markdown using reverse_markdown
293
- * https://github.com/benbalter/word-to-markdown[word-to-markdown] - Convert word docs into markdown while using reverse_markdown, by Ben Balter
294
- * https://github.com/asciidocfx/HtmlToAsciidoc[HtmlToAsciidoc] - Javascript regexp-based converter of HTML to Asciidoctor
295
- * https://asciidoctor.org/docs/user-manual/[The Asciidoctor User Manual]
3
+ This repository has been merged into Coradoc. See:
296
4
 
5
+ * https://github.com/metanorma/coradoc/
6
+ * https://github.com/metanorma/coradoc/tree/main/lib/coradoc/reverse_adoc
data/Rakefile CHANGED
@@ -1,14 +1,3 @@
1
- require "bundler/gem_tasks"
2
-
3
- if File.exist?(".codeclimate")
4
- ENV["CODECLIMATE_REPO_TOKEN"] = File.read(".codeclimate").strip
5
- end
1
+ # frozen_string_literal: true
6
2
 
7
- require "rspec/core/rake_task"
8
- RSpec::Core::RakeTask.new(:spec)
9
- task default: :spec
10
-
11
- desc "Open an irb session preloaded with this library"
12
- task :console do
13
- sh "irb -rubygems -I lib -r reverse_adoc.rb"
14
- end
3
+ require "bundler/gem_tasks"
data/reverse_adoc.gemspec CHANGED
@@ -1,11 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
- $:.push File.expand_path("lib", __dir__)
4
- require "reverse_adoc/version"
5
-
6
3
  Gem::Specification.new do |s|
7
4
  s.name = "reverse_adoc"
8
- s.version = ReverseAdoc::VERSION
5
+ s.version = "2.0.0"
9
6
  s.authors = ["Ribose Inc."]
10
7
  s.email = ["open.source@ribose.com"]
11
8
 
@@ -23,20 +20,5 @@ Gem::Specification.new do |s|
23
20
  s.require_paths = ["lib"]
24
21
  s.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
25
22
 
26
- # specify any dependencies here; for example:
27
- s.add_dependency "coradoc", "~> 0.2"
28
- s.add_dependency "marcel", "~> 1.0.0"
29
- s.add_dependency "mathml2asciimath"
30
- s.add_dependency "nokogiri", "~> 1.13"
31
- s.add_development_dependency "codeclimate-test-reporter"
32
- s.add_development_dependency "rake"
33
- s.add_development_dependency "redcarpet"
34
- s.add_development_dependency "rspec"
35
- s.add_development_dependency "simplecov"
36
-
37
- # spec.add_runtime_dependency "thor"
38
-
39
- # All the following are for bin/w2m
40
- s.add_dependency "premailer", "~> 1.11.0"
41
- s.add_dependency "word-to-markdown"
23
+ s.add_dependency "coradoc", ">= 0.3"
42
24
  end
metadata CHANGED
@@ -1,282 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reverse_adoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.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: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2024-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coradoc
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.2'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.2'
27
- - !ruby/object:Gem::Dependency
28
- name: marcel
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 1.0.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 1.0.0
41
- - !ruby/object:Gem::Dependency
42
- name: mathml2asciimath
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: nokogiri
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.13'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.13'
69
- - !ruby/object:Gem::Dependency
70
- name: codeclimate-test-reporter
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
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: redcarpet
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: simplecov
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: premailer
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 1.11.0
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 1.11.0
153
- - !ruby/object:Gem::Dependency
154
- name: word-to-markdown
155
15
  requirement: !ruby/object:Gem::Requirement
156
16
  requirements:
157
17
  - - ">="
158
18
  - !ruby/object:Gem::Version
159
- version: '0'
19
+ version: '0.3'
160
20
  type: :runtime
161
21
  prerelease: false
162
22
  version_requirements: !ruby/object:Gem::Requirement
163
23
  requirements:
164
24
  - - ">="
165
25
  - !ruby/object:Gem::Version
166
- version: '0'
26
+ version: '0.3'
167
27
  description: Generate AsciiDoc from HTML and Microsoft Word via CLI or library.
168
28
  email:
169
29
  - open.source@ribose.com
170
- executables:
171
- - reverse_adoc
172
- - w2a
30
+ executables: []
173
31
  extensions: []
174
32
  extra_rdoc_files: []
175
33
  files:
176
- - ".editorconfig"
177
- - ".github/workflows/rake.yml"
178
34
  - ".github/workflows/release.yml"
179
- - ".gitignore"
180
- - ".hound.yml"
181
- - ".rubocop.yml"
182
35
  - Gemfile
183
- - LICENSE.txt
184
36
  - README.adoc
185
37
  - Rakefile
186
- - exe/reverse_adoc
187
- - exe/w2a
188
- - lib/reverse_adoc.rb
189
- - lib/reverse_adoc/cleaner.rb
190
- - lib/reverse_adoc/config.rb
191
- - lib/reverse_adoc/converters.rb
192
- - lib/reverse_adoc/converters/a.rb
193
- - lib/reverse_adoc/converters/aside.rb
194
- - lib/reverse_adoc/converters/audio.rb
195
- - lib/reverse_adoc/converters/base.rb
196
- - lib/reverse_adoc/converters/blockquote.rb
197
- - lib/reverse_adoc/converters/br.rb
198
- - lib/reverse_adoc/converters/bypass.rb
199
- - lib/reverse_adoc/converters/code.rb
200
- - lib/reverse_adoc/converters/div.rb
201
- - lib/reverse_adoc/converters/drop.rb
202
- - lib/reverse_adoc/converters/em.rb
203
- - lib/reverse_adoc/converters/figure.rb
204
- - lib/reverse_adoc/converters/h.rb
205
- - lib/reverse_adoc/converters/head.rb
206
- - lib/reverse_adoc/converters/hr.rb
207
- - lib/reverse_adoc/converters/ignore.rb
208
- - lib/reverse_adoc/converters/img.rb
209
- - lib/reverse_adoc/converters/li.rb
210
- - lib/reverse_adoc/converters/mark.rb
211
- - lib/reverse_adoc/converters/math.rb
212
- - lib/reverse_adoc/converters/ol.rb
213
- - lib/reverse_adoc/converters/p.rb
214
- - lib/reverse_adoc/converters/pass_through.rb
215
- - lib/reverse_adoc/converters/pre.rb
216
- - lib/reverse_adoc/converters/q.rb
217
- - lib/reverse_adoc/converters/strong.rb
218
- - lib/reverse_adoc/converters/sub.rb
219
- - lib/reverse_adoc/converters/sup.rb
220
- - lib/reverse_adoc/converters/table.rb
221
- - lib/reverse_adoc/converters/td.rb
222
- - lib/reverse_adoc/converters/text.rb
223
- - lib/reverse_adoc/converters/th.rb
224
- - lib/reverse_adoc/converters/tr.rb
225
- - lib/reverse_adoc/converters/video.rb
226
- - lib/reverse_adoc/errors.rb
227
- - lib/reverse_adoc/html_converter.rb
228
- - lib/reverse_adoc/version.rb
229
38
  - reverse_adoc.gemspec
230
- - spec/assets/anchors.html
231
- - spec/assets/basic.html
232
- - spec/assets/code.html
233
- - spec/assets/escapables.html
234
- - spec/assets/external_images.docx
235
- - spec/assets/external_images.html
236
- - spec/assets/from_the_wild.html
237
- - spec/assets/full_example.html
238
- - spec/assets/html_fragment.html
239
- - spec/assets/lists.html
240
- - spec/assets/minimum.html
241
- - spec/assets/paragraphs.html
242
- - spec/assets/quotation.html
243
- - spec/assets/tables.html
244
- - spec/assets/unknown_tags.html
245
- - spec/bin/reverse_adoc_spec.rb
246
- - spec/bin/w2a_spec.rb
247
- - spec/components/anchors_spec.rb
248
- - spec/components/basic_spec.rb
249
- - spec/components/code_spec.rb
250
- - spec/components/escapables_spec.rb
251
- - spec/components/from_the_wild_spec.rb
252
- - spec/components/html_fragment_spec.rb
253
- - spec/components/lists_spec.rb
254
- - spec/components/paragraphs_spec.rb
255
- - spec/components/quotation_spec.rb
256
- - spec/components/tables_spec.rb
257
- - spec/components/unknown_tags_spec.rb
258
- - spec/lib/reverse_adoc.rb
259
- - spec/lib/reverse_adoc/cleaner_spec.rb
260
- - spec/lib/reverse_adoc/config_spec.rb
261
- - spec/lib/reverse_adoc/converters/aside_spec.rb
262
- - spec/lib/reverse_adoc/converters/audio_spec.rb
263
- - spec/lib/reverse_adoc/converters/blockquote_spec.rb
264
- - spec/lib/reverse_adoc/converters/br_spec.rb
265
- - spec/lib/reverse_adoc/converters/code_spec.rb
266
- - spec/lib/reverse_adoc/converters/div_spec.rb
267
- - spec/lib/reverse_adoc/converters/figure_spec.rb
268
- - spec/lib/reverse_adoc/converters/img_spec.rb
269
- - spec/lib/reverse_adoc/converters/li_spec.rb
270
- - spec/lib/reverse_adoc/converters/mark_spec.rb
271
- - spec/lib/reverse_adoc/converters/p_spec.rb
272
- - spec/lib/reverse_adoc/converters/pre_spec.rb
273
- - spec/lib/reverse_adoc/converters/q_spec.rb
274
- - spec/lib/reverse_adoc/converters/strong_spec.rb
275
- - spec/lib/reverse_adoc/converters/text_spec.rb
276
- - spec/lib/reverse_adoc/converters/video_spec.rb
277
- - spec/lib/reverse_adoc/converters_spec.rb
278
- - spec/spec_helper.rb
279
- - spec/support/shell_helpers.rb
280
39
  homepage: http://github.com/metanorma/reverse_adoc
281
40
  licenses:
282
41
  - BSD-2-Clause
data/.editorconfig DELETED
@@ -1,15 +0,0 @@
1
- # EditorConfig is awesome: http://EditorConfig.org
2
-
3
- # top-most EditorConfig file
4
- root = true
5
-
6
- # Unix-style newlines with a newline ending every file
7
- [*]
8
- charset = utf-8
9
- end_of_line = lf
10
-
11
- [{*.adoc,*.html,*.js,*.json,*.rake,*.rb,*.rf,*.yaml,*.yml,Rakefile,rakefile}]
12
- indent_style = space
13
- indent_size = 2
14
- insert_final_newline = true
15
- trim_trailing_whitespace = true
@@ -1,15 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: rake
4
-
5
- on:
6
- push:
7
- branches: [ master, main ]
8
- tags: [ v* ]
9
- pull_request:
10
-
11
- jobs:
12
- rake:
13
- uses: metanorma/ci/.github/workflows/libreoffice-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}