MAN page from PLD brag-1.2.9-1.noarch.rpm
brag
Section: User Commands (1)
Updated:
Index
NAME
brag - Grab multipart binaries from news server
SYNOPSIS
brag[-s server] [-P port] [-g group] [-l user] [-p pass] [-q] [-u][-o dir] [-n num] [-c] [-C] [-X] [-a pattern [-a pattern] ...][-r pattern [-r pattern] ...] [-A file] [-R file] [-t n]
or
brag-L [-s server] [-P port] [-l user] [-p pass]
DESCRIPTION
bragdownloads and assembles multipart binaries from an NNTP server.Attachments encoded with uuencode, Base64 or yenc are supported.
OPTIONS
- -L
- Just print a list of groups available at the server
- -s server
- Set news server to server
- -P port
- Set TCP port toport
- -g group
- Set newsgroup togroup
- -l user
- Set user name touser.Setting this option turns NNTP authentication on. The password can bespecified using the-pcommand line option, or using a passwod file (see later)
- -p pass
- Set password to pass.
- -q
- Be silent: do not display progress information
- -u
- Save subjects together with the assembled binaries. Subject files havethe same name as the binary, with .subextension added
- -o dir
- Set output directory todir
- -n num
- Start with message numbernum
- -c
- Combine parts, even if they are from different newsgroups. Also, an articlewill be downloaded only once, even if it was crossposted to more than onenewsgroups
- -C
- Combine parts, even if they are from different news servers
- -X
- Process single-part messages, too
- -a pattern
- Add patternto the list of accept patterns. See next section on accept/reject patterns
- -r pattern
- Addpatternto the list of reject patterns
- -A file
- Read accept patterns from this file
- -R file
- Read reject patterns from this file
- -t n
- Use n number of parallel connections to the server. Default: 2. Set to 4 ormore if you have a high speed network connection
ACCEPT AND REJECT PATTERNS
The subjects of the messages to be downloaded are matched against thelist of accept and/or reject patterns if specified on the command line or in the accept/reject files (see later). Only articlesmatching at least one of the accept patterns will be accepted. Similarly,articles matching one of the reject patterns will be rejected.
Match operations are performed as incsh(1).For example, to accept all files with extension mp5,specify
-a '*.mp5*'
on the command line. Note the quotes (we do not want the shell to processthe pattern) and the second "*" (we are matching against subject lines,not file names).
FILES
DOWNLOADED FILES
Grabbed files are collected in
~/.brag/<server>/<group>/finished(if not specified otherwise using the
-ocommand line option). If combining parts from multiple servers ("-C"option), the results are collected in
~/.brag/all-servers/<group>/finished.
WORK FILES
Work files are kept in
~/.brag/<server>/<group>/unfinishedor in
~/.brag/all-servers/<group>/unfinishedif the "-C" option is used.It is recommended to regularly purge these directories byremoving old files and subdirectories. What "old" means depends on the newsgroup's traffic; one week can be a good approximation.
PASSWORD FILES
Passwords can be specified on the command line, or for extra security, in password files. Each server can have its own password file, named
~/.brag/<server>/passwd.The format of these files is:
user1:password1
user2:password2
...
Passwords are not encoded. Take care of the file ownership and permissions.
ACCEPT AND REJECT FILES
If a file called
acceptis present in
~/.brag/<server>/<group>,its lines are added to the list of accept patterns. Empty ones and comments starting with "#" are ignored. Similarly, the contents of the file named
rejectwill be added to the list of reject patterns.
DECODER PREFERENCES
Brag supports detection and decoding of three types of encoded data:uuencoded, mime-encoded, and yyencoded. However, to perform the actualdecoding, brag relies on external helper programs. You might not have aspecific program which brag expects to use on your system currently, butyo may have another program which does handle that kind of encoding. In orderto allow you to use what you've got available on your system and not requireyou to download and build the helper apps the brag maintainers use, bragsupports remapping of preferred decoders. The first time you run brag, adecoder preferences file will be created in
~/.brag/decoderscontaining the default programs and switches brag expects to use for eachdata type. You may modify this file to instruct brag to use a differentprogram for each of the data types. The format of the file is a series oflines in the form
type:command&switches
The types supported are "uu" for uuencode, "mm" for mime-encoded, and"yy" for yyencoded files. The command&switches is how to invoke yourhelper program. After you run brag once, the defaults written shouldmake the format pretty clear.
Our only requirements for decoders is that they accept the data to decodeon standard input and that they can determine the filename for output. Thedefault mime-decoder (mimencode) is a bit problematic in that brag has totell it the filename to use, and that's why "$file" is one of the arguments.The "file" variable is calculated within brag (and only for mime-encodedfiles) and is a Tcl variable, not an environment variable.
Note that no verification is done currently to ensure that the command works(or even can be found), so be sure you get it right!
EXIT CODES
- 0
- Success
- 1
- Usage errors
- 2
- Network errors
- 3
- File system errors
ENVIRONMENT
If not specified on the command line, the environment variable
NNTPSERVERidentifies the server, while
NNTPGROUPthe group to read the news from.
DEPENDENCIES
bragis written in Tcl; you need
tclsh(1)version 8.0 or later.
cat(1),
sed(1),are used as well.
uudecode(1)mimencode(1)andydecode(1)are (by default) used to decode the fetched articles as well. See theDECODER PREFERENCES section if you need to remap these to other programsfor your system.
AUTHOR
Akos Polster (akosAATTpipacs.com).
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- ACCEPT AND REJECT PATTERNS
- FILES
- DOWNLOADED FILES
- WORK FILES
- PASSWORD FILES
- ACCEPT AND REJECT FILES
- DECODER PREFERENCES
- EXIT CODES
- ENVIRONMENT
- DEPENDENCIES
- AUTHOR
This document was created byman2html,using the manual pages.