Skip to content

Commit dcf27bb

Browse files
committed
Plugin metadata: add payment, authentication, countries, languages
1 parent fed3b03 commit dcf27bb

File tree

1 file changed

+62
-32
lines changed

1 file changed

+62
-32
lines changed

docs/pyqgis_developer_cookbook/plugins/plugins.rst

Lines changed: 62 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -102,38 +102,56 @@ plugin such as its name, description etc. This information is stored in :file:`m
102102

103103
.. _plugin_metadata_table:
104104

105-
===================== ======== =============================================================
106-
Metadata name Required Notes
107-
===================== ======== =============================================================
108-
name True a short string containing the name of the plugin
109-
qgisMinimumVersion True dotted notation of minimum QGIS version
110-
qgisMaximumVersion False dotted notation of maximum QGIS version
111-
description True short text which describes the plugin, no HTML allowed
112-
about True longer text which describes the plugin in details, no HTML allowed
113-
version True short string with the version dotted notation
114-
author True author name
115-
email True email of the author, only shown on the website to logged in users,
116-
but visible in the Plugin Manager after the plugin is installed
117-
changelog False string, can be multiline, no HTML allowed
118-
experimental False boolean flag, :const:`True` or :const:`False` -
119-
:const:`True` if this version is experimental
120-
deprecated False boolean flag, :const:`True` or :const:`False`, applies to
121-
the whole plugin and not just to the uploaded version
122-
tags False comma separated list, spaces are allowed inside individual tags
123-
homepage False a valid URL pointing to the homepage of your plugin
124-
repository True a valid URL for the source code repository
125-
tracker False a valid URL for tickets and bug reports
126-
icon False a file name or a relative path (relative to
127-
the base folder of the plugin's compressed
128-
package) of a web friendly image (PNG, JPEG)
129-
category False one of ``Raster``, ``Vector``, ``Database``, ``Mesh`` and ``Web``
130-
plugin_dependencies False PIP-like comma separated list of other plugins to install, use
131-
plugin names coming from their metadata's name field
132-
server False boolean flag, :const:`True` or :const:`False`, determines if
133-
the plugin has a server interface
134-
hasProcessingProvider False boolean flag, :const:`True` or :const:`False`, determines if
135-
the plugin provides processing algorithms
136-
===================== ======== =============================================================
105+
===================== ============ =============================================================
106+
Metadata name Required Notes
107+
===================== ============ =============================================================
108+
name True a short string containing the name of the plugin
109+
qgisMinimumVersion True dotted notation of minimum QGIS version
110+
qgisMaximumVersion False dotted notation of maximum QGIS version
111+
description True short text which describes the plugin, no HTML allowed
112+
about True longer text which describes the plugin in details, no HTML allowed
113+
version True short string with the version dotted notation
114+
author True author name
115+
email True email of the author, only shown on the website to logged in users,
116+
but visible in the Plugin Manager after the plugin is installed
117+
changelog False string, can be multiline, no HTML allowed
118+
experimental False boolean flag, :const:`True` or :const:`False` -
119+
:const:`True` if this version is experimental
120+
deprecated False boolean flag, :const:`True` or :const:`False`, applies to
121+
the whole plugin and not just to the uploaded version
122+
tags False comma separated list, spaces are allowed inside individual tags
123+
homepage False a valid URL pointing to the homepage of your plugin
124+
repository True a valid URL for the source code repository
125+
tracker False a valid URL for tickets and bug reports
126+
icon False a file name or a relative path (relative to
127+
the base folder of the plugin's compressed
128+
package) of a web friendly image (PNG, JPEG)
129+
category False one of ``Raster``, ``Vector``, ``Database``, ``Mesh`` and ``Web``
130+
plugin_dependencies False PIP-like comma separated list of other plugins to install, use
131+
plugin names coming from their metadata's name field
132+
server False boolean flag, :const:`True` or :const:`False`, determines if
133+
the plugin has a server interface
134+
hasProcessingProvider False boolean flag, :const:`True` or :const:`False`, determines if
135+
the plugin provides processing algorithms
136+
payment Conditionnal :const:`True`, :const:`False` or :const:`Partial`. Must be set
137+
if the use of the plugin involves some payment. :const:`True` means
138+
that all functionality of the plugin requires payment.
139+
:const:`Partial` means that there is a mix of gratis and paid
140+
features.
141+
authentication Conditionnal :const:`True`, :const:`False` or :const:`Partial`. Must be set
142+
if the use of the plugin involves some authentication to a remote
143+
service. :const:`True` means
144+
that all functionality of the plugin requires authentication.
145+
:const:`Partial` means that there is a mix of un-authenticated and
146+
authenticated features.
147+
countries False comma separated list of `2-letter country ISO 3166 A-2 code <https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes>`__
148+
country codes to which the plugin applies to.
149+
e.g. ``fr,be`` for France and Belgium. If not specified, the
150+
plugin is presumed to not be tied to a geographical area of interest.
151+
languages False comma separated list of `Qt local names <https://doc.qt.io/qt-5/qlocale.html#uiLanguages>`_
152+
for which the plugin has translations.`
153+
e.g. ``fr,en`` for French and English.
154+
===================== ============ =============================================================
137155

138156
By default, plugins are placed in the :menuselection:`Plugins` menu (we will see
139157
in the next section how to add a menu entry for your plugin) but they can also
@@ -213,6 +231,18 @@ An example for this metadata.txt
213231
; name field
214232
plugin_dependencies=MyOtherPlugin==1.12,YetAnotherPlugin
215233

234+
; Whether payment is required to use the plugin. If empty, unknown
235+
payment=True
236+
237+
; Whether authentication is required to use the plugin. If empty, unknown
238+
authentication=True
239+
240+
; Countries for which the plugin is of interest. If empty, unknown/all
241+
countries=be,fr
242+
243+
; Languages for which the plugin has translations. If empty, unknown.
244+
; Having English is strongly recommended for wider audience.
245+
languages=en,fr
216246

217247
.. index:: Plugins; Initialisation
218248

0 commit comments

Comments
 (0)