Changes between Initial Version and Version 1 of Plugins/Execute


Ignore:
Timestamp:
06/08/2010 10:13:46 AM (14 years ago)
Author:
konti
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Plugins/Execute

    v1 v1  
     1== Execute == 
     2The '''Execute''' plugin is only supported from deluge versions 1.3RC2 and up. It gives you the option to run your own scripts (e.a. Bash, Python or any other shell) triggered with different events in Deluge. At this moment only the events '''added''' (when a torrent is added to deluge) and '''complete''' (when a torrent has finished downloading) are supported. More events whill be added in the future. 
     3 
     4The script will be executed with three variables. 
     5 
     61: The id of the torrent 
     72: The name of the torrent 
     83: With the '''added''' event ''the Download to:'' folder and with the '''complete''' event the - when configured - ''Move completed to:'' folder. 
     9 
     10== Configuration == 
     11 
     12=== Through webUI === 
     13As of version 1.3RC2 it is possible to configure the plugin through webUI without manually having to install the plugin. It is necessary to enable the plugin in the plugins menu in Preferences. After reopening the Preferences menu the Execute plugin is available. 
     14 
     15The events Torrent Complete and Torrent Added can be selected. The command should be the full path script (e.a. /var/lib/deluge/myscripts/on_added.sh). Make sure the script is accessible  by the user that is used to run deluged and that it is executable. 
     16 
     17=== Through GTK UI === 
     18 
     19== Script Examples == 
     20 
     21=== bash === 
     22 
     23=== python === 
     24The following scripts can be used for testing purposses. They can be run from command line like:  
     25{{{ 
     26./test.py "var1" "var2" "var3" 
     27}}} 
     28 
     29The variables should show up in your syslog.  
     30{{{ 
     31tail /var/log/syslog 
     32}}} 
     33 
     34 
     35Python Example script 
     36{{{ 
     37#!/usr/bin/python 
     38import sys 
     39import os 
     40import syslog 
     41syslog.syslog('deluge test: the script started running') 
     42for arg in sys.argv[1:]: 
     43    syslog.syslog(arg) 
     44}}}