Re: Creating adoc files dynamically with blocks
Posted by
mojavelinux on
URL: https://discuss.asciidoctor.org/Creating-adoc-files-dynamically-with-blocks-tp8165p8179.html
> is it possible to write the source content to a new adoc file?
Asciidoctor does not currently have an AsciiDoc backend. It's possible to create one, but someone has to do it. I have no doubt it would be useful to have.
Up to this point, I have generated AsciiDoc using string concatenation. Another route is to convert to DocBook, then use docbookrx to convert back to AsciiDoc.
Best Regards,
-Dan
On Thu, Aug 13, 2020 at 8:12 AM guidog [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
Hi,
I want to create a new adoc file dynamically using this blocks
doc = Asciidoctor::Document.new
....
doc << block1
doc << block2
...
If I do that, is it possible to write the source content to a new adoc file?
I don't want to convert it at this point, I just want to read an adoc file and generate a new file with some modifications.
It is like a converter to Asciidoc itself or a pretty printer for Asciidoctor::Document
Thanks
guido
--