ivanZ | JGET Java Utility | ||
Content
Contact:
|
JGet is handy utility (written in Java), that enables to download a series of
files from the Web. It is not a typical web spider, it uses rather an "url
pattern", which defines a sequence of urls and this sequence is then downloaded.
To give you closer idea how it works here is quick example:
The url pattern
for JGet is for instance "http://www.sample.com/lib/pic{ENU march april
june}{NSEQ 01 31}.gif - when entered in JGet this pattern will expand
(evaluating functions in curly braces) to following sequence of urls: http://www.sample.com/lib/picmarch02.gif http://www.sample.com/lib/picmarch03.gif ... http://www.sample.com/lib/picmarch31.gif http://www.sample.com/lib/picapril01.gif ... http://www.sample.com/lib/picmarch01.gif ... http://www.sample.com/lib/picjune31.gif And these urls are then downloaded by JGet to defined directory. Main advantage of this approach is that it can get files using directly their names/urls and not link from other pages. It enables easily to get files which are not linked at any page, files, which are referred by dynamically generated urls and it can be very specific about which files which have to be downloaded. Main features of JGET includes:
GUI
Url pattern - put url pattern there Url patterns Functions are surrounded in curly braces { }, braces contain one or more string tokens separated by space. First token is name of function, others are function parameters. Currently there are only two functions, but others can be easily added (see below): {NSEQ x y z} - numeric sequence, x is first number (defaulted to 1), y is last number (defaulted to integer.MAX_VALUE) and z is step (defaulted to 1); resulting string is justified with zeros to the same size as first parameter has, so for instance, if first parametr is 001, than the sequence is 001, 002, 003 ... {ENU token1 token2 ... tokenn} - enumeration, each parameter is one value of the sequence. How to add new functions? Just implement interface ivan.jget.SeqGenerator. The implemented class has to be in package ivan.jget.generators. Name of new class is also name of the function, any parameters are passed as string array to setParams method. See source for existing functions implementation for the guidance - it fairly straightforward. Command linejget [-d directory] [-e n] [-x extractPattern] URLPattern -d directory, where to save downloaded files If started with command line parameters, program woks in command line mode, otherwise starts GUI interface. Downloading JGETJGET is available under GPL license.
You can download binary here and complete source
(Eclipse project) here. |
||