New extension: sphinxcontrib-constdata

Skip to first unread message

Matt Documatt

Jan 6, 2022, 10:05:19 AMJan 6
Dear Sphinx community,
after months I finally found enough time to finish and release the extension that I was personally missing in almost every bigger docs project.

* docs: (crafted in Sphinx, indeed)
* code: where issues and contributions are welcome

sphinxcontrib-constdata is the extension for Sphinx documentation projects that allows showing values, listing tables, and generating links from CSV, JSON, and YAML files. Instead of hard-coding values in the text, you write constants or queries replaced with value(s) from the external file(s). If the file contains language-sensitive strings, they can be translated with the rest of the Sphinx docs.

For example, instead of hard-coding UI labels like "Close" in

To continue, press Close.

I obtain these external constants from developers in labels.csv and rewrite the sentence to:

To continue, press :constdata:label:`labels.csv?close`.

or, if I set constdata as default domain, to:

To continue, press :label:`labels.csv?close`.

Looking forward to your valuable thoughts.


Reply all
Reply to author
0 new messages