noisybox.net

nzbperl FAQ:

  1. Is there an email list/group for nzbperl?
  2. How can I make nzbperl delete my nzb files once they're complete?
  3. How can I make nzbperl rename my .nzb file to .nzb.done or similar?
  4. I'm in a hurry and want to get nzbperl working on my Debian box...
  5. How can I get nzbperl to run on Windows?
  6. Can I make nzbperl throttle its bandwidth based on time of day?

  1. Q: Is there an email list/group for nzbperl?

    A: Yes there is, via google groups: http://groups.google.com/group/nzbperl

    You can use the email list to submit feedback, questions, etc.

  2. Q: How can I make nzbperl delete my nzb files once they're complete?

    A: It may depend on your usage, but many users would like to delete their nzb files once completed. Usually, this question stems from users who use the --queuedir option and don't want nzbperl to reprocess files.

    The most straightforward to automate this is with the --postnzb option, as in the following:

    nzbperl.pl --postnzb 'rm $NZBP_NZBFILE' <other options here>

  3. Q: How can I make nzbperl rename my .nzb file to .nzb.done or similar?

    A: Again, it may depend on your usage, but a good approach is to use the --postnzb option with something like:

    nzbperl.pl --postnzb 'mv $NZBP_NZBFILE{,.done}' <other options here>

  4. Q: I'm in a hurry and want to get nzbperl working on my Debian box. How can I get the required dependencies satisfied quickly?

    A: Here's the quick way to get nzbperl dependencies satisfied on Debian:

    # apt-get install libxml-dom-perl libterm-readkey-perl uudeview

    (if there are additional deps, let apt-get install them as well). Then download nzbperl.pl and place it in your path. Viola!

  5. Q: How can I get nzbperl to run on Windows?

    A: At present, nzbperl has only been known to work on Windows in the cygwin environment. There are termcap issues that prevent nzbperl from running properly in a native Windows cmd.exe terminal.

    You should download and install cygwin along with Perl and the required modules. Once cygwin is working, it's recommended that you use the native rxvt to run nzbperl. Assuming cygwin is installed in c:\cygwin, you should be able to run rxvt natively by running:

    c:\cygwin\bin\rxvt -e /bin/bash -login

    and then fire up nzbperl as you wish.

  6. Q: Can I make nzbperl throttle its bandwidth based on time of day?

    A: Yes, through a cron job and the remote control functions of nzbperl.

    So nzbperl has the --rcport <portno> option, which will open up a socket to allow remote control of the program. There are obvious security issues with this option, so please exercise caution (ie. appropriate firewalling and permissions) and do not use that option on a publically available host.

    Anyway, launching nzbperl with

    nzbperl.pl --rcport 8066 <other options here>

    will create a socket listener on port 8066. As of version 0.6.7, nzbperl has a remote control command called "speed" which takes a single parameter: the desired speed in kBps. It should look like "speed N\r\n" (where N is the target speed in kBps).

    Netcat (or nc) can then be used to automate sending of commands to nzbperl. For example, to set the nzbperl bandwidth to 121kBps on the localhost, the following command can be used:

    echo -en 'speed 121\r\n' | nc -q 1 localhost 8066

    I've heard that certain places (parts of Australia?) charge more or less for bandwidth depending on the time of day. If this is the case, one or more cron jobs can be set up to perform the above in an automated, time-of-day based fashion. Tweak to suit your needs.