Re: Flattening documents with include::[]
Posted by
mojavelinux on
Apr 24, 2019; 7:12pm
URL: https://discuss.asciidoctor.org/Flattening-documents-with-include-tp6861p6864.html
Actually, yes.
I think you're looking for this script from the extensions lab. It still needs some work, but could get you most of the way there.
Cheers,
-Dan
On Mon, Apr 22, 2019 at 6:56 PM jheckey [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
Is there a way to run asciidoctor to output a single .adoc file with all of the various text included? I have written up a brief hacky version in Python because I'm don't really know Ruby (not opposed, just limit time to learn) to change the source properly.
I'm working on a project that has multiple documents reusing includes::[]. The documents themselves have revision numbers that we use for tracking, but we want to keep canonical snapshots of the documents (images are handled by just creating a new version of the image) for legacy and comparison purposes. If the include files change, that would change the "canonical" document, so keeping the flat text would be preferred, especially for human readability.
--