Make your own directive that runs your command. You can probably use the
programoutput extension code as a reference for how to make the directive.
Then use the nested_parse_with_titles function:
from docutils import nodes
from docutils.statemachine import ViewList
def run(self):
new_
Hi,
How can I put all my substitutions in a dedicated, external file, and
include them in my conf.py?
I tried to insert an external substitutions file with via literalinclude
with rst_prolog or rst_epilog, but then, substitions are not evaluated at
build time and appear literally in the HTML
Dear all,
I have some script that generates ReST content. I'd like to call this
script from inside the rst document:
blah blah blah
.. execute-program:: generate-content.py myfile.bin
I know there is sphinxcontrib.programoutput, but this extension inserts the
output of the program. What i'd l
Dear all,
I'd like to pass custom variables through the command line with -D. For
this I use the following code:
def setup(app):
app.add_config_value('myVar', value, True)
Now I'd like to reference them in my .rst file using |myVar|, just like for
|version| but I cannot make it work.