
	= PyNR =  September 1999

OK, you know this is just a sample program, right?  The author uses
it, so it's likely to receive some more attention in the future, but
it will probably never pamper you with every feature and convenience
imaginable.  On the other hand, you have all the pieces right here,
so if you're like the author (me) and never like something so much as
when you write it yourself, go ahead and write some of it yourself.

The window that comes up when you invoke pynr controls the application
itself.  If you dismiss this window, pynr quits.   Status messages are
written on the window.  News or mail functions can be selected from
the menu.

Configuration file
------------- ----

/boot/home/config/settings/pynr/rc

Contains Python statements.

    realname = 'Donn Cave'

The option values that belong to a particular account should be set
in an Account instance  -

    uw = Account('uw')
    uw.login = 'donn'
    uw.returnaddress = 'donn@u.washington.edu'
    oz = Account('oz')
    oz.login = 'donn'
    oz.returnaddress = 'donn@oz.net'
    default = oz

Options are the combination of any general options plus the options
in the current default account, which can be changed from initial
default via top level menu.

News
----

options:
    nntpserver = (host, port)  #  port is optional.
        nntpserver = ('news.xyznet.net',)
    groups = [(group, [(first, last),...]), ...]
        groups = [('comp.lang.python', [(1, 940), (974, 1011)])]
    returnaddress = 'user@host.name'
    realname = 'My Name'
    smtpserver = (host, port)
    quote = '> '

The newsgroup list window displays all the subscribed groups, the
groups in the "groups" attribute.  Shortly after it appears, the
number of unread messages should appear next to each group, estimated
from the first/last read pairs associated with the group in the saved
configuration file and the first/last message information returned
from the nntp server.  The number isn't necessarily right.

The menu offers a couple of ways to examine the new articles in the
group, "View" and "View 50".  The latter views at most 50 most recent
new articles.  Normally you'd just invoke the group line, which is
the same as View with the group line selected.

The group articles window works the same way, you can invoke an
article to fetch and display it.

The message display has two menu options, reply and save.  Reply
covers both news and mail replies.  When you invoke reply, you
get a new window with the same message but quoted.  This one has
menu items send, post, and edit.  You can edit the message in its
own text window, but the author always takes the edit option,
which starts up "vi" in a Terminal window.  Yes, there's a UNIX
background here, but it's a decent editor.  Whatever your
favorite editor, hopefully you'll be able to graft it in.
Anyway, don't select "post" before you edit the article text!
Both "To" and "Newsgroup" appear in the header, but To is actually
spelled "X-In-Reply-To", and if you're mailing instead of posting,
it might be just as well to change it to "To".

Mail
----

options:
    imapserver = (host, port)  #  port is optional.
        imapserver = ('mail.xyznet.net',)
    folders = [foldername, ...]
        folders = ['INBOX']
    returnaddress = 'user@host.name'
    realname = 'My Name'
    smtpserver = (host, port)
    quote = '> '
    mailcache = '/boot/home/config/settings/pynr/xyzfolders'

The first window shows folders and the number of messages.

The folder window allocates space for the whole list, and then
starts filling them in a bunch at a time, from the most recent 
to the oldest.  It can take a long time.  The application is
semi-usable during this time, but requests to fetch a mail message
for example will have to wait in line for the current batch to
arrive.  The delete menu option sets the delete flag on the
selected message;  the purge menu option requests that delete
flagged messages actually be deleted (expunged.)

June 2001, I added a local disk cache of header items, by uid,
one cache file per folder in subdirectories of settings/pynr.
This cache really improves the startup time on a large folder!
