SABnzbd stats script for XChat (linux)
SABnzbd stats script for XChat (linux)
I search everywhere for such plug-in/script without any luck. Few months ago when I used to use HellaNZB there was a script located at http://nerdsonlinux.com/x-chat-plugins/nzbstats/ what workd flawless, but I had to switch to SABnzbd+. HellaNZB is outdated and has a lot annoying bugs... I got no knowledge in any programming what so ever... so if anyone can help me edit that script to work in SABnzb or find another one I will be thankful..
Re: SABnzbd stats script for XChat (linux)
Download
works with authentification now!
Hi,
maybe this will be helpfull. I'm not really experienced in bash/tcl programming but somehow made it work (for me version: 0.4.9)
Its a simple bash script with some switches, which should be located in a folder like /usr/bin and a tcl file for xchat which calls this bash script and returns the output
In xchat the output will be something like:
sabnzb+ Current Speed: KB/s | Queue MB | ETA | Overall Download GB
*edit* deleted
it takes a while until the ouput appears.
*edit*deleted
*edit* works only WITHOUT user authentification!
If it works HF
*edit2* feedback welcome! this script took me a while because of the regex which i'm not really familiar with. If some ppl are intressted i maybe will spend some more time on it!
works with authentification now!
Hi,
maybe this will be helpfull. I'm not really experienced in bash/tcl programming but somehow made it work (for me version: 0.4.9)
Its a simple bash script with some switches, which should be located in a folder like /usr/bin and a tcl file for xchat which calls this bash script and returns the output
In xchat the output will be something like:
sabnzb+ Current Speed: KB/s | Queue MB | ETA | Overall Download GB
*edit* deleted
it takes a while until the ouput appears.
*edit*deleted
*edit* works only WITHOUT user authentification!
If it works HF
*edit2* feedback welcome! this script took me a while because of the regex which i'm not really familiar with. If some ppl are intressted i maybe will spend some more time on it!
Last edited by lommes on July 5th, 2009, 2:30 pm, edited 1 time in total.
Re: SABnzbd stats script for XChat (linux)
Thanks, I will give it a try.. also there's a small typo on the tlc file "sabnbd+" should be sabnzbd+ or SABnzbd+
EDIT: I keep getting this error:
[10:58:28] Tcl plugin ERROR (alias SAB)
[10:58:28] missing close-bracket
[10:58:28] while compiling
[10:58:28] "/say SABnbzd+ - Current Speed: [string trim [exec sabgetdata speed] KB/s | Queue: [string trim [exec sabgetdata queue] MB | ETA: [string trim [exec sa..."
EDIT: I keep getting this error:
[10:58:28] Tcl plugin ERROR (alias SAB)
[10:58:28] missing close-bracket
[10:58:28] while compiling
[10:58:28] "/say SABnbzd+ - Current Speed: [string trim [exec sabgetdata speed] KB/s | Queue: [string trim [exec sabgetdata queue] MB | ETA: [string trim [exec sa..."
Last edited by fredlkrue on June 24th, 2009, 10:05 am, edited 1 time in total.
Re: SABnzbd stats script for XChat (linux)
as said ... recoded without testing there are several brackets missing
alias sab {
/say sabnzbd+ - Current Speed: [string trim [exec sabgetdata speed]] KB/s | Queue: [string trim [exec sabgetdata queue]] MB | ETA: [string trim [exec sabgetdata eta]] | Overall Download: [string trim [exec sabgetdata dltotal]] GB
}
this should look better
but i'm still not sure if exec with a switch works like this :/
*edit*
there you go
thats how these lines like at my system (still with the typo ) and there seems to be an error with the overall download, because some are missing (but also in my history)
alias sab {
/say sabnzbd+ - Current Speed: [string trim [exec sabgetdata speed]] KB/s | Queue: [string trim [exec sabgetdata queue]] MB | ETA: [string trim [exec sabgetdata eta]] | Overall Download: [string trim [exec sabgetdata dltotal]] GB
}
this should look better
but i'm still not sure if exec with a switch works like this :/
*edit*
there you go
thats how these lines like at my system (still with the typo ) and there seems to be an error with the overall download, because some are missing (but also in my history)
Last edited by lommes on June 24th, 2009, 11:48 am, edited 1 time in total.
Re: SABnzbd stats script for XChat (linux)
Thanks, but you have to give executable permissions (Ubuntu 9.04) for that file with the command: "sudo chmod 755 /usr/bin/sabgetdata".
Re: SABnzbd stats script for XChat (linux)
Yeah and only working with Plush so far. The other templates do not inlude the information at the same place.
Re: SABnzbd stats script for XChat (linux)
Update:
First of all THX to jcfp for reviewing, shortening, improveing and speeding up my code from the first post!
This version:
- much faster
- using api
- some more options in XChat (i.e. display to yourself only ... /sab help or have a look to the README)
- README file which explains how to install and use
- working with templates other than Plush
First of all THX to jcfp for reviewing, shortening, improveing and speeding up my code from the first post!
This version:
- much faster
- using api
- some more options in XChat (i.e. display to yourself only ... /sab help or have a look to the README)
- README file which explains how to install and use
- working with templates other than Plush
Last edited by lommes on June 30th, 2009, 3:38 pm, edited 1 time in total.
Re: SABnzbd stats script for XChat (linux)
Great improvement, fast response. I think you need to add in the README file that we need to install xml2, also I suggest you change sabnzbd+ to SABnzbd+, I think it will look much better
EDIT: Will it be possible to have just one file, like for example just the tcl file. Also add the name of the current downloading (NZB) file to the stat spam.
EDIT: Will it be possible to have just one file, like for example just the tcl file. Also add the name of the current downloading (NZB) file to the stat spam.
Last edited by fredlkrue on June 26th, 2009, 8:35 pm, edited 1 time in total.
Re: SABnzbd stats script for XChat (linux)
I added the possibility to add the current nzb to the output, but its optional because it maybe a very long term or illegal stuff.
AUTHENTIFICATION ADDED!
/sab nzb - will print the current nzb to yourself
/sab +nzb - will add the nzb to the channel spam
README is updated and sabnzbd+ is changed to SABnzbd+ in the XChat output.
It should be possible to merge the files so only the tcl is needed, but i use this script for other purpose too so it would double my work in updating
AUTHENTIFICATION ADDED!
/sab nzb - will print the current nzb to yourself
/sab +nzb - will add the nzb to the channel spam
README is updated and sabnzbd+ is changed to SABnzbd+ in the XChat output.
It should be possible to merge the files so only the tcl is needed, but i use this script for other purpose too so it would double my work in updating
Last edited by lommes on June 30th, 2009, 3:38 pm, edited 1 time in total.
Re: SABnzbd stats script for XChat (linux)
Thanks a lot ..
Re: SABnzbd stats script for XChat (linux)
* Added Pause/Resume
* Menu in XChat
* Script is now executed from ~/.xchat2
* Menu in XChat
* Script is now executed from ~/.xchat2
Last edited by lommes on June 30th, 2009, 3:38 pm, edited 1 time in total.
- Shadowtester
- Newbie
- Posts: 44
- Joined: July 31st, 2008, 11:04 am
Re: SABnzbd stats script for XChat (linux)
Is there any chance to get this working in window xp for us poor saps who have to use windows on some pc's who also use Xchat and SABnzbd+ on remote machines
Re: SABnzbd stats script for XChat (linux)
The Script uses many unix commands to arange the SABnzbd+ output. These commands are not available in WinXP (out of the box). Most of them 'maybe' available through gnuwin32 (like sed). But even if all of the used commands are available there is no guarantee that the script will work. I don't have any windows running so no chance to do some testing.
Re: SABnzbd stats script for XChat (linux)
Thanks a lot lommes, great features
Maybe too much to ask, but maybe a way to be able to change colors without editing the script with a text editor, like using a gui in xchat.
EDIT: Maybe its a good idea to add the options pause and resume under "Valid options"
Maybe too much to ask, but maybe a way to be able to change colors without editing the script with a text editor, like using a gui in xchat.
EDIT: Maybe its a good idea to add the options pause and resume under "Valid options"
Code: Select all
print "Usage: /sab option"
print ""
print "Valid options are:"
print "speed - Current Speed"
print "queue - Queue Size"
print "eta - ETA"
print "dltotal - Totally downloaded"
print "e - Displays all the above options"
print "nzb - Displays the current NZB"
print "+nzb - Adds the NZB to the channel spam"
print "pause - Pauses SABnzbd+"
print "resume - Resumes SABnzbd+"
print ""
Last edited by fredlkrue on June 29th, 2009, 11:39 pm, edited 1 time in total.
Re: SABnzbd stats script for XChat (linux)
Download see first reply
Changes:
0.6
* added trigger /sabadd
* 'silent' output of /sab nzb now includes the remaining size of the current download
* output of option help updated
0.5
* XChat menu added
* pause/resume added
0.4
* authentification added
* option nzb and +nzb added
* changed sabnzbd+ to SABnzbd+ in the XChat output
Changes:
0.6
* added trigger /sabadd
* 'silent' output of /sab nzb now includes the remaining size of the current download
* output of option help updated
0.5
* XChat menu added
* pause/resume added
0.4
* authentification added
* option nzb and +nzb added
* changed sabnzbd+ to SABnzbd+ in the XChat output