Two little linux scripts

Got a program that plays well with SABnzbd? Share it here!
Post Reply
babiulep
Newbie
Newbie
Posts: 10
Joined: November 8th, 2008, 10:15 am

Two little linux scripts

Post 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!
Last edited by babiulep on November 10th, 2008, 2:08 pm, edited 1 time in total.
twpux
Newbie
Newbie
Posts: 9
Joined: October 7th, 2008, 11:19 am

Re: Two little linux scripts

Post by twpux »

Thanks mate! I'm using the bash-version with conky and it works great:)
coatezy
Newbie
Newbie
Posts: 13
Joined: June 29th, 2010, 6:12 pm

Re: Two little linux scripts

Post 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
coatezy
Newbie
Newbie
Posts: 13
Joined: June 29th, 2010, 6:12 pm

Re: Two little linux scripts

Post 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! :)
tobiasthecommie
Newbie
Newbie
Posts: 21
Joined: March 14th, 2010, 11:24 am
Contact:

Re: Two little linux scripts

Post 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
Fully featured (as of 0.5.3) CLI and Curses client at:

http://code.google.com/p/sabcli/
babiulep
Newbie
Newbie
Posts: 10
Joined: November 8th, 2008, 10:15 am

Re: Two little linux scripts

Post by babiulep »

Yip, coatezy, you need to add the api-key for the script(s) to work...
I.e.; &apikey=

Thanks for using it  ::)
A_T
Newbie
Newbie
Posts: 13
Joined: August 13th, 2011, 5:13 am

Re: Two little linux scripts

Post 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?
Post Reply