Does anyone have any idea how I could download all QGIS plugins without having to do that from the interface one by one (possible but tedious).

I am doing this for a friend who uses an offline computer, I'd like to send him a USB drive with the new version of QGIS and the plugins.


Not using the interface no, however you can write a Python script to do it which I have done in a project of mine.

Here is a an extract:

def get_plugins(qgisversion='2.4'):
    Fetch the plugins from plugin repo
    :return: name, url, filename
    plugin_request = requests.get("http://plugins.qgis.org/plugins/plugins.xml?qgis={}".format(qgisversion))
    xml = minidom.parseString(plugin_request.text)
    plugins = xml.getElementsByTagName("pyqgis_plugin")
    for plugin in plugins:
        name = plugin.attributes["name"].value
        url = plugin.getElementsByTagName("download_url")[0].childNodes[0].data
        filename = plugin.getElementsByTagName("file_name")[0].childNodes[0].data
        yield name, url, filename

for name, url, filename in get_plugins():
    urllib.request.urlretrieve(url, filename)

This requires requests to be installed (pip install requests if you don't have it), and will run in a normal Python install. Doesn't have to be run inside QGIS.

The main QGIS plugin site provides a xml document with all the plugins, their names, and download URLs, we just download that, pull out the info and download the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.