Page 1 of 1

Two little linux scripts

Posted: November 9th, 2008, 11:26 am
by babiulep
Hello all!

**EDIT**
New version of nzbstatus.sh.
Previous version only showed one job...
Sorry :-(
**EDIT**

Here are two little scripts to use with, for instance, 'conky'.
under Linux. I use the php-version on Ubuntu.

It gives the following information:
"total time left" @ "your download speed"   "total MiB remaining/total MiB in queue"

And the job list:
"Filename 1"... : "total MiB remaining"
"Filename 2"... : "total MiB remaining"
"Filename 3"... : "total MiB remaining"
"Filename 4"... : "total MiB remaining"
"Filename 5"... : "total MiB remaining"

Example:
>>> SABnzbd -----------------------------------
2:11:34 @ 512.55 k/s 8578.23/12265.35 MiB

Ubuntu.iso     :  3687.12 MiB
Mandriva.iso   : 8045.35 MiB


Please remove the '.txt' from the files and make them executable...
They both work on my system and are very resource friendly...
This is my line in the .conkyrc file:

>>> SABnzbd $color$stippled_hr
${exec ~/nzbstatus.sh}

For the php-version:
- adjust the path to the php cli binary (#!/usr/bin/php -q)
- SimpleXML is needed: The extension is enabled by default according
  to php.net (http://www.php.net/manual/en/simplexml.installation.php)
- the script outputs the first 25 characters from the filename ($node,0,25) 
  you can change that...

For the bash-version:
- you will need 'xmlstarlet' for this to work
- also needed is 'wget' and 'awk', these are quite common on linux systems afaik
- the script outputs the first 25 characters from the filename (${FILE:0:25}) 
  you can change that...

Perhaps somebody finds these useful :-)

Greetings!

Re: Two little linux scripts

Posted: November 25th, 2008, 11:00 am
by twpux
Thanks mate! I'm using the bash-version with conky and it works great:)

Re: Two little linux scripts

Posted: August 5th, 2010, 3:32 pm
by coatezy
Sorry I know this is an old post but I was wondering if this script/bash file should still work with current version of sab.. I am running the bash file in terminal and pointing to my server with sab but receive an output of No jobs... each time.. Even though I have jobs running.. I would like to get this script running with Conky as it was intended for. :) Its the bash version that I'm trying to use.. Would be great if someone could scan over the script to make sure all is ok!? Im wondering if there is problems with api's or something along them lines?

Really hope someone can help on this one! :D

Thanks again guys!
Coatezy

Re: Two little linux scripts

Posted: August 5th, 2010, 3:37 pm
by coatezy
Sorry guys I feel really stupid.. Just read this sticky as soon as I posted this

http://forums.sabnzbd.org/index.php?topic=1960.0

Dont know how I didnt spot it before and it explains it all!   ::)

All working great now! Looking forward to getting this in my conky script! :)

Re: Two little linux scripts

Posted: August 16th, 2010, 9:31 am
by tobiasthecommie
Just to toot my own horn. If you are still having trouble with this script i have made a cli and a curses terminal program for sabnzbd.

If python is aok with you. It ain't bash, but it is up to date as 0.5.3

Re: Two little linux scripts

Posted: August 16th, 2010, 1:29 pm
by babiulep
Yip, coatezy, you need to add the api-key for the script(s) to work...
I.e.; &apikey=

Thanks for using it  ::)

Re: Two little linux scripts

Posted: January 7th, 2012, 5:01 am
by A_T
Sorry to drag this back from the dead but does anyone have a script they're using with Conky at the moment?