[Qgis-developer] Plugin metadata in a text file

Martin Dobias wonder.sk at gmail.com
Wed Nov 9 14:05:56 EST 2011


Hi all

just want to let you know about a recent addition in master branch: I
have introduced the possibility to put plugin's metadata to a text
file (metadata.txt).

Until now plugins' metadata were always retrieved from __init__.py by
calling python methods. Reading metadata from a text file has the
advantage of not requiring to load the plugin code and can be done by
plugin repository.

Metadata in metadata.txt is preferred to the methods in __init__.py -
if the text file is present, it is used to fetch the values. Backward
compatibility is preserved - all existing plugins will continue to
work. From QGIS 2.0 the metadata from __init__.py will not be accepted
- the metadata.txt file will be required.

Plugin metadata should be in INI file format, recognized by python's
ConfigParser module and by Qt's QSettings class.

All currently used metadata should be in [general] section. Example use:

[general]
name=PostGIS manager
description=Manage your PostGIS database
version=Version 0.5.15
icon=icons/postgis_elephant.png
qgisMinimumVersion=1.0.0


Regards
Martin


More information about the Qgis-developer mailing list