Got a program that plays well with SABnzbd? Share it here!
masterx
Newbie
Posts: 29 Joined: March 13th, 2010, 5:34 am
Post
by masterx » March 13th, 2010, 5:36 am
This code can display some basic info from SABNZBD in Geektool. Hope you like it
Code: Select all
curl --silent "http://localhost:8080/api?mode=qstatus&output=xml&apikey=APIKEY" | grep -e timeleft -e mb -e filename -e speed -e state|
sed -e /'<jobs>'/s//''/ -e /'<job>'/s//''/ -e /'<timeleft>'/s//'Time Left: '/ -e /'<\/timeleft>'/s//''/ -e /'<mb>'/s//'Size: '/ -e /'<\/mb>'/s//' Mb'/ -e /'<filename>'/s//'File: '/ -e /'<\/filename>'/s//''/ -e /'<mbleft>'/s//'Size Left: '/ -e /'<\/mbleft>'/s//' Mb'/ -e /'<speed>'/s//'Bandwidth: '/ -e /'<\/speed>'/s//'Kb\/sec'/ -e /'<state>'/s//'State: '/ -e /'<\/state>'/s//''/
masterx
Newbie
Posts: 29 Joined: March 13th, 2010, 5:34 am
Post
by masterx » March 15th, 2010, 2:06 pm
Very simple script because of a well made program and documentation
The best part, is that it is possible to monitor all sabnzbd servers as long as you have webaccess to it and have the APIKEY
I just wish it could be possible to make the script smaller
clony3k
Newbie
Posts: 8 Joined: February 3rd, 2010, 11:53 am
Post
by clony3k » March 21st, 2010, 12:29 pm
How do i use it? i copy'ed and pasted it into shell with the command and a 2 sec refresh, but nothing comes up...
clony3k
Newbie
Posts: 8 Joined: February 3rd, 2010, 11:53 am
Post
by clony3k » March 21st, 2010, 1:18 pm
pair of dimes wrote:
clony3k wrote:
How do i use it? i copy'ed and pasted it into shell with the command and a 2 sec refresh, but nothing comes up...
Are you using this in OS X?
http://projects.tynsoe.org/en/geektool/
It's not simply a terminal command. It must be used with that program.
yeah, osx and geektool but whit no luck.. do i need to add the api key somewere in the code?
Camelot
Jr. Member
Posts: 64 Joined: August 18th, 2008, 6:23 am
Post
by Camelot » March 21st, 2010, 5:46 pm
yea, I am going to guess it's where it says:
replace the APIKEY bit with your sabnzbd apikey
clony3k
Newbie
Posts: 8 Joined: February 3rd, 2010, 11:53 am
Post
by clony3k » March 21st, 2010, 5:59 pm
Camelot wrote:
yea, I am going to guess it's where it says:
replace the APIKEY bit with your sabnzbd apikey
Tried that, but with no luck....
Camelot
Jr. Member
Posts: 64 Joined: August 18th, 2008, 6:23 am
Post
by Camelot » March 22nd, 2010, 4:31 am
just to make sure we are on the same page: if you are running geektool on a different computer from the one running sabnzbd, have you changed the http command to query the ip of the machine running sabnzbd? (replace localhost with ip or dynamic dns hostname)?
What do you get returned if you run just this bit in the terminal:
Code: Select all
curl "http://<IP>:8080/api?mode=qstatus&output=xml&apikey=<APIKEY>"
I removed the "—silent" so we can potentially get some more output
masterx
Newbie
Posts: 29 Joined: March 13th, 2010, 5:34 am
Post
by masterx » July 24th, 2010, 1:56 pm
pair of dimes wrote:
clony3k wrote:
How do i use it? i copy'ed and pasted it into shell with the command and a 2 sec refresh, but nothing comes up...
Are you using this in OS X?
http://projects.tynsoe.org/en/geektool/
It's not simply a terminal command. It must be used with that program.
Well it should work in terminal too... But i've only tested it on OSX (Geektool and Terminal)
lextou
Newbie
Posts: 1 Joined: May 10th, 2010, 1:59 pm
Post
by lextou » August 5th, 2010, 10:59 am
thank you for the script; a very nice way to show the sabnzbd info on your desktop indeed! i wonder, is there a way to edit the script to just show the downloadspeed, the time remaining (for the active downloads) and the state? i've been tinkering with it a bit, but can't seem to get it to work properly! the result:
time remaining (active downloads)
time remaining (total downloads)
downloadspeed
time remaining (active downloads)
state
i would like to get rid of the first 2 output lines and let it start with the downloadspeed followed by remaining 2!
thanx in advance!