🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
6 messages
6 total messages Started by David Arnstein Sat, 31 Dec 1994 02:26
Free utility to merge newsrc, news.ini files
#14186
Author: David Arnstein
Date: Sat, 31 Dec 1994 02:26
186 lines
8485 bytes
// ***tlib-keyword*** $ %n  %v   %f $
// &(#) $ NEWSMERG.TXT  1   30-Dec-94,17:51:38 $

                        Program newsmerg 1.0
                        --------------------


1.  What is it good for?			
    -------------------
Program newsmerg is useful to people who read usenet from two or more
computers, or who use two or more news reader programs which use
different file formats to record news articles which have been read.
In this paper, the combination of a specific computer and a specific
news reader program will be referred to simply as a "newsreader."

Someone in this situation would see the same article headers each
time he switched to a different computer to read news.  This is an
irritating waste of time.  The purpose of program newsmerg is to
merge state information files from newsreaders, so that articles
marked as "read" by one newsreader will be marked as "read" by all
newsreaders in use.

At the present time, the program has only been compiled on 386 (or
better) peecee's.  Both source code and binaries are available FREE.


2.  An Important Restriction
    ------------------------
Newsmerg works by examining article numbers.  Unfortunately, each
NNTP server establishes its own article numbers.  Therefore, newsmerg
is only useful if all the newsreaders in use use the same NNTP
server.

For example, newsmerg is useful for people that use SLIP or TIA to
connect a home computer to an Internet Service Provider (ISV) and who
alternate between reading news from their home computer, and from a
Unix login to the ISV.  This is the situation of the author, not
surprisingly.


3.  Supported News Reader Program Formats
    -------------------------------------
At the present time, newsmerg can parse .newsrc files from "trn,"
which means that it can probably parse a .newsrc file from any Unix
news reader program.  In addition, it can parse the news.ini file
from the "Trumpet Newsreader."

The program is written in such a way that adding new file formats
should be relatively simple.


4.  Usage
    -----
In order to use newsmerg, all the state files (.newsrc and/or
news.ini) to be operated on must be transported to a single computer.
Ftp or zmodem could be used for this purpose.

The program is then executed to read all the state files that the
user has.  It creates new versions of the state files.  The new files
will have names that end in ".new."  Each of the new state files will
include the union of all article numbers in all the input state
files.

Finally, the new state files must be transported back to their
expected locations for the various newsreaders to use.  The names of
the files will have to be changed from the names generated by
newsmerg to the names expected by the newsreaders.

It is suggested that the previous version of the state files be
retained in case of subsequent difficulty.


5.  Invoking newsmerg
    -----------------
This section explains the mechanics of running the program.  Some
minor installation issues are covered in a subsequent section.

The program is invoked as
     newsmerg -type state_file -type state_file -type statefile ...

In the above, the string "type" is replaced by either "unix" or
"trumpet."  Each instance of the string "state_file" is replaced by
the name of a state file to be read by the program.  The "type"
string tells the program the format of the following "state_file."

Newsmerg will read through all the state_file's, and for each one,
generate a corresponding merged file.  It will report the names of
the files that it creates.


6.  Availability
    ------------
The author will e-mail either the source or peecee executables for
newsmerg upon request.  Send your request to arnstein@netcom.com and
indicate whether you want source or executables, or both.

In response, you will receive a uuencoded, zip-ped archive containing
the files.  Usually, you will get a response the evening after your
e-mail arrives.


7.  Installation
    ------------
Currently, the program has only been compiled for use on a peecee.  It
uses a 386 DOS extender from Borland which must be installed on the
user's computer.  Fortunately, Borland does not charge royalties for
this extender.  You must install two files 32RTM.EXE and
DPMI32VM.OVL in your DOS path, or in the current directory when you
run newsmerg.

In addition, if you run newsmerg from a Windows 3.1 DOS box, you must
install file WINDPMI.386 in your Windows SYSTEM.INI file.  For
example, if you choose to place WINDPMI.386 in the directory d:\utils,
you must write the following key into the [386enh] section of your
SYSTEM.INI file:
     device=d:\utils\windpmi.386


8.  Operational Details
    -------------------
This section discusses some of the details of the processing
performed by the program.

First, the program reads all the state files provided by the user on
the command line.  It builds up a data base of news group names, and
the article numbers encountered for each news group name.  The entire
data base is stored in memory.  The subscription status (yes/no) for
the news groups is *not* stored in the data base, for reasons which
will be clear.

Note that the data base represents the union, or merge, of all the
article numbers encountered in all of the input files.

Next, the program repeats the following sequence of steps for each
input file:

     A corresponding output file is created, whose name will end with
     ".NEW."  The new file will have the same end-of-line discipline
     (Unix or MSDOS) as the corresponding input file.

     The input file is read a second time.  For each news group in
     the input file, the same news group is retrieved from the data
     base.  The news group from the data base is written to the
     output file.  The news group's subscription status (yes/no) is
     taken from the input file, NOT from the data base.

     After the input file has been completely read, the data base is
     scanned for news groups that were not found in the input file.
     These news groups is written to the end of the output file with
     subscription status "unsubscribed."  NOTE:  this step is not
     performed for Trumpet news files.  The reason is that the
     Trumpet news reader can be excruciatingly slow to initialize
     itself, if its news.ini file contains a lot of lines.

     That's all!  Note that the news groups appear in the the output
     file in exactly the same order as they appear in the input file,
     although unsubscribed news groups may be appended.


