|
NAMEnewsfetch - Pull news from an NNTP server and store in the mailbox format.SYNOPSISnewsfetch hostname[:port] [ -clsyvV ] [ -d dirname ] [ -f rcfile ] [ -t N ] [ -T Timeout ] [ -w M ] [ -p | -P command ] [ -Y command ] [ -x command ]OPTIONS-c If this option is specified, newsfetch will not update .newsfetchrc file-d dirname directory where newsfetch will store news -f rcfile This option tells newsfetch to use an alternate rc file -l display name of all the newsgroups on the server and exit -s output will be send to stdout instead of file -t N time to pause after M articles, in seconds. -w M This option tells newsfetch to pause for N seconds after M messages to avoid heavy load on server. Time can be set by -t option (default is 60 Seconds) -T Timeout timeout value in seconds, default is 600 seconds -p command Each article will be piped into a user command. The new pipe will be created before fetching each article. This is useful for filtering the news article using external filter like procmail. -P command This is similar to -p option except for all article will be piped at once. The pipe will be created once before fetching each group. -y This is similar to -p 'procmail .newsfetchproc' option except that .newsfetchproc is generated from .newsfetchfilter or .procmailrc file. See generated file .newsfetchproc and procmailrc(5) for more detail -Y command This is similar to -p option except that .newsfetchproc is generated from .newsfetchfilter or .procmailrc file which can be used by an external filter command -x command A user command will be executed after fetching each newsgroup. The occurrence(s) of the string %s in the command will be replaced by the name of the last fetched newsgroup -V Print version and exit DESCRIPTIONnewsfetch news.yourisp.com
newsfetch news.yourisp.com -x "command
%s"
newsfetch $NNTPSERVER
newsfetch pulls news from an NNTP server and writes the articles to a file named same as the newsgroup name, stdout or piped into an external program. The file created by newsfetch can be used with any mail reader. NEWSFETCHRCNewsfetch looks for a file .newsfetchrc to see the articles already fetched. The format of .newsfetchrc is very simple. It consists of one line for each newsgroup. The line contains three fields. The first field is the name of the group. The next field is the last article fetched in the group when that group was last downloaded. The third field limits the number of messages (say N) which can be downloaded at any given time (-1 for no limit). If there are more messages than N, only N latest messages are downloaded. The fields are separated by a space.comp.os.vxworks 1 100
comp.dcom.telecom 1 -1
When Newsfetch is finished, it updates article numbers in the file .newsfetchrc. NEWS FILTERINGDownloaded News can be filtered by external filter like procmail. Newsfetch adds a "Newsfetch: group" header to each articles to ease the external filter interface. There are many way to achieve filtering using newsfetch using -p, -P, -y or -Y options,newsfetch news.yourisp.com -p procmail
This will pipe each article to procmail. newsfetch news.yourisp.com -y
This will generate a procmail rcfile from .newsfetchfilter or .procmailrc and pipe each article into procmail. newsfetch news.yourisp.com -Y command
This will generate a procmail rcfile from .newsfetchfilter or .procmailrc and pipe each article into external command which can use .newsfetchproc file. newsfetch news.yourisp.com -P command
This will create a pipe to command before fetching each group and pipe all downloaded articles. WEB BASED NEWS INTERFACEThere is great demand for including the web support for the newsfetch. I suggest to use hypermail in combination with newsfetch to make a very good web based news interface (see above, option -x and -P). hypermail is available fromhttp://www.eit.com/software/hypermail/hypermail.html FILES$HOME/.newsfetchrc
$HOME/.newsfetchfilter
$HOME/.newsfetchproc
HISTORYAuthor - Yusuf Motiwala (yusuf@scientist.com)
http://ulf.wep.net/newsfetch.html
http://yusuf.home.ml.org
NOTEInitially, I wrote this utility for personal use. The current version may not have all the features you want, but you are free to modify the code for your personal use. Feedbacks are welcome. Visit the GSP FreeBSD Man Page Interface. |