-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find all adoc files included in a document #656
Comments
Frank told me that from the normal AsciiDoctor command line tool, this is impossible to do, unless you actually write an own AsciiDoc parser. However, based on this forum thread, getting the list of files is possible via the Ruby API of AsciiDoctor. I am a Ruby illiterate, but it's possible to try this out with the
Besides the file extensions missing, that looks about right. The big question here is whether that call can be integrated into DAPS. But maybe, Bryan/Terry, it helps you for the moment anyway even as it is not integrated. (AsciiDoctor API docs: https://docs.asciidoctor.org/asciidoctor/latest/api/options/) |
Stefan, this is a great find and quite usable! I replicated your example run, have tried another one as well, so will try to generate a matrix of RA include files across various documents to review. |
Relevant for doc-suse-com/site#53. |
I have to admit that I do not have the slightest clue of how to utilize Stefan's findings with the irb shell in DAPS (help is welcome). What I have done with 7506323 is to make sure that DAPS finds all include files plus the docinfo file. There is still some shortcomings:
BTW: "Profiling" for images works (the file list will only show images, that are used in the resulting document, including images specified in the docinfo file). This is because images are extracted from the resulting XML. |
Within the TRD repo, current
main
, if you run list-srcfiles, you get this:DAPS does appear to be picking up top-level, unconditional includes, but I think it does not seem to pick up conditional includes and includes nested further down, e.g.
/path/to/trd/Kubernetes/RA/adoc/./i/SA.adoc
has this include foradoc/i/SA-Rancher.adoc
which is not listed:If I understand correctly, the use case for this would be both (1) running this via CI to alert authors about documents affected by a change and (2) in-document usage, much like the parameters that are shown within the appendix (#573).
[cc @tlssuse @bwgartner]
The text was updated successfully, but these errors were encountered: