Closed ReesePlews closed 2 months ago
an update after the release of coradoc, mentioned here:
i edited the Gemfile which now has:
gem "coradoc"
then after doing a bundle update
i checked the info for coradoc
PS E:\github\iso-22726-1> bundle info coradoc
* coradoc (1.1.1)
Summary: AsciiDoc parser for metanorma
Homepage: https://www.metanorma.org
Source Code: https://github.com/metanorma/coradoc
Path: C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1
Reverse Dependencies:
metanorma-plugin-lutaml (0.7.6) depends on coradoc (>= 0)
from the command line (based on the documentation readme): where: infile.html is output from libreoffice (docx file 'save as' HTML).
PS E:\github\iso-22726-1> bundle exec coradoc convert ./conversion/infile.html -o ./conversion/index.adoc C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/cli.rb:24:in `<class:CLI>': undefined method `at_least_one' for class Coradoc::CLI (NoMethodError)
at_least_one :output, :output_format
^^^^^^^^^^^^
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/cli.rb:5:in `<module:Coradoc>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/cli.rb:4:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
from C:/tools/ruby33/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/exe/coradoc:3:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/coradoc:25:in `load'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/coradoc:25:in `<main>'
even tried this (from notes with another conversion a few months back):
PS E:\github\iso-22726-1> bundle exec reverse_adoc --external-images -o ./conversion/index.adoc ./conversion/infile.html
C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/h.rb:9:in `to_coradoc': undefined method `id' for an instance of String (NoMethodError)
id = internal_anchor.first.id
^^^
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/li.rb:6:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/ol.rb:10:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/html_converter.rb:70:in `block (2 levels) in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/html_converter.rb:160:in `track_time'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/html_converter.rb:69:in `block in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/config.rb:47:in `with'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html/html_converter.rb:43:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html.rb:22:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/input/html.rb:44:in `processor_execute'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/converter.rb:73:in `convert'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/lib/coradoc/converter.rb:20:in `call'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/coradoc-1.1.1/exe/reverse_adoc:81:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/reverse_adoc:25:in `load'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/reverse_adoc:25:in `<main>'
PS E:\github\iso-22726-1>
LibreOffice SDI was installed prior to running these test. (thinking that was possibly needed)
any advice on understanding the command line parameters, or how to run this command is most appreciated.
thank you.
Thanks @ReesePlews. Seems like there's a conflict of a version of thor
. I will create a tighter requirement. This likely won't make it work, but should reveal other gem which requires an earlier thor
version.
@ReesePlews Can you move to the git version and retry? We need to check which gem's dependencies will need updating.
thanks @hmdne here is some information
Gemfile is now set back to:
gem "coradoc", git: "https://github.com/metanorma/coradoc"
bundle install
ran correctly, but bundle update
did not run cleanly. the follow errors are from bundle update
:
PS E:\github\iso-22726-1> bundle update
Fetching https://github.com/metanorma/coradoc
Fetching https://github.com/metanorma/isodoc
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Could not find compatible versions
Because metanorma-cli >= 1.10.0 depends on metanorma ~> 2.0.0
and metanorma-cli >= 1.9.2, < 1.10.0 depends on metanorma ~> 1.7.1,
metanorma-cli >= 1.9.2 requires metanorma ~> 1.7.1 OR ~> 2.0.0.
And because metanorma-cli >= 1.9.0, < 1.9.2 depends on metanorma ~> 1.7.0,
metanorma-cli >= 1.9.0 requires metanorma >= 1.7.0, < 1.8.A OR ~> 2.0.0.
(1) So, because metanorma-cli >= 1.8.0, < 1.9.0 depends on metanorma ~> 1.6.0
and metanorma-cli >= 1.6.2.pre, < 1.8.0 depends on metanorma ~> 1.5.0,
metanorma-cli >= 1.6.2.pre requires metanorma ~> 1.5.0 OR ~> 1.6.0 OR >=
1.7.0, < 1.8.A OR ~> 2.0.0.
Because metanorma-standoc >= 1.4.2, < 1.5.2 depends on relaton ~> 1.2.0
and metanorma-standoc >= 1.4.0, < 1.4.2 depends on relaton ~> 1.1.0,
metanorma-standoc >= 1.4.0, < 1.5.2 requires relaton ~> 1.1.0 OR ~> 1.2.0.
And because every version of relaton-cli depends on relaton ~> 1.19.2
and metanorma-cli >= 1.2.10.1 depends on relaton-cli >= 0.8.2,
metanorma-standoc >= 1.4.0, < 1.5.2 is incompatible with metanorma-cli >=
1.2.10.1.
And because metanorma-cli >= 1.2.13, < 1.3.4 depends on metanorma-standoc ~>
1.4.0
and metanorma-cli < 1.0.0 depends on asciidoctor-rsd >= 0.3.0,
metanorma-cli < 1.0.0 OR >= 1.2.13, < 1.3.4 requires asciidoctor-rsd >=
0.3.0.
And because asciidoctor-rsd >= 0.2.4 depends on asciidoctor ~> 1.5.7
and metanorma-cli >= 1.5.0pre, < 1.6.2.pre depends on metanorma ~> 1.4.0,
metanorma-cli < 1.0.0 OR >= 1.2.13, < 1.3.4 OR >= 1.5.0pre, < 1.6.2.pre
requires asciidoctor ~> 1.5.7 or metanorma ~> 1.4.0.
And because metanorma-cli >= 1.4.7.1pre, < 1.5.0pre depends on metanorma ~>
1.3.0
and metanorma-utils >= 1.2.9 depends on asciidoctor >= 2,
if metanorma-cli < 1.0.0 OR >= 1.2.13, < 1.3.4 OR >= 1.4.7.1pre, <
1.6.2.pre and metanorma-utils >= 1.2.9 then metanorma ~> 1.3.0 OR ~> 1.4.0.
And because metanorma >= 1.3.0, < 1.4.13 depends on metanorma-utils ~> 1.2.0
and isodoc-i18n >= 1.2.1 depends on metanorma-utils >= 1.7.0,
if metanorma-cli < 1.0.0 OR >= 1.2.13, < 1.3.4 OR >= 1.4.7.1pre, <
1.6.2.pre and isodoc-i18n >= 1.2.1 then metanorma >= 1.4.13, < 1.5.A.
And because relaton-render >= 0.7.0 depends on isodoc-i18n ~> 1.2.1
and every version of isodoc depends on relaton-render ~> 0.7.1,
if metanorma-cli < 1.0.0 OR >= 1.2.13, < 1.3.4 OR >= 1.4.7.1pre, <
1.6.2.pre and isodoc >= 0 then metanorma >= 1.4.13, < 1.5.A.
And because metanorma-cli >= 1.0.1, < 1.2.0 depends on isodoc ~> 0.9.0
and metanorma-cli >= 1.0.0, < 1.0.1 depends on isodoc ~> 0.8.0,
if isodoc < 0.8.0 OR >= 0.9.A, < 0.9.0 OR >= 0.10.A and metanorma-cli <
1.2.0 OR >= 1.2.13, < 1.3.4 OR >= 1.4.7.1pre, < 1.6.2.pre then metanorma >=
1.4.13, < 1.5.A.
And because metanorma-cli >= 1.6.2.pre requires metanorma ~> 1.5.0 OR ~>
1.6.0 OR >= 1.7.0, < 1.8.A OR ~> 2.0.0 (1),
if isodoc < 0.8.0 OR >= 0.9.A, < 0.9.0 OR >= 0.10.A and metanorma-cli <
1.2.0 OR >= 1.2.13, < 1.3.4 OR >= 1.4.7.1pre then metanorma >= 1.4.13, < 1.5.A
OR ~> 1.5.0 OR ~> 1.6.0 OR >= 1.7.0, < 1.8.A OR ~> 2.0.0.
And because metanorma >= 1.4.13 depends on fontist >= 1.14.3,
if isodoc < 0.8.0 OR >= 0.9.A, < 0.9.0 OR >= 0.10.A and metanorma-cli <
1.2.0 OR >= 1.2.13, < 1.3.4 OR >= 1.4.7.1pre then fontist >= 1.14.3.
Because fontist >= 1.15.2 depends on thor ~> 1.2.1
and fontist >= 1.3.0, < 1.15.2 depends on thor ~> 1.0.1,
fontist >= 1.3.0 requires thor ~> 1.0.1 OR ~> 1.2.1.
Thus, if isodoc < 0.8.0 OR >= 0.9.A, < 0.9.0 OR >= 0.10.A and metanorma-cli
< 1.2.0 OR >= 1.2.13, < 1.3.4 OR >= 1.4.7.1pre then thor ~> 1.0.1 OR ~> 1.2.1.
And because metanorma-cli >= 1.1.7, < 1.3.2 depends on thor ~> 0.20.3
and every version of coradoc depends on thor >= 1.3.0,
isodoc < 0.8.0 OR >= 0.9.A, < 0.9.0 OR >= 0.10.A is incompatible with
coradoc >= 0.
So, because isodoc >= 0.8.0, < 0.9.A OR >= 0.9.0, < 0.10.A could not be
found in https://github.com/metanorma/isodoc (at main@8eee838)
and Gemfile depends on coradoc >= 0,
version solving has failed.
PS E:\github\iso-22726-1> bundle install
Bundle complete! 4 Gemfile dependencies, 253 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
PS E:\github\iso-22726-1> bundle info coradoc
* coradoc (1.1.1 a03d112)
Summary: AsciiDoc parser for metanorma
Homepage: https://www.metanorma.org
Source Code: https://github.com/metanorma/coradoc
Path: C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53
Reverse Dependencies:
metanorma-plugin-lutaml (0.7.6) depends on coradoc (>= 0)
check of coradoc version:
PS E:\github\iso-22726-1> bundle info coradoc
* coradoc (1.1.1 a03d112)
Summary: AsciiDoc parser for metanorma
Homepage: https://www.metanorma.org
Source Code: https://github.com/metanorma/coradoc
Path: C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53
Reverse Dependencies:
metanorma-plugin-lutaml (0.7.6) depends on coradoc (>= 0)
then now output from two runs, however i still dont know if i am using the correct parameters. which one is the correct one? please tell me.
PS E:\github\iso-22726-1\conversion> bundle exec coradoc convert infile.html -o index.adoc
C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/cli.rb:24:in `<class:CLI>': undefined method `at_least_one' for class Coradoc::CLI (NoMethodError)
at_least_one :output, :output_format
^^^^^^^^^^^^
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/cli.rb:5:in `<module:Coradoc>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/cli.rb:4:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
from C:/tools/ruby33/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/exe/coradoc:3:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/coradoc:25:in `load'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/coradoc:25:in `<main>'
and the other run
PS E:\github\iso-22726-1\conversion> bundle exec reverse_adoc --external-images -o index.adoc infile.html
C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/h.rb:9:in `to_coradoc': undefined method `id' for an instance of String (NoMethodError)
id = internal_anchor.first.id
^^^
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/li.rb:6:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/ol.rb:10:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:70:in `block (2 levels) in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:160:in `track_time'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:69:in `block in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/config.rb:47:in `with'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:43:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html.rb:22:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html.rb:44:in `processor_execute'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/converter.rb:73:in `convert'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/converter.rb:20:in `call'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/exe/reverse_adoc:81:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/reverse_adoc:25:in `load'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/reverse_adoc:25:in `<main>'
thank you for your help.
@ReesePlews Thank you. You can now add another line to your Gemfile and hopefully it will work now (ensure to also run bundle install
):
gem "fontist", git: "https://github.com/hmdne/fontist", ref: "patch-1"
thank you @hmdne
added to the Gemfile:
gem "fontist", git: "https://github.com/hmdne/fontist", ref: "patch-1"
output from bundle update
PS E:\github\iso-22726-1\conversion> bundle update
Fetching https://github.com/hmdne/fontist
Fetching https://github.com/metanorma/coradoc
Fetching https://github.com/metanorma/isodoc
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Fetching thor 1.3.2 (was 1.2.2)
Installing thor 1.3.2 (was 1.2.2)
Fetching metanorma-plugin-lutaml 0.7.7 (was 0.7.6)
Installing metanorma-plugin-lutaml 0.7.7 (was 0.7.6)
Bundle updated!
Post-install message from fontist:
Please run `fontist update` to fetch formulas.
coradoc confirmation:
PS E:\github\iso-22726-1\conversion> bundle info coradoc
* coradoc (1.1.1 a03d112)
Summary: AsciiDoc parser for metanorma
Homepage: https://www.metanorma.org
Source Code: https://github.com/metanorma/coradoc
Path: C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53
Reverse Dependencies:
metanorma-plugin-lutaml (0.7.7) depends on coradoc (~> 1.1.1)
fontist confirmation:
PS E:\github\iso-22726-1\conversion> bundle info fontist
* fontist (1.21.1 19c08eb)
Summary: Install openly-licensed fonts on Windows, Linux and Mac!
Homepage: https://github.com/fontist/fontist
Source Code: https://github.com/fontist/fontist
Changelog: https://github.com/fontist/fontist
Path: C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/fontist-19c08ebb81e5
Reverse Dependencies:
metanorma (2.0.4) depends on fontist (>= 1.14.3)
check of the conversion method 1:
PS E:\github\iso-22726-1\conversion> bundle exec coradoc convert infile.html -o index.adoc
C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/h.rb:9:in `to_coradoc': undefined method `id' for an instance of String (NoMethodError)
id = internal_anchor.first.id
^^^
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/li.rb:6:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/ol.rb:10:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:70:in `block (2 levels) in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:160:in `track_time'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:69:in `block in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/config.rb:47:in `with'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:43:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html.rb:22:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html.rb:44:in `processor_execute'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/converter.rb:73:in `convert'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/converter.rb:20:in `call'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/cli.rb:80:in `convert'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/exe/coradoc:5:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/coradoc:25:in `load'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/coradoc:25:in `<main>'
check of the conversion method 2:
PS E:\github\iso-22726-1\conversion> bundle exec reverse_adoc --external-images -o index.adoc infile.html
C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/h.rb:9:in `to_coradoc': undefined method `id' for an instance of String (NoMethodError)
id = internal_anchor.first.id
^^^
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/li.rb:6:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/ol.rb:10:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:29:in `treat_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:24:in `block in treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:235:in `block in each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `upto'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/gems/nokogiri-1.16.7-x64-mingw-ucrt/lib/nokogiri/xml/node_set.rb:234:in `each'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `inject'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/base.rb:23:in `treat_children_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters/bypass.rb:5:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:32:in `block in process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/converters.rb:37:in `process_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:70:in `block (2 levels) in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:160:in `track_time'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:69:in `block in to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/config.rb:47:in `with'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html/html_converter.rb:43:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html.rb:22:in `to_coradoc'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/input/html.rb:44:in `processor_execute'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/converter.rb:73:in `convert'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/lib/coradoc/converter.rb:20:in `call'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bundler/gems/coradoc-a03d11254d53/exe/reverse_adoc:81:in `<top (required)>'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/reverse_adoc:25:in `load'
from C:/tools/ruby33/lib/ruby/gems/3.3.0/bin/reverse_adoc:25:in `<main>'
please let me know which method to use, 1 or 2. thank you
@ReesePlews Now your coradoc
command started working (so any method, 1 or 2 should be equivalent). The issue is now with handling the document. I have updated the code to add a workaround. Please try to run bundle update
and try again.
thank you @hmdne the both methods worked without any messages; the images folder was created with renumbered images; the output .adoc file was created;
PS E:\github\iso-22726-1\conversion> bundle exec reverse_adoc --external-images -o index.adoc infile.html
PS E:\github\iso-22726-1\conversion> bundle exec coradoc convert infile.html -o index2.adoc
looks to be working well. thank you for your help.
please advise if my understanding is correct on the next step:
i am not sure how much is converted, but should i now manually edit the document to break it into clauses, or is there a command line parameter that will work with coradoc to create separate clauses based on the document clauses, like 1 Scope, 2 Normative refs, 3 Terminology, etc?
@ReesePlews You probably mean --split-sections 1
where 1
is the number of levels (ie. 1 would break all <h1>
s into separate files, but 2 would also break <h2>
s into separate files)
thank you very much, i will try with --split-sections 1
and see what happens.
i see the command line parameter usage is now displayed, for both commands. thank you for fixing that too.
the HTML was generated from an "official SDO published document -- meaning the styles in the MS-Word docx were manually editing and checked and approved for publication by that SDO";
knowing this, which command would you advise i should use? are there any specific options in LibreOffice i should use when doing a "save as" to create the HTML file?
thank you.
@ReesePlews Unfortunately I have no idea. You can always pass a docx
file instead of html
file, but only using the coradoc
command line utility, then it will handle the file the best way possible.
i understand. thank you @hmdne ; i will try with the docx too.
i did try this:
bundle exec reverse_adoc --split-sections 1 --external-images -o index.adoc infile.html
but the only the index.adoc was created. i will keep checking. thank you for all the help. i will write back with some status later. thanks!
@ReesePlews As I noted before, you must use the coradoc
command line utility, not reverse_adoc
if you want to process docx
files directly.
adding these lines to the gem file enabled the program to run and command line information (via --help) be displayed.
# gem "coradoc"
# 20240920
gem "coradoc", git: "https://github.com/metanorma/coradoc"
gem "fontist", git: "https://github.com/hmdne/fontist", ref: "patch-1"
--split-sections did not seem to work, so another issue will be opened.
UPDATE: after writing this issue, there was an update to coradoc. please see my tests using the updated version in the next comment;
hello, i am trying to run the coradoc to translate html output (created by libreoffice from a well-structured/styled docx file) to adoc
after adding this to my Gemfile
Then run
bundle install
andbundle exec coradoc help convert
i receive this error:
other permutations show a similar error
i was trying to run from another repo, then i cloned the coradoc repo and tried again. both were not successful.
how can i show the command line parameters to run this program or is there some additional documentation elsewhere?
thank you.