Reputation: 103
I am using Sphinx to generate documentation for my project, and building the documentation as part of the product's install process.
I would like to dynamically include the hostname in the text and/or code-blocks. I have not seen any explanations in the documentation nor any facility for including the output of a shell command or anything other than specific line(s) from a specific file. Does this functionality exist?
Upvotes: 9
Views: 3235
Reputation: 50947
Here are two Sphinx extensions that can do this:
runblock
directives, captures the output and inserts it into documents.program-output
directive and inserts the output into documents.Upvotes: 7