Last updated on 11 Jul 2001, at 22.01 CDT.

awpralf.cmd v0.3.1 - global plugin for Auto WGet Daemon

By Ralf Maseratis (ralf_maseratis@esper.ping.de). This product includes software developed by Dmitry A.Steklenev.

  1. Short description
  2. Prerequisites
  3. Installation
  4. How it works
  5. Limitations, Possible Problems, To Do and Don't ask for...
  6. Copyrights
  7. Credits
  8. History
  9. awpralf.cfg

Short description

Awpralf.cmd is a global plugin for Auto WGet Daemon. It adds some features to this wonderful download manager:

Back to index


Prerequisites

For using awpralf.cmd you'll need:

Back to index


Installation

Back to index


How it works

As a global plugin awpralf.cmd is started along with Auto WGet Daemon. For any action Auto WGet Daemon performs it sends a message to the plugin, giving it the opportunity to do additional tasks. For details on Auto WGet Daemon plugins see Auto WGet Daemon's readme.

Desktop "prescanning"

Awpralf.cmd can "prescan" the desktop directory. "Prescanning" happens just before Auto WGet Daemon itself scans the desktop for downloadable URLs.

This feature is meant to ease the use of Netscape Communicator's v4.61 drag'n'drop abilities. I'm using URL objects as bookmarks, and it kept bothering me that Auto WGet Daemon just tries to download each and any HTTP- or FTP-URL - even if I only wanted to add them to my bookmark folder. Now awpralf.cmd decides whether to let Auto WGet Daemon download the URL.

To enable "prescanning" Auto WGet Daemon must be configured to use the desktop (USE_DESKTOP = 1 in awget.cfg) and in awpralf.cfg OBSOLETE_OBJECTS directory must be set.

Then awpralf.cmd does a preliminary search for URL objects on the desktop, just before Auto WGet Daemon does the same. For every found URL object awpralf.cmd tries to determine a file extension contained in the URL. If a file extension is found, it is compared to the extension lists in OBSOLETE_EXT and SECURE_EXT (see awpralf.cfg).

"Extended download"

Awpralf.cmd can intercept any Auto WGet Daemon download job (by using Auto WGet Daemon's plugin interface), thus providing different download directories.

If at least one EXT_DOWNLOAD entry is properly configured in awpralf.cfg, awpralf.cmd tries to determine the extension of the file to be downloaded. It then compares this extension with all EXT_DOWNLOAD entries. On a match awpralf.cmd manipulates Auto WGet Daemon's jobfile, replacing the download directory there (and creating it beforehand, if necessary).

Dupe checking

Before Auto WGet Daemon starts a download, awpralf.cmd can check if the file to be downloaded already exists in the download directory. This is triggered by DUPE_CHECK in awpralf.cfg. If a file of the same name already exists, the following dialog appears:

dupe.jpg

You then have the choice to:

Back to index


Limitations, Possible Problems, To Do and Don't ask for...

Limitations

Possible Problems

To Do

Don't ask for...

Back to index


Copyright

The code of awpralf.cmd is under copyright 1998-2001 Dmitry A.Steklenev. Parts of code contributed by Ralf Maseratis. All code underlies following conditions:

Copyright (C) 1998-2001 Dmitry A.Steklenev

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. All advertising materials mentioning features or use of this software must display the following acknowledgment:

    "This product includes software developed by Dmitry A.Steklenev".

  4. Redistributions of any form whatsoever must retain the following acknowledgment:

    "This product includes software developed by Dmitry A.Steklenev".

THIS SOFTWARE IS PROVIDED BY THE AUTHOR OR CONTRIBUTORS "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Back to index


Credits

Thanks to

Back to index


History

release 0.3.1:

release 0.3: first public release

Unofficial: based on code used to "hack" older Auto WGet versions (those without plugin interface) for private use. As Dmitry A.Steklenev is now updating Auto WGet in rapid order, "hacking" every new release is no solution anymore... :-)

Back to index


awpralf.cfg

