I'm trying to make a substitution on the file loaded by the table-csv directive on Sphinx. My idea was to do something like:
.. csv-table:: My CSV Table
:header: "Column 1", "Column 2"
:file: some/path/|branch|/to/file_|version|.csv
It seems to replace neither branch nor version.
I tried to add white spaces around the variables I want to substitute as on the answer for this question
I also tried (without success) to create a variable with the full path outside, on conf.py as follows.
rst_prolog = f"""
.. |my_csv_file| replace:: ../path/{git_branch}/to/file_{version}.csv
"""
To then import it as:
.. csv-table:: My CSV Table
:header: "Column 1", "Column 2"
:file: | my_csv_file |
Is there any way (without using custom directives if possible) to achieve this?
Thanks beforehand!