Version 16 (modified by mvoncken, 13 years ago) (diff)

--

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

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

Go to and 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 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