Solved: Disable or truncate Script log in history

Come up with a useful post-processing script? Share it here!
Post Reply
twicedead
Newbie
Newbie
Posts: 4
Joined: June 15th, 2012, 9:47 pm

Solved: Disable or truncate Script log in history

Post by twicedead »

I've tried searching the forum but the closest topic I found was someone mentioning a script that removes porn history...

Anyways, I also searched offsite, and someone raised this question on the sickbeard code page but never received an answer here: http://code.google.com/p/sickbeard/wiki/PostProcessing

I can't link to the comment directly so I'll quote it here

Could the result of the script be somewhat shortened ?

The "Processing succeeded for X:\YYYYYYYYYYYYY\ZZZZZZZZZZ\AAAAAAA\Someshow.S03E23?.Titletitle.moretitle.720p.WEB-DL.DD5.1.H.264-KiNGS\verylongfilename"

Bit in the second column of the sabnzbd history is taking up a whole lot of screen real estate , resulting in history entries being twice as high as before.

Can this be helped by making the output of the script smaller ? Or should the makers of sabnzbd be asked to include an option to not show it ?

Thnx in advance.
I have a similar question, from my understanding from this page: http://wiki.sabnzbd.org/user-scripts
The console output of the script is captured by SABnzbd and is saved in the so called "Script Log": to see that log, in the History overview, click on the "More" after the green text on the right hand side .
The file will be added to the (optional) notification email and can be examined in the History page.
sab is the one that captures the output and produces that green text next to a history item, so my question is can this be turned off or at least truncated to the point where the items on the left won't have an absurd amount of space between them? I know it may sound trivial but it's much more difficult to read the history items (it gives me nausea/I may possibly have ADD I'm not sure), and I don't really have a use for the script logging feature :-[ Thanks for any help.
Last edited by twicedead on June 16th, 2012, 2:39 pm, edited 2 times in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Help With Categories

Post by shypike »

To answer your last question.
Just make it so that the script doesn't produce any output.
@echo off
my-program 2>&1 >nul
twicedead
Newbie
Newbie
Posts: 4
Joined: June 15th, 2012, 9:47 pm

Re: Help With Categories

Post by twicedead »

shypike wrote:To answer your last question.
Just make it so that the script doesn't produce any output.
@echo off
my-program 2>&1 >nul
Thanks for the reply.

Where would I put those arguments? The script is an .exe, sabtosickbeard.exe, so I tried making a bat file with those commands that would then run the script and it didn't work so I guess I am missing something ><
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Help With Categories

Post by shypike »

@echo off
Sab2sickbeard.exe >&2 >nul %1 %2 %3 %4 %5 %6 %6 %7 %8 %9
twicedead
Newbie
Newbie
Posts: 4
Joined: June 15th, 2012, 9:47 pm

Re: Help With Categories

Post by twicedead »

shypike wrote:@echo off
Sab2sickbeard.exe >&2 >nul %1 %2 %3 %4 %5 %6 %6 %7 %8 %9
I'm sorry, but where should I put it? Sorry if it's obvious It's just that this is my first time using scripts for Sabnzbd.

Thanks for all the help!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Disable or truncate Script log in history

Post by shypike »

Create a file with that content and call it sab2s.cmd (you may have to add a full path to sab2sickbeard.exe).
Put the file in the same folder as sab2sickbeard.exe and pick that as a script in Config->Categories.

Of course you could also complain in the SickBeard forum :)
twicedead
Newbie
Newbie
Posts: 4
Joined: June 15th, 2012, 9:47 pm

Re: Disable or truncate Script log in history

Post by twicedead »

shypike wrote:Create a file with that content and call it sab2s.cmd (you may have to add a full path to sab2sickbeard.exe).
Put the file in the same folder as sab2sickbeard.exe and pick that as a script in Config->Categories.

Of course you could also complain in the SickBeard forum :)
Alright! It works perfectly, doesn't say a single thing, and I needed the full path to the script. Initially I thought it would need quotes because the path has a space in it, but it doesn't.

I want to try your solution first, as from the information I've seen it'll probably be easier your way.

Anyways, thanks for everything shypike, I hope this helps other people as well.

If anyone else needs it, ultimately I ended up having to quote the path

Code: Select all

@echo off

set PATH = "C:\Program Files (x86)\SABnzbd\SickBeard build495\autoProcessTV\Sab2sickbeard.exe"

PATH >&2 >nul %1 %2 %3 %4 %5 %6 %6 %7 %8 %9
Just need to replace the path to wherever you have it.

Edit: Ultimately, it didn't work. I guess sab has to pass some commands to the script that the cmd file isn't passing on to it, I guess I'll just give up for now, too much time spent on such a trivial issue.
Post Reply