How can I pass results of a python script to a adoc (AsciiDoc)? I currently can not find a solution. Can someone give me tips or sources on this?
Asked
Active
Viewed 332 times
1 Answers
2
You can copy the output of a Python script (or any program) into a file, and then include that file within a source block.
For example:
[source]
----
include::path/to/python/output.txt[]
----
If the output is in a known format, say JSON, you can include a language hint:
[source,json]
----
include::path/to/python/produced.json[]
----
Depending on the styles in use by your Asciidoc processor, those examples should appear with the same styling as any source code block. If you are using the syntax highlighter, adding the language hint should enable colorized output.

eskwayrd
- 3,691
- 18
- 23