Page 1 of 1

[linux]Help with post-processing script

Posted: January 25th, 2014, 2:34 pm
by arastaf
Currently I have a faily complex post-processing script in powershell. I moved my sabnzbd install to linux to use ZFS file system. Since I already moved to linux, I am running these as a task on my desktop, but would like to move it off my desktop as it would make the process about 20 minutes faster(runs every 15minutes). The main issue I run into when trying to setup the linux scripts is nothing is readable, powershell scripts if you don't shorthand everything is much easier to follow.

This is what I am looking to do, and posting my current powershell script that might make it easier to follow.

First I set the $path where the files are, and the $dest for where they will end up. I have the destination sorted by Porn Stars names(this will be used later). I rename the folders to remove all the "junk" in the folder names; XXX, 720p, 1080p, etc..

Then the script recrusively get a list of files in the download location, and renames only the mp4, wmv files to the same name as the parent folder.

Then I get a list of all the Porn Stars, and scan the download folders names for each porn star, when a match is found it pulls the .mp4, wmv, f4v, and .mkv files from the download path and places them in the matching Star folder in the destination.

Lastly it cleans up the empty folders in the download location.

This works 100% of the time, unless you have a porn star with a single word name like "Christy" then if you download something for "Christy Mack" would be placed in the Christy folder. Not really an issue I face.

Re: [linux]Help with post-processing script

Posted: January 25th, 2014, 3:21 pm
by sander
arastaf wrote:The main issue I run into when trying to setup the linux scripts is nothing is readable, powershell scripts if you don't shorthand everything is much easier to follow.
If you mean Linux *shell* scripts: I totally agree!

I would advice you to use python instead: easy to understand, easy to program, cross-platform. SABnzbd itself is written in Python.

HTH