nzbsort

Fork me on GitHub

Sort your NZB files alphabetically before downloading them. This will allow you to stream/uncompress the files in the right order and possibly pipe the output to a media player. We don't respect the alpha sorting for the first .rar file, since .r00 should be before .rar but in practice, we want it after.

usage

This tool was designed to be simple and work with stdin/stdout. Here are a few examples, all doing the same thing:

$ nzbsort < original.nzb > output.nzb
$ nzbsort original.nzb > output.nzb
$ cat original.nzb | nzbsort > output.nzb

play movies before they're done

Now that you can get your files in order, here is one way to play a movie right away without having to wait for everything to be done (requires mplayer and rar):

# First identify the final file name
$ rar l "My Movie.part01.rar"
$ mkfifo "My Movie.avi"
$ rar x "My Movie.avi"
# Reply 'Y' when it prompts you to override, now press ^Z and resume the
# process in the background with 'bg':
$ bg
$ mplayer "My Movie.avi"

download / installation

You can download it from the python cheese shop: http://pypi.python.org/pypi/nzbsort/ or with pip:

$ pip install nzbsort

suggestions, patches welcome

Feel free to clone/fork my repository and send patches, my mail is at the bottom of the page:

https://github.com/tamentis/nzbsort

Last updated: 2010-10-02