EEP! (Easy Editor Program for .newsrc files) (c) 1990-1993 Paul Gillingwater This is EEP! version 1.8, an experimental .newsrc editor program. It is intended to work with news readers such as ``rn'' and ``trn'', that create a .newsrc file in the $HOME directory of each user, in order to track what messages have been read by them. A major design objective is that it should be easy to use, even by someone who is not familiar with other UNIX editors. There is however a distinct bias towards vi in some of the commands, although this is redeemed somewhat by use of curses, which means that up and down arrows may be used on many systems. Another redeeming feature is the on-line help, activated with the ``?'' key. Note that EEP is _NOT_ intended to be called from within ``rn'' or ``trn'' by shelling out, since it will modify the .newsrc which is presently on disk -- and which the newsreader may have open. Eep was written by Paul Gillingwater . It was initially written for Actrix Information Exchange, a Public Access UNIX BBS in Wellington, New Zealand. This entire work is Copyrighted (C) 1991 by Paul Gillingwater, as the sole original author (apart from where otherwise explicitly acknowledged). The source code provided is available for anyone to use in any way, EXCEPT that you may not sell it or pretend that you wrote it. I would be happy if people wish to incorporate part or all of this in some other product, as long as you acknowledge me as original author of these parts. If this code is to be incorporated into a commercial product, I request that you contact me with regard to licensing. You may contact me care of: Actrix Information Exchange PO Box 11-410 Wellington NEW ZEALAND **** WARNING: This program will modify your .newsrc file. Please ensure you have a safe copy of this file to prevent an unfortunate accident. Revision History ================ Version 1.0 ``Warts'n'All'' version released on limited (NZ only) distribution. Made available via anon. FTP or UUCP from Actrix. Sent to various people to test porting to other platforms, and implemented on Actrix BBS since it might be useful for new users. Released: July 20, 1991 Version 1.1 This version records the order in which newsgroups are found in the .newsrc file, and will maintain that order for display and output purposes. In addition, any newsgroups which don't yet have any entry in the newsgroups file or newslocal will be sorted so they appear first -- this will help find new newsgroups quickly (but it's not a full solution). Version 1.2 A small but important change. It seems that ``rn'' will check your .newsrc for newsgroup names not present, then will try to present you with a large list of so-called "New" newsgroups. It seems the only way to stop this is to leave all the unsubscribed newsgroups in the .newsrc. This seems somehow inelegant, but necessary. Version 1.3 After a long hiatus, several important bug fixes contributed by various net.people. Credits follow: Dean Roth Paul Close Arjan de Vet As well as bug fixes, some additional functionality: o Newsgroups may be indexed by number (':' command) o MS-DOS version developed using PDCurses o Compatible with the Waffle system (MS-DOS and UNIX) Version 1.4 The list of newsgroups now has a top and bottom, and commands to get there. Newsgroups may be deleted from the .newsrc with the 'd' command. The 'd' command (delete) is now a toggle. January 1993: Version 1.5: Major new command is 'v' for view, which will open the directory and look through headers in articles to allow browsing subjects, keywords, authors, dates, etc. Using dirent.h for directory access. Version 1.6: Major rewrite of initialization code to change order of reading files. Now the active file is read first, then the newsgroup and newslocal files, finally the .newsrc. Changed the 'a' command so that it's a toggle, swapping between alphabetic sorting and the original order from the .newsrc. Various minor pointer arithmetic bug fixes. A new feature is the ability to mark newsgroups with the "." key, then move them to above the cursor position. Note that if multiple groups are marked then moved, they may not stay in the same relative order because of the sorting used. Version 1.61: minor bug fixes to avoid feeding NULL pointers to strlen(), plus other improvements. Version 1.7: Marking, subscribing and other actions that automatically move the cursor will now move it in the direction of the last up or down movement command. Searches will also follow this direction, i.e. to search backwards, first move up, then search. A search for nothing will repeat the last search (same as the 'n' command.) EEP now looks for and respects rn's .rnlock file, and creates its own. The man page is somewhat improved with an alphabetical listing of commands. Version 1.8: To improve efficiency, I have implemented a wrapper for malloc() that i call wallop(). This also includes a mechanism for garbage collection at the end. EEP! should now initialize faster. Feeping creaturism: the 'o' command (over-board? over-done?) will organize the list so that all subscribed newsgroups will be moved to the top of the list. The underlying sorting order (alphabetic or original .newsrc order) will be retained. For EMACS fans, EEP! now offers incremental searching with ^S or ^R. The cursor will be positioned onto the string when found. Thanks to Vernon C. Hoxie for this code! New feature: use left and right arrow keys to show more or less of the newsgroup name and description. (Also < and > keys.) ------------------------------------------------------------ News Descriptions ================= A major benefit of Eep is that it is intended to provide a mechanism for selecting news groups based on more than just their name. By using lists provided by Gene Spafford, a brief description of each newsgroup is presented on screen, allowing novices to make decisions on what to read more easily. Although both ``rn'' and ``trn'' offer the L command to list news groups, this is unwieldy if you want to search for specific key words in newsgroup names or descriptions. Furthermore, Eep eliminates the necessity to actually type in the name of a newsgroup when subscribing to it. Simply point and play! Eep tries to be user friendly in moving around the .newsrc file. Experienced UNIX users will wish to use Emacs or vi to edit their .newsrc for themselves. Eep is intended for novice users, and is a good addition to UNIX based BBS systems. Other features of Eep include the ability to subscribe or unsubscribe to a newsgroup, delete newsgroups, and catch up on messages. Eep will read a list of newsgroups and descriptions from two files, "/usr/lib/news/newsgroups" or "/usr/lib/news/newslocal". The NEWSGROUPS file contains one line per news group. The first ``word'' (in the UNIX sense) on the line is the newsgroup name, separated from its description by a space or tab. The NEWSLOCAL file is similar in structure, and is intended to contain groups which are purely local to your system, as well as the top level names of all of your hierarchies, plus other names as you desire for descriptive purposes. e.g. few articles are posted in comp.unix, but it makes a great place to hold the description for all the directories under it. Installation ------------ This release assumes that all news files are stored on one file system, and that the paths to the files may be safely hard coded. Please edit the eep.h file to change where those paths may be on your system. The /usr/lib/news/newsgroups should exist as a result of allowing the checkgroups script (part of 'C' news) to run. Alternatively, you can create the file manually by editing the messages which are posted in news.announce.newusers on a regular basis by the net.god, Gene Spafford. You may embed comments in the file by starting the line with a ``#''. The /usr/lib/news/newslocal file contains your own local newsgroups (ones not covered by Gene's postings), or ones specific to your country. The format of the newsgroups and newslocal files is very simple: news.group.name description all on one line The first space or tab is the separator. Edit the makefile to set your preferences for compiler, then run ``make''. I have tried to make the code relatively portable. Please send me context diffs for any changes you'd like to suggest (or bugs, of which there are still a few). For those with early Sun OS variants (prior to Solaris, which decided to do SYSV properly), mattair@ds62.synercom.hounix.org (Charles Mattair) writes: > Sun-os is mostly a BSD derivative with the > brain dead BSD curses as its default libraries and include files. However, > the SYSV variant is around under /usr/5bin/... and if you link with > /usr/5bin/cc, you automagically get SYSV curses and its associated include > files. Oh, and for those who are wondering: "Why call it EEP!"?. One user has suggested it sounds like the noise a small furry animal might make. Check out Sol Libes' excellent book, ``Life With UNIX''. There is a reference in there to an aspect of UniForum conferences in New Zealand, and the types of jokes found there. Then consider that one can start a command by prefixing it with the name of the shell to execute, e.g.: sh eep ----------- The ``To Do'' list: Although I use NNTP to fetch my news, I have not incorporated any of the hooks for NNTP in this version. This is definitely planned, but not for some time. I would welcome efforts in this direction from others. Should EEP become a newsreader? No, there are too many already. The Help screen is really ugly. This version of eep will maintain the order of the .newsrc, except that newsgroups not in the .newsrc will be sorted AFTER other newsgroups. Information on a newsgroup will include the actual number of articles found in the directory -- only upon request. Note that this will impact portability, since it will have to open directories. A later version will allow the ``!'' key to shell out to UNIX. Because some sites will use eep from inside a BBS, this may not be appropriate. For that reason, the -! flag may be used to set the no_shell boolean. Write out file for use with dynafeed. Some hooks are present to allow the root user to modify the active file. This will be a later addition, along with possible editing of the newsgroups file to add descriptions. One addition that has been planned since the germination of eep has been to present the newsgroups in a hierarchical structure. Currently there are close to 3,000 newsgroups (in New Zealand) and this is growing fast. Having one long list, however you scroll through it, is not good enough for newer users. Eventually, eep will show an opening menu of just the top-level groups (i.e. ones with not "." in their name). Users will then "drill-down" to the next level, and thus will see the hierarchy as an inverted tree. As a prelude to this, and taking (h) into account, it seems appropriate to add code to take the top-level names separately, and not show them in the main list. Most of the top-level names may be found in the /usr/lib/news/distributions file, however not all. For example, there are some news groups which have a single name, e.g. control, junk. Should these be shown at all? I think so -- but it's not appropriate to treat them as top levels. Perhaps these specials could be kept in newslocal file.