Should I bother posting a script that is mostly java?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
akevit
Posts: 1
Joined: 19 Aug 2014, 23:46

Should I bother posting a script that is mostly java?

Post by akevit »

The only functionalities I used from the groovy scripting language were renaming and extracting files, otherwise it was java.

Anyways what it does is it takes a folder (I:\HD Movies) which contains folders (I:\HD Movies\MovieABC) that contain .rar archives (or any archive per the list) and extracts the contents of the archive to a temp folder, renames the movie file, then transfers the file back to the root folder (I:\HD Movies) and deletes the previous folder (I:\HD Movies\MoviesABC). Currently it just processes everything that's in the archive container as it is easy enough to manually clean out the few other files that are in the archive, but for the most part the archive just contains the video file.

I have a lot of stuff that was packed in rar format since I could remain seeding it and XBMC could play it, but now that I'm moving to Plex I needed to get rid of this style of formatting.

So not sure if there are rules against the style of code for the script I have, but if requested I can post it with a bit more explanation, comments, and do a little refractoring so it's easier to read.

Link: http://pastebin.com/Cg56cuaE

There are is one main hardcoded variable which is the variable to the temp folder, I can easily make that a command line argument. Also I don't fully understand how to properly code with groovy scripts since I had issues with declaring local variables which is why there's some redundancy.
User avatar
rednoah
The Source
Posts: 23946
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Should I bother posting a script that is mostly java?

Post by rednoah »

Sure, you can also post it on pastebin or as Gist.

But it seems to be very specialized so you'll need a good documentation on usage otherwise people won't know how to use it.

I'd make my own thread for that.
:idea: Please read the FAQ and How to Request Help.
Post Reply