Plan 9 from Bell Labs’s /usr/web/sources/contrib/r.raschke/news.README

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



This is an Acme Usenet News reader that supports simplistic threading,
provides a little bit of support for remembering the position you've
read up to so far, and has the possibility of using a killfile.

The code is based very heavily on /acme/news, which was the starting
point for this little exercise.

There are four little programs, that make up the functionality:
readnews is the newsgroup reader itself, gethi is a small utility to
find out the index number of the most recent message available in a
newsgroup, newnews is an rc script making use of gethi to list the
newsgroups which have unread messages, and newgroups is a simple rc
script to query your nntp server for new newsgroups.


readnews [-d /mnt/news] [-K] news.group

Readnews allows the reading (and posting, if allowed) of messages in
the newsgroup.  The -d option allows use of a different mount point of
the news hierarchy file system (as provided by nntpfs(4)), the default
is /mnt/news.  The -K option enables a simple killfile filter.

Readnews reads the file $home/lib/newsrc/<news group> to find the
index number of the message up to which articles have been read.  This
file gets updated when readnews is terminated by middle-clicking Del
of the thread/article list window.  When the killfile is enabled,
readnews reads $home/lib/newsrc/killfile and only displays threads and
articles that do not match any of the kill patterns.  The killfile
format is one pattern per line; A pattern begins with either the
letter 'F' (match against the From field of an article) or the letter
'S' (match against the subject of an article) followed by a regexp(6).
The matching is done against from and subject strings that have been
converted to lowercase.  If the regexp matches, the article is not
displayed.  Here is an example killfile:

S.*(money|cash|dollar|spam).*
S.*(great|business).*(opportunity|venture).*
F.*annoying.*character.*

The initial display of the readnews pane is the list of unread threads
available in the news group.  Threading is based purely on the subject
string of the articles.  Two actions in the tag line of this pane
(Expand and Collapse) flip between showing just the threads and
listing all articles (still threaded) and their authors.  Right
clicking on a message number opens that message in a new pane.  The
Del action in the tag line will terminate readnews if no message panes
are open.

The message panes display the article with a reduced header and an
indication of where the article is situated in the thread.  To show
the full header, use the Header action of the message pane's tag.  The
two actions Prev and Next allow navigating the articles in the thread
being displayed.  Prev and Next reuse the message pane.


gethi [-d /mnt/news] news.group

Gethi prints the highest index number available in the news group on
standard output.


newnews

Newnews reads the file $home/lib/newsrc/groups, which should list news
groups you are interested in, one per line, and prints the commands to
read the news groups usind readnews followed by how many unread
messages there are as a comment.  Here is and example groups file:

alt.audio.minidisc
comp.risks
comp.security.announce
comp.os.inferno
comp.os.plan9
de.rec.musik.hifi

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.