Two little linux scripts
Posted: November 9th, 2008, 11:26 am
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!
**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!