🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by cemo Tue, 10 Jun 2003 13:50
rnews example
#65697
Author: cemo
Date: Tue, 10 Jun 2003 13:50
18 lines
1410 bytes
Hi all,

I'm trying to feed a local news server (INN) with my thousands of news
article files.

I searched Google, man pages and so on.. I couldn't find an easy way
to run rnews. I'm getting lots of errors, like "missing subject " etc.
I know that headers are OK.  What am I doing wrong ?

Could you please give me a simple example of usage. I'm extracting
thousands of *.nws files from my Outlook Express archive without a
problem. What's the next step ? How can I make a "rnews compatible"
file ? Should I combine all these files into
a single large file somehow ?
thanks in advance

cemo
Re: rnews example
#65701
Author: Russ Allbery
Date: Tue, 10 Jun 2003 14:53
15 lines
1559 bytes
cemo <destek@cpsoft.biz> writes:

> I searched Google, man pages and so on.. I couldn't find an easy way to
> run rnews. I'm getting lots of errors, like "missing subject " etc.  I
> know that headers are OK.  What am I doing wrong ?

All you should have to do is pipe the message into rnews.  It must contain
Path, Subject, From, Message-ID, Newsgroups, and Date headers.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: rnews example
#65704
Author: cemo
Date: Tue, 10 Jun 2003 20:25
18 lines
1592 bytes
Russ Allbery <rra@stanford.edu> wrote in message news:<87brx6ugp3.fsf@windlord.stanford.edu>...
> cemo <destek@cpsoft.biz> writes:
> 
> > I searched Google, man pages and so on.. I couldn't find an easy way to
> > run rnews. I'm getting lots of errors, like "missing subject " etc.  I
> > know that headers are OK.  What am I doing wrong ?
> 
> All you should have to do is pipe the message into rnews.  It must contain
> Path, Subject, From, Message-ID, Newsgroups, and Date headers.

I'm sorry if this is a dumb question but, how will I pipe the
message(s) ? I'm not familiar with these terms. Is there anything that
will _pipe_ the messages for me ? :)

thanks,

cemo
Re: rnews example
#65712
Author: Faye Pearson
Date: Thu, 12 Jun 2003 10:04
32 lines
1933 bytes
On 10 Jun 2003 13:25:59 -0700, cemo <destek@cpsoft.biz> wrote:
> I'm sorry if this is a dumb question but, how will I pipe the
> message(s) ? I'm not familiar with these terms. Is there anything that
> will _pipe_ the messages for me ? :)

Windows user?

In DOS and Unix, the pipe is a connection between the output of one
program and the input of another.  You represent it on the command line
with a | (pipe) symbol.  Eg in DOS:

type file.txt | more

sends the contents of file.txt to the program more which inserts "Press
Enter for next page" every 24 lines (or however long your display is).

This still works with command-line oriented programs in windows.

type article.txt | rnews

will pipe article.txt to rnews.


Faye

-- 
Faye Pearson,
Covert Development
ClaraNET Ltd.       Tel 020 7903 3000

You attempt things that you do not even plan because of your extreme stupidity.
Re: rnews example
#65711
Author: Jeffrey M. Vinocur
Date: Thu, 12 Jun 2003 10:10
15 lines
1490 bytes
In article <65ef3d34.0306101225.5270a23@posting.google.com>,
cemo <destek@cpsoft.biz> wrote:
>
>I'm sorry if this is a dumb question but, how will I pipe the
>message(s) ? I'm not familiar with these terms. Is there anything that
>will _pipe_ the messages for me ? :)

Try `rnews path/to/article` first of all, and see if it works.
If it does, we can talk about doing many articles at once.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: rnews example
#65716
Author: cemo
Date: Thu, 12 Jun 2003 21:25
20 lines
1726 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote in message news:<bc9ji1$48e$1@puck.litech.org>...
> Try `rnews path/to/article` first of all, and see if it works.

