Create AsciiDoc file with all includes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Create AsciiDoc file with all includes

Gunnar Morling
Hi,

For the Java Bean Validation spec, we make use of includes: for each chapter there is an individual AsciiDoc source file which is included into a central master file, but also source code listings are included from Java source files into the document.

Is there a way to create an AsciiDoc file which has pulled in all the includes? I.e. I don't want to render any output format (HTML etc.) but just get a single AsciiDoc file with all includes incorporated. The use case is to have a way for showing a single diff between spec revisisions (which then can viewed nicely using the rich diff viewer on GitHub).

Thanks for any pointers,

--Gunnar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Create AsciiDoc file with all includes

Guillaume Smet
Hi,

For the record, we coded our own preprocessor to save the preprocessed output to a file:
https://github.com/beanvalidation/beanvalidation-spec/pull/123

We had to make a few changes to the preprocessed output in order to be more inline with the result we expected (we wanted to compare the result to a previous version not using source includes and we had a space/tab difference). But in simple cases, your preprocessor should be 4 lines of code to save the output.

--
Guillaume
Loading...