Version 19 (modified by hassanibraheem, 15 years ago) (diff)

The create_plugin.py for 1.1.8 doesn't work with 1.1.7.

Development

Development/Plugins

index

  1. Development/Plugins
    1. Intro
    2. Creating a new plugin
    3. Distributing a plugin
  2. Various random facts
    1. Adding a status-field to core
    2. Adding a column to gtk-ui
    3. alerts
    4. signals
  3. Examples

Intro

Plugins consist of a core part and ui parts for the various user-interfaces.

They are distributed using python eggs http://peak.telecommunity.com/DevCenter/PythonEggs

Creating a new plugin

A script is available to create a new plugin here: http://dev.deluge-torrent.org/browser/trunk/deluge/scripts/create_plugin.py?format=raw

For 1.1.7 : http://dev.deluge-torrent.org/browser/tags/deluge-1.1.7/deluge/scripts/create_plugin.py?rev=5174

Note: You may need to install the python-setuptools package if you don't have it.

Go to an empty directory, and run:

python create_plugin.py --name MyPlugin2 --basepath . --author-name "Your Name" --author-email "yourname@example.com"

This will create a new directory <plugin-name> , contaning a basic plugin template. And it will link it from ~/.config/deluge/plugins

Restart deluge and deluged.

Distributing a plugin

Go to the plugin-name directory, and type

python setup.py bdist_egg

This will build an egg.

Rename the egg to <plugin-name>.egg and share it,

Various random facts

  • any "export_*" method in the core plugin is exposed as "plugin-name_*" in deluge.ui.client
  • the deluge.ui.client api is available to core plugins as "from deluge.plugins.coreclient import client"

Adding a status-field to core

Adding a column to gtk-ui

alerts

signals

Examples