Awpralf.cfg (located in %ETC%) configures all features of awpralf.cmd by pairs of "KEYWORD = VALUE" entries (just like awget.cfg does for Auto WGet Daemon).

BEWARE: After editing awpralf.cfg you'll have to restart Auto WGet Daemon to activate awpralf's features!

KEYWORD = VALUE
EXT_DOWNLOAD = extension,directory

EXT_DOWNLOAD configures which files are stored in which directories

 

comma separated pair of extension and directory

extension: case independent extension of download file

directory: where to save files which end in extension

directory may be a complete path (must contain driveletter) or a path relative to global DOWNLOAD path in awget.cfg. All characters after the comma (except leading or trailing spaces) are interpreted as directory name.

If directory does not exist, awpralf.cmd tries to create it

There is no explicit limit for the number of EXT_DOWNLOAD-entries in awpralf.cfg.

To deactivate this feature, comment out all EXT_DOWNLOAD-entries in awpralf.cfg.

Examples:

  • If extension of downloaded file is "mpg", save the file to "e:\wgetdownloads\video":

    EXT_DOWNLOAD = MPG,e:\wgetdownloads\video

  • If extension of downloaded file is "exe", save the file to "d:\all my downloaded exe files":

    EXT_DOWNLOAD = EXE,d:\all my downloaded exe files

  • If extension of downloaded file is "zip", save the file to subdirectory "zipped" of Auto WGet Daemon's global download directory (set by "DOWNLOAD =" in awget.cfg):

    EXT_DOWNLOAD = ZIP,zipped

Back to index

KEYWORD = VALUE
DUPE_CHECK = 1 or 0

Turns checking of duplicate files on or off

 

1 or 0

Back to index

Following option only becomes active if USE_DESKTOP = 1 in awget.cfg!
KEYWORD = VALUE
OBSOLETE_OBJECTS = directory

Directory where to move desktop URL objects which are not supposed to be downloaded by Auto WGet Daemon

 

Full path of directory

All characters after "=" except leading or trailing spaces count as the directory name. So, if directory name contains spaces, do not quote it!

If directory does not exist, awpralf.cmd tries to create it as a WPUrlFolder

Deleting or commenting out OBSOLETE_OBJECTS disables all "prescanning" of the desktop, OBSOLETE_EXT and SECURE_EXT have no meaning then!

Examples:

  • Move desktop URL objects which are not supposed to be downloaded to directory "F:\URLs\temporary url folder":

    OBSOLETE_OBJECTS = F:\URLs\temporary url folder

  • Disable all desktop "prescanning":

    #OBSOLETE_OBJECTS = F:\URLs\URLTMP

Back to index

Following option only becomes active if USE_DESKTOP = 1 in awget.cfg and OBSOLETE_OBJECTS is active!
KEYWORD = VALUE
OBSOLETE_EXT = extension1,extension2,extension3 ...

File extensions of URLs contained in desktop URL objects which will never be downloaded by Auto WGet Daemon and instead always be moved to OBSOLETE_OBJECTS directory

 

case independent comma separated list of file extensions

Example:

Move all URL objects on desktop which end in .HTM, .HTML, .SHTM, .SHTML or .ASP to directory F:\URLs\URLTMP:

OBSOLETE_OBJECTS = F:\URLs\URLTMP
OBSOLETE_EXT = HTM,HTML,SHTM,SHTML,ASP

Back to index

Following option only becomes active if USE_DESKTOP = 1 in awget.cfg and OBSOLETE_OBJECTS is active!
KEYWORD = VALUE
SECURE_EXT = extension1,extension2,extension3 ...

File extensions of URLs contained in desktop URL objects which always will be downloaded by Auto WGet Daemon (without asking)

 

case independent comma separated list of file extensions

Example:

Let Auto WGet Daemon proceed with URLs from desktop's URL objects when they end in .ZIP, .EXE, .MOV, .MPG, .MPEG, .JAR, .JPG, .JPEG or .GIF:

SECURE_EXT = ZIP,EXE,MOV,MPG,MPEG,JAR,JPG,JPEG,GIF

Back to index