I tried it and it was unsuccessfull. But after a hard work I found
that there was a permission problem and "file format problem". I mean
the line feeds (or whatever you call) They were all "Windows type".
When I corrected the line feeds of a single article in Linux box, it
worked. Now I have 2 problems;

1) How will I replace all the "Win Style" LFs with "Unix Style" in
thousands of articles ?

> If it does, we can talk about doing many articles at once.

2) I did my home-work. So let's talk about "many articles at once" :)

thank you very much...

cemo
Re: rnews example
#65718
Author: Jeffrey M. Vinocur
Date: Thu, 12 Jun 2003 22:19
29 lines
2128 bytes
In article <65ef3d34.0306121325.3bce297b@posting.google.com>,
cemo <destek@cpsoft.biz> wrote:
>
>1) How will I replace all the "Win Style" LFs with "Unix Style" in
>thousands of articles ?

I'm somewhat surprised that you had a problem with that, but
whatever.  Anyway, your system may come with a program called
dos2unix which is useful for this purpose.


>2) I did my home-work. So let's talk about "many articles at once" :)

Hmm, ok, let's see.  The standard unix trick would be something
like

    /bin/ls -1 > /tmp/filelist
    cat /tmp/filelist | xargs -n1 $pathbin/rnews

assuming that there are no special characters or whitespace in
your file names.  There are lots of other ways (for example,
rnews also supports a batch format, but that may be more trouble
than it's worth to create; some of the other INN utils may work
better), but I'd have to look those up.  You can check if it
works by editing /tmp/filelist to only have a few test files
instead of all of them.


Re: rnews example
#65761
Author: cemo
Date: Sun, 15 Jun 2003 01:05
38 lines
2613 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote in message news:<bcau9l$pas$1@puck.litech.org>...
> In article <65ef3d34.0306121325.3bce297b@posting.google.com>,
> cemo <destek@cpsoft.biz> wrote:
> >
> >1) How will I replace all the "Win Style" LFs with "Unix Style" in
> >thousands of articles ?
> 
> I'm somewhat surprised that you had a problem with that, but
> whatever.  Anyway, your system may come with a program called
> dos2unix which is useful for this purpose.
> 
I couldn't find 'dos2unix' in my system (Mandrake 9.1) but I found a
little script which removes all the <CR>s from given files. So far it
is doing the job, but I'm afraid it will corrupt my binary articles
somehow. I saw some problems especially with .rar attachments. Do you
think that script made this or is there anything else that I should
care of?

> >2) I did my home-work. So let's talk about "many articles at once" :)
> 
> Hmm, ok, let's see.  The standard unix trick would be something
> like
> 
>     /bin/ls -1 > /tmp/filelist
>     cat /tmp/filelist | xargs -n1 $pathbin/rnews

This one worked with almost 80% success, but there are two problems.
First it has got a number limit. When I tried to process 5000
articles, it gave an error. Then I tried 3000 articles and it was OK.
Second problem is, I can't get enough feedback from syslog, especially
about which articles are rejected and why are they rejected. And it
does not move or delete the accepted articles. Could you please
suggest me another alternative to rnews ?

Thank you for your useful tips.

cemo
Re: rnews example
#65762
Author: greg andruk
Date: Sun, 15 Jun 2003 03:28
17 lines
2278 bytes
destek@cpsoft.biz (cemo) writes:

> I couldn't find 'dos2unix' in my system (Mandrake 9.1)

Google for dos2unix-0.8.1-2mdk.i586.rpm -- it's a contrib thing.

> but I found a
> little script which removes all the <CR>s from given files. So far it
> is doing the job, but I'm afraid it will corrupt my binary articles
> somehow. I saw some problems especially with .rar attachments. Do you
> think that script made this or is there anything else that I should
> care of?

It may turn out fine, but you might really want to turn CRLF into LF,
not just strip CRs (that's what dos2unix tries to do).

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