QGIS Plugins mit Python: Unterschied zwischen den Versionen

Aus Geometa Lab OST
Zur Navigation springen Zur Suche springen
(update whole page)
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
QGIS Plugin metadata
QGIS Plugin metadata


<h2> Importance of metadata </h2>
==  Importance of metadata ==
 
The metadata.txt file is essential for defining the properties of a QGIS plugin. It provides key information such as the plugin name, author details, description, and category. Properly structured metadata ensures that plugins are correctly categorized, easily discoverable, and well-documented.
The metadata.txt file is essential for defining the properties of a QGIS plugin. It provides key information such as the plugin name, author details, description, and category. Properly structured metadata ensures that plugins are correctly categorized, easily discoverable, and well-documented.


<h2>Structure of metadata.txt </h2>
Keep metadata.txt updated – Especially when releasing new versions.


== Structure of metadata.txt  ==
A metadata.txt file consists of mandatory and optional attributes. Below is a breakdown of the most important attributes.
A metadata.txt file consists of mandatory and optional attributes. Below is a breakdown of the most important attributes.


<h3>General Information </h3>
=== General Information ===  
<pre>
[general]
name=Plugin Name
author=Author Name
email=author@example.com
qgisMinimumVersion=3.0
</pre>
 
* name: The official name of the plugin.
* name: The official name of the plugin.
* author: Name(s) of the developer(s).
* author: Name(s) of the developer(s).
* email: Contact email for support or inquiries.
* email: Contact email for support or inquiries.
* qgisMinimumVersion: Minimum version of QGIS required to run the plugin (e.g., ''3.0'').
* description=Short and clear description of the plugin functionality.
* about=Detailed explanation of the plugin, including its purpose, features, and how it works.
* tags= Example: ''vector, geocoding, point, address''
* hasProcessingProvider: ''yes'' if the plugin provides QGIS processing tools.


* qgisMinimumVersion: Minimum version of QGIS required to run the plugin.
=== Versioning and Status ===
version=1.0
experimental=False
Changelog: 1.0 - Initial release.
=== Category ===
Ensure category is valid – Choose one from the predefined list:
* '''Raster'''
* '''Vector'''
* '''Database'''
* '''Mesh'''
* '''Web'''


=== Links ===
Include a homepage or repository link – Essential for documentation and support.
tracker=https://github.com/johndoe/spatial-analysis-plugin/issues
repository=https://github.com/johndoe/spatial-analysis-plugin
homepage=https://github.com/johndoe/spatial-analysis-plugin




<h3>Plugin Description and About </h3>
=== Additional Settings ===
<pre>
* icon: Path to the plugin icon.
description=Short and clear description of the plugin functionality.
* server: Set to True if the plugin runs on a server.
about=Detailed explanation of the plugin, including its purpose, features, and how it works.
</pre>
 
<h3>Categorization and Tags </h3>
<pre>
category=Vector
tags=vector, geocoding, point, address
</pre>
 
<h3>Versioning and Status</h3>
<pre>
version=1.0
experimental=False
Changelog: 1.0 - Initial release.
</pre>
 
 
<h3>Online Resources</h3>
tracker=https://github.com/user/repo/issues
repository=https://github.com/user/repo.git
homepage=https://github.com/user/repo
 
 
<h3>Processing Provider</h3>
hasProcessingProvider: yes if the plugin provides QGIS processing tools.
 
<h3>Additional Settings</h3>
<pre>
icon: Path to the plugin icon.
server: Set to True if the plugin runs on a server.
</pre>
 
Best Practices for Writing Metadata
Ensure category is valid – Choose one from the predefined list.
Include a homepage or repository link – Essential for documentation and support.
Keep metadata.txt updated – Especially when releasing new versions.




<h2>Example of a Well-Formatted metadata.txt File</h2>
== Example of a Well-Formatted metadata.txt File ==


