Hey!
I'm just wondering if this has been done before, or how hard it would be to implement.
Ideally I'd just like to get a shell script called upon a torrent being completed. Ideal things to get passed as parameters would be:
- Full path to download
- Label, if specified using said plugin
Might be nice to have options to have it fire a shell script on certain events, such as switching from leech->seed, when certain ratio requirements are met, etc.
Is such a thing easily doable with the plugin API? Or, better yet, has someone written something like this already?
Cheers,
-e-
Execute Shell Script On Completion Plugin?
-
- Member
- Posts: 13
- Joined: Mon Jan 14, 2008 7:10 pm
Re: Execute Shell Script On Completion Plugin?
there has been talk about writing a plugin to do this - but nothing has been done on it yet.
In the meantime, may I ask what your shell script does? You might be able to whip up a temporary solution using ui client scripts.
You could also, for instance, have deluge move completed torrents to a specific directory and have cron run a script every so often on that directory.
In the meantime, may I ask what your shell script does? You might be able to whip up a temporary solution using ui client scripts.
You could also, for instance, have deluge move completed torrents to a specific directory and have cron run a script every so often on that directory.
-
- Member
- Posts: 13
- Joined: Mon Jan 14, 2008 7:10 pm
Re: Execute Shell Script On Completion Plugin?
Hey Johnny!
Well, I had a couple of thoughts about scripts I'd write with this information. Such as:
- Send e-mail notifications using the 'mail' command on linux.
- Send MSN/GTalk notifications
- Move files to specific folders (depending on their 'label')
- Anything else, really.
I'll take a look at the ui client scripts you mention, see if there's anything I can get from it. Thanks!
Well, I had a couple of thoughts about scripts I'd write with this information. Such as:
- Send e-mail notifications using the 'mail' command on linux.
- Send MSN/GTalk notifications
- Move files to specific folders (depending on their 'label')
- Anything else, really.
I'll take a look at the ui client scripts you mention, see if there's anything I can get from it. Thanks!
Re: Execute Shell Script On Completion Plugin?
these will be in 1.1.0 (the first RC for it should be out very soon)eddieparker wrote: - Send e-mail notifications using the 'mail' command on linux.
- Move files to specific folders (depending on their 'label')
not sure how easy it would be to send msn/gtalk notifications (or how useful?) however if you can do it in python then you would probably be able to write a ui client script in the meantime.eddieparker wrote: - Send MSN/GTalk notifications
- Anything else, really.
-
- Member
- Posts: 13
- Joined: Mon Jan 14, 2008 7:10 pm
Re: Execute Shell Script On Completion Plugin?
Awesome, thanks for the reply Johnny.

I'll read more on the UI client scripts, but unfortunately I'll have to set aside some time to learn about the terminology. Is there a client script I can look at as an example for getting messages from events?
Awesome. Will it be possible to move files across partition/hard-disk boundaries? I seem to recall there being a problem with that in past versions (or maybe that was a different client I used... memory is foggy.)johnnyg wrote:these will be in 1.1.0 (the first RC for it should be out very soon)eddieparker wrote: - Send e-mail notifications using the 'mail' command on linux.
- Move files to specific folders (depending on their 'label')
Well, allowing i could get an arbitrary shell script to execute on certain events from deluge, the MSN/GTalk stuff wouldn't be too bad I imagine - there's a bunch of libraries around for that sort of stuff, or so I've been told. As for it's effectiveness - well, who knows. Mostly just something I want to fiddle with - might lead to nothing.johnnyg wrote:not sure how easy it would be to send msn/gtalk notifications (or how useful?) however if you can do it in python then you would probably be able to write a ui client script in the meantime.eddieparker wrote: - Send MSN/GTalk notifications
- Anything else, really.

I'll read more on the UI client scripts, but unfortunately I'll have to set aside some time to learn about the terminology. Is there a client script I can look at as an example for getting messages from events?
Re: Execute Shell Script On Completion Plugin?
no worries, just don't come crying if you accidentally broadcast to all your friends and family that you're downloading private stuffeddieparker wrote:Well, allowing i could get an arbitrary shell script to execute on certain events from deluge, the MSN/GTalk stuff wouldn't be too bad I imagine - there's a bunch of libraries around for that sort of stuff, or so I've been told. As for it's effectiveness - well, who knows. Mostly just something I want to fiddle with - might lead to nothing.

That link I gave you contains all the documentation / example scripts that currently exist.eddieparker wrote:I'll read more on the UI client scripts, but unfortunately I'll have to set aside some time to learn about the terminology. Is there a client script I can look at as an example for getting messages from events?
Feel free to post partial scripts here if you need any help.
Re: Execute Shell Script On Completion Plugin?
I like the idea of this actually, and I think just executing a command upon completion could be useful. Could set your computer to shut down, for example via this.
I guess ./scriptname [torrent_name] [download_files_location] would suffice?
I guess ./scriptname [torrent_name] [download_files_location] would suffice?
Re: Execute Shell Script On Completion Plugin?
andar was planning on writing this, not sure what happened, probably too busy with 1.2...
Re: Execute Shell Script On Completion Plugin?
I'd imagine so, I'll have a look if I get the chance to do so before 1.2 is out.
-
- Member
- Posts: 13
- Joined: Mon Jan 14, 2008 7:10 pm
Re: Execute Shell Script On Completion Plugin?
Hey, that'll be awesome if you do!
The current SMTP plugin doesn't seem to work in my configuration, so shelling out to the 'mail' command might be an awesome work around.
Cheers,
-e-
The current SMTP plugin doesn't seem to work in my configuration, so shelling out to the 'mail' command might be an awesome work around.
Cheers,
-e-