Simple qgis plugin repoΒΆ

Tags: python, nelenschuurmans

At my company, we sometimes build QGIS plugins. You can install those by hand by unzipping a zipfile in the correct directory, but there’s a nicer way.

You can add custom plugin “registries” to QGIS and QGIS will then treat your plugins just like regular ones. Here’s an example registry: . Simple, right? Just a directory on our webserver. The URL you have to configure inside QGIS as registry is that of the plugins.xml file: .

The plugins.xml has a specific format:

<?xml version="1.0"?>

  <pyqgis_plugin name="GGMN lizard integration" version="1.6">
       <description>Download GGMN data from lizard, interpolate and add new points</description>
       <author_name>Reinout van Rees, Nelen &amp; Schuurmans</author_name>

   .... more plugins ...


As you see, the format is reasonably simple. There’s one directory on the webserver that I “scp” the zipfiles with the plugins to. I then run this script on the directory. That script extracts the (mandatory) metadata.txt from all zipfiles and creates a plugins.xml file out of it.

A gotcha regarding the zipfiles: they should contain the version number, but, in contrast to python packages, the version should be prefixed by a dot instead of a dash. So no but It took me a while before I figured that one out!

About the metadata.txt: QGIS has a “plugin builder” plugin that generates a basic plugin structure for you. This structure includes a metadata.txt, so that’s easy.

(In case you want to use zest.releaser to release your plugin, you can extend zest.releaser to understand the metadata.txt format by adding . It also generates a correctly-named zipfile.)

blog comments powered by Disqus logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):