GRAB - General Resource Access Beastie.

Version 0.9.2 Readme file.

Grab was written by Dave Cridland, <dwd@cerbernet.co.uk>. Inspiration from
numerous sources, most notably SNARF <URL:http://www.mint.net/~xach/snarf/>,
by Zachery Beane <xach@mint.net>.

Basic Usage

grab <URL>

Grabs the entity represented by the URL, spits it out to standard output.

Command Line Options

Some options are implied, others aren't, all can be placed into the RC file,
most aren't useful there.

-m --method
	Use the following method for access.
	For FTP, can be PORT (default) or PASV, for normal and passive
	operation.
	For HTTP, can be GET (default), HEAD, or POST.

-i --info
	Access information, rather than the entity itself.
	Implied for mailto URLs, ignored for FTP.

--v --verbose
	Print loads of debugging info. Mostly useless. Except for psychos and
	wierdos, and people wishing to see how this thing works, etc.

-l --listen
	Only of use for 'raw:' URLs. Probably not a good idea to play with.

-p --proxy
	Use the following URL for a HTTP proxy. Can only be used for FTP and
	HTTP URLs.

-R --recurse
	Recursively download an FTP tree.
	Meaningless for anything else.

-r --reget
	Continue an interrupted download. Must specify a local file.

-d --display
	Download to a tempfile, then display according to MIME type.

RC file

Looked for in ~/.grabrc.

An example is:

[options]
proxy=baal.cerbernet.co.uk
[aliases]
test=ftp://thanatos.thl.cerbernet.co.uk
cerbernet=http://www.cerbernet.co.uk
[displays]
text/plain=less

This forces Grab to use a proxy, defines a couple of aliases, overides the
display (Metamail is the default) for text/plain.

All long options can be defined in the RC file.

Specifics

HTTP

HTTP URL's are retrieved using HTTP/1.1 if possible. Note that in this early
stage, chunked transfer encoding is not supported, so Grab is not compliant
with HTTP/1.1. Once I understand chunked transfer encoding, it will be
supported. I think that'll be it for full compliance.

Info mode will use HEAD as much as possible. However, when it finds a
text/html page, it attempts to calculate the total data for the page,
resulting in much hilarity and Perl warnings.

Theoretically, but still untested, because I'm a complete lamer, and can't be
arsed, there's support for POST, which is totally stupid and useless. But
fun. Maybe.

FTP

FTP URLs are handled in active mode by default. Passive can be used, too.
If the file can't be downloaded, it's changed into and LISTed instead. This
accounts for the really weird errors when a URL doesn't exist.

Recursive mode's entertaining, and actually works.

Info mode does nothing. It probably should do, but I don't know what.

FINGER

FINGER URLs look either like this:
finger://dwd@thanatos.thl.cerbernet.co.uk
or this:
finger://thanatos.thl.cerbernet.co.uk/dwd

They just do a finger. Dunno why. Might as well use finger itself, unless
you've a pressing need for handling finger URLs.

RAW

RAW URLs are used for raw, non-interactive, TCP connections.

There's a few uses for these, including tarring from one machine and
untarring from another.

MAILTO

Given a mailto URL, it hunts down the final destination(s) of the mail.
Handy for ISP's running virtual email systems. Try my own email, for instance.

Info is implied, because sendmail itself does email much better.

MIME Type detirmination

Uses `file`, then mime.types, then defaults to application/octet-stream,
unless, of course, it's been told by an HTTP daemon.

BUGS

Yep. Fix 'em if you can, and tell me about 'em either way. They'll be there.

LIMITATIONS

Count any you find as bugs.

NON-COMPLIANCES

The RFC's are included for FTP, HTTP/1.0, and HTTP/1.1. Feel free to report
any non-compliances as bugs. That's what they are. I am *not* Bill Gates.

README FILES, MAN PAGES, INSTALLATION THINGS, PORTING

All the above would be welcome.

INCLUSION IN DISTRIBUTIONS

Go for it. I'd like to know, though.

COMMERCIAL USAGE

Is fine.

REDISTRIBUTION

Is groovy. Please leave my copyright intact.

ACKNOWLEDGEMENTS

The following people played a significant role in enabling GRAB to exist.

Zach Beane, for writing Snarf, and answering my mail, and fixing bugs
heroically.
Larry Wall, for writing Perl, and answering my mail, and explaining bugs
heroically.
Justin Keery, for not writing anything much, but being an amusing guy to
work for.
Lisa Richardson, for testing ancient versions of Grab, and not finding
anything wrong with them, oddly enough.
Bill Gates, for writing, marketing, and so on the operating system which
crashed my hard drive three times in a week, losing all my data, and thus,
indirectly, introducing me to Linux, when I kicked Windows off my computer
in utter annoyance, thus giving me fun, a hobby, and a job, too. Thanks
Bill. I'll do the same for you, one day.
Dvorak, whoever he was, for inventing a nice keyboard layout which I use.
Dave Cridland, for writing Grab, and being an incredibly nice guy with the
single failing of talking about himself in the third person.

