home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
packer
/
uugrab
/
uugrab.doc
< prev
next >
Wrap
Text File
|
1992-12-07
|
6KB
|
161 lines
Documentation for UUGRAB Version 1.6 (c)1992 by Harald Boegeholz
UUGRAB is a 16 bit OS/2 program to decode multi-part uuencoded binaries
posted in UseNet newsgroups such as comp.binaries.os2 and
comp.binaries.ibm.pc. It requires that every news article is stored in a
file by itself. This is usually the case in the news spool directory, so
one can either directly use UUGRAB on the spool directory or copy the
files from there. It also requires a uudecode program which reads from
stdin. UUGRAB pipes directly into uudecode, so uudecode can NOT be a DOS
program since pipes from OS/2 programs to DOS programs don't work.
UUGRAB works by reading all specified files and parsing the Subject:
header in each file. There it looks for the expression
<digits> [<whitespace>] ( "of" | "/" ) [<whitespace>] <digits>
to identify the number of parts and part number for each article. For
all complete binaries found, UUGRAB then either uses its internal
"uucat" decoder together with an external UUDECODE or executes an
arbitrary command specified by the -c option.
UUGRAB reads and writes a history file named uugrab.rc in the current
directory to keep track of the message-IDs of the successfully decoded
binaries. This way each binary is decoded only once, even if the old
articles haven't expired yet. If you don't like this feature, simply
delete uugrab.rc before calling uugrab.
Usage: uugrab [-a] [-c <command>] [-d] [-i <n>] [-n] [-v] files...
Options
-------
-a decode all files, even those without part numbers.
If this option is not specified, UUGRAB only decodes files with
suitable part numbers in the Subject header. With -a, files without
part numbers in the Subject header are decoded, too.
-c <command>
execute the specified command for all binaries. The command is
executed with the filenames of all parts of a binary as arguments in
the correct order. No checks are made for maximum command line
length! If -c is not specified, UUGRAB pipes each binary into
UUDECODE, which must be present in the PATH and read stdin. Under
OS/2, UUDECODE may not be a DOS program since pipes from OS/2
programs to DOS programs don't work.
-d save descriptions.
This option can not be used together with the -c option. If -d is
specified, the beginning of the first article(s) up to the begin
line of the uuencoded binary is saved in a separate file. The
filename is determined from the name of the uuencoded binary by
changing the last extension to .des or appending .des if no
extension is present.
-i <n>
ignore <n> fields at beginning of subject
This option removes the first <n> fields from the beginning of the
Subject line before parsing it. Fields are separated by white space.
This is necessary for binaries in which the first field of the
subject contains a unique posting id (e.g., comp.binaries.os2,
comp.binaries.ibm.pc), since UUGRAB identifies parts of the same
binary by identical subject lines.
-n don't do anything; just display what would be done
This option is highly recommended for beginners. With -n, UUGRAB
displays to stdout the actions it would take if -n were not
specified. The output is in a form suitable to be used as a batch
file (and thus not quite nice to read :-) ).
Examples:
---------
To decode all binaries from a comp.binaries.os2 spool directory and save
the descriptions, change to that directory and
uugrab -i 1 -d *
If you administer the spool directory manually (like I do on my home
machine), you may want to delete the articles you successfully decoded.
To do this, first delete the history file uugrab.rc. Then, the command
uugrab -i 1 -c del *
will delete all news articles previously decoded. This works by applying
the del command to all binaries instead of decoding them. (CAUTION: if
new articles have arrived in the meantime, they will be deleted too!).
Note that incomplete postings will remain intact since the del command
(like the decoder before) is only executed for complete postings.
Special notes for the Unix version:
-----------------------------------
The source code of UUGRAB contains some #ifdefs which should allow
compiling it under Unix. For compiling under OS/2, you have to define
the constant OS2. Otherwise, Unix is assumed. If your Unix C library
doesn't have stricmp, define the constant NOSTRICMP.
There are some minor differences in the behavior of uugrab when compiled
under Unix:
1. If the -n option is used, uugrab outputs a shell script suitable for
/bin/sh instead of a batch file for CMD.EXE.
2. The history file is called .uugrabrc
3. My name is spelled without an Umlaut
History:
--------
1.0: Initial version
1.1: Added internal uucat, together with -d and -n options.
Wrote this documentation.
1.2: Fixed bug that occured when -d was not specified.
1.3: Added history file. Improved provisions to compile under Unix
1.4: Fixed bug: Allowed generating command lines of arbitrary length
1.5: Added -v option. uugrab is less "noisy" by default now.
1.6: Added support for long filenames. Improved messages. Included a
version of uudecode in the archive for convenience.
License:
--------
You are free to use uugrab for any purpose you like except making money
of it. You can use the source code in any way you like as long as you
leave my name in it.
UUGRAB contains parts of the program uucat which was placed in the
public domain by d84sp@efd.lth.se (Stefan Parmark). See the source for
details.
Contacting the author:
----------------------
Feel free to send suggestions and/or bug reports to
<hwb@texnix.stgt.sub.org>.
If you are sending large mails (>100k) or can't reach that address,
please use my secondary address
<hwb@machnix.mathematik.uni-stuttgart.de>.
------------------------ End of uugrab.doc -------------------------