<pre>
[general]
[general]
name=Advanced Spatial Analysis
name=Advanced Spatial Analysis
author=John Doe
author=John Doe
email=johndoe@example.com
email=johndoe@example.com
qgisMinimumVersion=3.0
qgisMinimumVersion=3.0
description=Perform advanced spatial analysis on vector layers.
description=Perform advanced spatial analysis on vector layers.
about=This plugin allows users to conduct advanced spatial analysis operations such as buffering, clipping, and overlay analysis. It integrates seamlessly with the QGIS processing framework.
about=This plugin allows users to conduct advanced spatial analysis operations such as buffering, clipping, and overlay analysis. It integrates seamlessly with the QGIS processing framework.
category=Vector
category=Vector
tags=vector, spatial analysis, geoprocessing
tags=vector, spatial analysis, geoprocessing
version=1.2
version=1.2
experimental=False
experimental=False
Changelog: 1.2 - Added new analysis tools.
Changelog: 1.2 - Added new analysis tools.
tracker=https://github.com/johndoe/spatial-analysis-plugin/issues
tracker=https://github.com/johndoe/spatial-analysis-plugin/issues
repository=https://github.com/johndoe/spatial-analysis-plugin
repository=https://github.com/johndoe/spatial-analysis-plugin
homepage=https://github.com/johndoe/spatial-analysis-plugin
homepage=https://github.com/johndoe/spatial-analysis-plugin
hasProcessingProvider=yes
hasProcessingProvider=yes
icon=icon.png
icon=icon.png
server=False
server=False
</pre>
There is more information about how a metadata.txt file should look like in the [https://docs.qgis.org/3.34/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#metadata-txt pyqgis developer cookbook].


<h2>Weblinks</h2>
== Weblinks ==
* Homepage: http://www.qgis.org/ ([http://wiki.qgis.org/qgiswiki/Project_Organigram Project-Team QGIS])
* Homepage: http://www.qgis.org/ ([http://wiki.qgis.org/qgiswiki/Project_Organigram Project-Team QGIS])
* Wiki: http://wiki.qgis.org/  
* Wiki: http://wiki.qgis.org/  

Version vom 28. Januar 2025, 13:19 Uhr

QGIS Plugin metadata

Importance of metadata

The metadata.txt file is essential for defining the properties of a QGIS plugin. It provides key information such as the plugin name, author details, description, and category. Properly structured metadata ensures that plugins are correctly categorized, easily discoverable, and well-documented.

Keep metadata.txt updated – Especially when releasing new versions.

Structure of metadata.txt

A metadata.txt file consists of mandatory and optional attributes. Below is a breakdown of the most important attributes.

General Information

  • name: The official name of the plugin.
  • author: Name(s) of the developer(s).
  • email: Contact email for support or inquiries.
  • qgisMinimumVersion: Minimum version of QGIS required to run the plugin (e.g., 3.0).
  • description=Short and clear description of the plugin functionality.
  • about=Detailed explanation of the plugin, including its purpose, features, and how it works.
  • tags= Example: vector, geocoding, point, address
  • hasProcessingProvider: yes if the plugin provides QGIS processing tools.

Versioning and Status

version=1.0
experimental=False
Changelog: 1.0 - Initial release.

Category

Ensure category is valid – Choose one from the predefined list:

  • Raster
  • Vector
  • Database
  • Mesh
  • Web

Links

Include a homepage or repository link – Essential for documentation and support.

tracker=https://github.com/johndoe/spatial-analysis-plugin/issues
repository=https://github.com/johndoe/spatial-analysis-plugin
homepage=https://github.com/johndoe/spatial-analysis-plugin


Additional Settings

  • icon: Path to the plugin icon.
  • server: Set to True if the plugin runs on a server.


Example of a Well-Formatted metadata.txt File

[general]
name=Advanced Spatial Analysis
author=John Doe
email=johndoe@example.com
qgisMinimumVersion=3.0
description=Perform advanced spatial analysis on vector layers.
about=This plugin allows users to conduct advanced spatial analysis operations such as buffering, clipping, and overlay analysis. It integrates seamlessly with the QGIS processing framework.
category=Vector
tags=vector, spatial analysis, geoprocessing
version=1.2
experimental=False
Changelog: 1.2 - Added new analysis tools.
tracker=https://github.com/johndoe/spatial-analysis-plugin/issues
repository=https://github.com/johndoe/spatial-analysis-plugin
homepage=https://github.com/johndoe/spatial-analysis-plugin
hasProcessingProvider=yes
icon=icon.png
server=False

There is more information about how a metadata.txt file should look like in the pyqgis developer cookbook.

Weblinks