Hi,
I have been looking for info on how to write a post processing script but cant find anything.
Is there such a thing as an howto about this feature?
I have a bash script now that just loops and looks in the completed dir for series to copy to my NAS but it would be much nicer to use it as a post processing script.
I just do not know how, things like How is the info of the downloaded file passed to the script etc. are not clear to me.
Post processing script howto?
Re: Post processing script howto?
THanx,
I searched for that page but did not find it.
I searched for that page but did not find it.
Re: Post processing script howto?
The SABnzbd distribution comes with a sample script called Sample-PostProc.sh
It is a trivial script, but it does tell you what the parameters do.
Of course we do not provide a script writing course. There's plenty of material
available on the Web on Unix scripting.
It is a trivial script, but it does tell you what the parameters do.
Of course we do not provide a script writing course. There's plenty of material
available on the Web on Unix scripting.
Re: Post processing script howto?
No need for that, indeed plenty examples on the net and I can manage quite well when it comes to a Unix shell script (I even had one created which works preatty well already).shypike wrote: Of course we do not provide a script writing course. There's plenty of material
available on the Web on Unix scripting.
I just wanted to know how SABNZBD handles the output and input as well as the interaction with the script, It was silly of me not to think of the obvious $1, $2 etc. (or %1 etc. in dos scripts).
Re: Post processing script howto?
Hi,
I kind of miss one variable her that would be nice to implement in the next version if possible.
The final unpacked files.
Like if you download a csi.01.02.nzb that after paring unraring etc. produces a csi.bla.bla.01.02.mkv it would be nice to have a $7 that shows csi.bla.bla.01.02.mkv when you do echo $7.
Maybe something for next release?
I kind of miss one variable her that would be nice to implement in the next version if possible.
The final unpacked files.
Like if you download a csi.01.02.nzb that after paring unraring etc. produces a csi.bla.bla.01.02.mkv it would be nice to have a $7 that shows csi.bla.bla.01.02.mkv when you do echo $7.
Maybe something for next release?
Re: Post processing script howto?
This would work only for single file downloads, you'd be surprised how may jobs unpack dozens of files.
What's the use anyway? You already get the folder path, so $7 would contain the list
of files in that folder. It's not particularly difficult to get that list yourself.
What's the use anyway? You already get the folder path, so $7 would contain the list
of files in that folder. It's not particularly difficult to get that list yourself.
Re: Post processing script howto?
Hmm,shypike wrote: This would work only for single file downloads, you'd be surprised how may jobs unpack dozens of files.
What's the use anyway? You already get the folder path, so $7 would contain the list
of files in that folder. It's not particularly difficult to get that list yourself.
Guess so,
I am creating a script to copy the downloaded series to my NAS.
And using the file string I could use that.
But like you say I can also just do the mv *.* from the directory printed in the $1
Re: Post processing script howto?
I'd use '*' and not '*.*'