GNO Lab

All about nothing. Don't Panic!

Browsing Posts in Utilities

Do you have a lot of downloaded material, coming from bittorrent downloads, or from a FTP-session, where the content is encapsulated in big multi-volume archives like RAR and ZIP files (a.k.a. scene releases). Unpacking those archives can take a lot of manual effort before the actual content can be consumed.

This Python script tries to ease the burden of processing this kind of material, by investigating the directory and categorize its files as one of

  • archive, i.e. the files belongs to an archive, for example file.rar and file.001, etc. The archive also has a base file, that is, the first file in the archive, usually the file having the extension .rar in case of RAR-archives.
  • file, the file is an ordinary file, for example any *.nfo , and *.jpg file.
  • ignored, extra files, not needed for consumption, like those hash files (*.diz, etc.) used only to verify the downloaded content, and also sample, i.e a path matching *sample*.

The tool automatically unpacks the archives, and copies the files, to a given destination (or the current directory if you so like). Further, the destination directory can be derived  by removing a incoming base from the folder examined. The part left is appended to the destination given (or the current directory). Using this feature you can mimic  your content structure  within your download structure, without needing to create folders before moving the downloaded content into its final destination – all is taken care of within  btpostprocess.

Examples:

$ btpostprocess --process --incoming-base=/downloads/ready/pictures \
--base-path=/downloads/ready/pictures/cats \
/torrents/cats.torrent MyPictures

Finds archives and files in /downloads/ready/pictures/cats and a sub-folder indicated by the cats.torrent (or directly under /downloads/ready/pictures/cats) and unpack archives and copy files
into a cats sub-folder under MyPictures. The incoming-base is
used to construct a derived sub-folder under the destination folder.

Integration

The script was made with rtorrent in mind. By using  rtorrent’s  on finished capabilities the post processing can be set up using something like (version 0.8.2):

on_finished = process,"execute=btpostprocess,--incoming-base,/srv/incoming,--base-path,$d.get_base_path=,$d.get_tied_to_file=,/srv/depot"

Indicating downloads are to be found under /srv/incoming, and a folder given by the tied torrent file. Any files downloaded are unpacked (in case of archives) and copied into a sub-folder of /srv/depot.

In case you need to run some logic before spawning btpostprocess, for example, deciding if the download path is outside the normal download path, and in that case skip the post processing, all you need is to wrap the btprocess in a more specific on_finished script.

It’s all about automationDOWNLOAD

Ever got tired of all unpacking of scene releases where movies (and software)
is distributed in multi-volume RAR archives. For each archive you need to find the archive’s start file, maybe create a destination directory, copy the NFO file etc, etc…

This tool tries to ease the process of unpacking these scene releases. Instead of focusing on RAR-files, the tool takes as input a directory, which is scanned for archives. A destination folder tells you where to to unpack.
Top directories are created as needed. Extra material, for example, NFOs are copied automatically.

You can use drag’n'drop to scan directories, and set destinations. Values
are remembered between runs. Several archives can be unpacked in parallel.

Download

Download the required files. You need to have .NET 2.0 installed. You can download the runtime from Microsoft.

Installation

Copy the files to any destination. Create your own shortcuts as needed.

Tip: If you create a shortcut in %USERPROFILE%\SendTo you can use the context
menu, on folders, to open the application and scan the selected folder.

Be aware. This tools is released as free software. I take no responsibilities
for any lost of data, etc.

TODO:

  • Understand exceptions a bit better.
  • Rework,  and fix bugs… yes there is ;)

Screenshots
Screenshot

Fell free to download.