[Qgis-community-team] update disclaimer in sources

Richard Duivenvoorde rdmailings at duif.net
Tue Oct 16 13:51:46 PDT 2012


Hi Otto,

I've been searching for an easy way to put a 'his section is not updated 
yet' disclaimer in every section of the html pages.

For doing this I added a rst_prolog in conf.py like this:

rst_prolog = """
.. role:: disclaimer
.. |updatedisclaimer| replace:: :disclaimer:`DISCLAIMER: This section of 
the user guide has not yet been updated for QGIS 1.8`
"""

And (for now) in all rst files in the preamble directory, I added the 
following on top:

.. comment out this disclaimer (by putting '.. ' in front of it) if file 
is uptodate with release
|updatedisclaimer|

Please have a look at the pages in the preamble (you should see a big 
red sign in top)

The idea is that when a rst is up to date with 1.8 we can just comment out
|updatedisclaimer|
by doing
.. |updatedisclaimer|
and the disclaimer will disappear from this section for this page.

When a new release is planned, and we want a new disclaimer in master, 
we only have to change the updatedisclaimer-replace in conf.py and 
remove comment from the |updatedisclaimer| parts in those sections that 
really need updates.

Ok for you? Or is there a more easy/clever way to do something like this?
If OK, I will put the disclaimer in all rst files.

R



More information about the Qgis-community-team mailing list