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) https://gist.githack.com/ThomasG77/0c6862fb2b6b3fc301ea994733688ea5/raw/99ecc5e6127e7238814da330a4d5d0b9fa2afe4e/qgis-3-12-expressions-single-page.html

Generate single page documentation for expressions

Why?

The goal was a single page documentation on expression

One approach could have been about using scripts/process_function_template.py 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 pyqgis-list-expressions.py 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

pyqgis-list-expressions.py