post-processing scripts.. a few questions

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Mr5o1
Newbie
Newbie
Posts: 5
Joined: February 27th, 2011, 10:32 pm

post-processing scripts.. a few questions

Post by Mr5o1 »

Hey there, I have a few questions about post processing scripts. Some of these I may be able to answer with my own research (which I'm doing now) but a cursory search hasn't shown up any results. If you can point me in the right direction on any of this, I'd much appreciate it.
  • Based on the post-processing page in the wiki, I'm assuming that any script will work so long as it's executable by the sabnzbd user. On a linux system that means python will work, so long as you have the hash-bang. What about windows? Does installing sab mean you have the ability to execute arbitrary python files?
  • Another way to ask the same question above. If I want to make a script that is fairly portable, what is the best language to use? Or is the answer to use batch files and bash scripts?
  • I'm looking to find a way to check what server articles were missing from with the post-processing script. I can see I would be able to parse the log file to find some of this. Is there a more efficient way to get this information than from the post-processing script?
  • To work with the files that were actually downloaded, rather than the extracted result, how do I find the download folder?
  • I assume scripts are executed in the script directory right?
  • Is there any way to access configured sab options
  • http://wiki.sabnzbd.org/configure-switches seems to indicate I can change the default post-processing (repair, +extract, +delete) for jobs. But I can't see that in my switches on 0.7.x. Has that option been deprecated?
Thanks in advance!

edit: have marked the answers I found.. see I am at least trying!
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: post-processing scripts.. a few questions

Post by shypike »

On Windows ,SABnzbd picks "executable" extensions as defined in the PATHEXT environment variable.
Creating portable scripts is a challenge in general. Python would be candidate, but it's probably hard without platform-specific conditional code.
Finding out which articles are missing? Not in a post processing script.
The "current directory" of scripts is SABnzbd's program folder, but your first parameter is the full path to the processed result.
The default PP value is set in the default category in Cfg->Categories.
Post Reply