block by ThomasG77 0c6862fb2b6b3fc301ea994733688ea5

Script to write QGIS expressions on one page (easy to reference to help people on the web, text search from your browser)

Generate single page documentation for expressions


The goal was a single page documentation on expression

One approach could have been about using scripts/ and/or files in resources/function_help/json/. As there is no link between groups and functions documented in these json files, you need to look for the relation in the source src/core/expression/qgsexpressionfunction.cpp. You would also need to manage translations. FYI, all paths are relative to the root of the source code repo.

So, instead we’ve made the choice to use HTML generated doc for expressions from PyQGIS docs. It works for any languages

How to

You need to install third party Python library BeautifulSoup4 into the version of Python used by QGIS. For Linux, do it with

pip install beautifulsoup4

Then, run the script within PyQGIS console.

As the script is generated dynamically within QGIS and we need to change the locale each time we want to generate a new lang doc, we only produced some translations. Feel free to ask in the comments for another languages.

Current generated docs