9.  Porting Information
    -------------------
Newsmerg is written in C++ using some fairly recent features of the
language, such as templates.  Therefore, it may be difficult to port
to new platforms, due to the terrible state of most available C++
compilers.  It was developed using Borland C++ 4.5.  It is known to
*not* compile under gcc 2.6.3.

On the positive side, the program is written in a clear and
comprehensible manner and therefore should be easy for an experienced
C++ programmer to work with.


10. Feedback Please!
    ---------------
This software is provided free of cost (and free of warrantee, by the
way).  I ask only for your comments, however critical.  If you want
support for another news reader, I will consider it if you provide a
clear description of the file format.  If you find bugs, please
report them!  If you upload to an ftp site, please let me know.  I
hope this program is generally useful.

David Arnstein
arnstein@netcom.com
--
David Arnstein
arnstein@netcom.com
Re: Free utility to merge newsrc, news.ini files
#14231
Author: Jerry Burger
Date: Mon, 02 Jan 1995 20:00
23 lines
1792 bytes

>1.  What is it good for?                          
>    -------------------
>Program newsmerg is useful to people who read usenet from two or more
>computers, or who use two or more news reader programs which use
>different file formats to record news articles which have been read.
>In this paper, the combination of a specific computer and a specific
>news reader program will be referred to simply as a "newsreader."

>Someone in this situation would see the same article headers each
>time he switched to a different computer to read news.  This is an
>irritating waste of time.  The purpose of program newsmerg is to
>merge state information files from newsreaders, so that articles
>marked as "read" by one newsreader will be marked as "read" by all
>newsreaders in use.

 Wouldn't  it be easier to just copy the news.rc from computer 1, to 
 computer 2 ?  Just curious .

 Jer

   
Re: Free utility to merge newsrc, news.ini files
#14271
Author: Lewis Osborn
Date: Wed, 04 Jan 1995 06:59
22 lines
1504 bytes
In article <jer.5.000DB67A@crash.cts.com>, jer@crash.cts.com says...
>
>>1.  What is it good for?                          
>>    -------------------
>>Program newsmerg is useful to people who read usenet from two or more
>>computers, or who use two or more news reader programs which use
>
> Wouldn't  it be easier to just copy the news.rc from computer 1, to 
> computer 2 ?  Just curious .
>


That's what I do  -  seems to work just fine.


-- 
Lewis
lewis@pacifier.com  
      
KC7MZ 
NRA Life Member                                
NRA Second Amendment Task Force Charter Founder
Re: Free utility to merge newsrc, news.ini files
#14286
Author: John Beach
Date: Wed, 04 Jan 1995 17:11
22 lines
1999 bytes
On Mon, 2 Jan 1995 20:00:28 GMT, Jerry Burger wrote:


> >Program newsmerg is useful to people who read usenet from two or more
> >computers, or who use two or more news reader programs which use
> >different file formats to record news articles which have been read.

>  Wouldn't  it be easier to just copy the news.rc from computer 1, to 
>  computer 2 ?  Just curious .

I wondered the same thing.  I read mail with tin when I'm at work and with
WinVN when I'm at home.  I ftp .newsrc to my PC as newsrc, change <lf> to
<cr><lf> pairs, sort it and then use it directly. 

Is there some functionality that I'm missing?

-john

---------------------------------------------------------------------
John A. Beach                                          St. Petersburg
eMail: jbeach@intnet.net                                      Florida
       john@beachsoft.com                                         USA
Re: Free utility to merge newsrc, news.ini files
#14304
Author: Kenneth G. Moffat
Date: Thu, 05 Jan 1995 01:33
24 lines
1920 bytes
In article <3eeksp$qpo@xcalibur.IntNet.net> jbeach@news.IntNet.net (John  Beach) writes:

>On Mon, 2 Jan 1995 20:00:28 GMT, Jerry Burger wrote:

>> >Program newsmerg is useful to people who read usenet from two or more
>> >computers, or who use two or more news reader programs which use
>> >different file formats to record news articles which have been read.

>>  Wouldn't  it be easier to just copy the news.rc from computer 1, to 
>>  computer 2 ?  Just curious .

>I wondered the same thing.  I read mail with tin when I'm at work and with
>WinVN when I'm at home.  I ftp .newsrc to my PC as newsrc, change <lf> to
><cr><lf> pairs, sort it and then use it directly. 

>Is there some functionality that I'm missing?

I believe Trumpet Newsreader uses news.ini INSTEAD of newsrc.
If you use Trumpet and WinVN, for example, then you might want 
your newsrc and news.ini files to agree.


kmoffat@halcyon.com
Ken Moffat near Mt.Rainier
Re: Free utility to merge newsrc, news.ini files
#14320
Author: lvirden
Date: Thu, 05 Jan 1995 10:35
9 lines
1415 bytes
Copying one's newsrc only works if each machine shares the same file system.
Otherwise, articles get different numbers, and the newsrc's list of article
numbers read is not valid.
-- 
:s Great net resources sought...
:s Larry W. Virden                 INET: larry.virden@cas.org
:s <URL:http://www-bprc.mps.ohio-state.edu/cgi-bin/hpp?lvirden_sig.html>
The task of an educator should be to irrigate the desert not clear the forest.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads