🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Anne Wilson Sat, 29 Sep 2001 22:09
Piping an article to a program via newsfeeds
#54444
Author: Anne Wilson
Date: Sat, 29 Sep 2001 22:09
62 lines
3335 bytes
Hello,

I am trying to send an article to a program I wrote via an entry in the
newsfeeds file.  Being a newbie, it's not going the way I expected.  

The article is a binary file that I encoded for transmission.  The
program currently reads from stdin.  This has generated a few questions
for me.

First, what is the difference between Tc and a Tp?  When should I use
one or the other?  When I use Tp, I see that the input that my program
is getting is something like: XR^U@XR^U@��^��^��^... When I use Tc, the
input is something like @0301484453000000000...  


Second, I'm getting the idea that I must use the sm to actually get the
article.  Is there any other way?  In searching the archives, I found
the following question:

       I have a feature request for INN: add a new parameter to the W
flag to
       cause the entire article to be written to the site
channel/file/etc.
       There's already WH to send the headers.

       We have a locally written script that reposts locally posted
articles to a
       specific newsgroup so admins can keep an eye on postings
originating from
       our news server.  When I upgraded to 2.x the move to storageapi
and CNFS
       broke the script.  I've rewritten it to use sm to fetch articles,
but it
       would make more sense to have innd simply send the article down
the
       channel.

With the following response:

       You need to translate wire formatted article when you
       use raw data, while sm does this.  Are you still need
       it?
       -- 
       Katsuhiro Kondou

Does this mean that an article is reformatted in some way for
transmission?  Is that what I'm seeing when I use Tp?  Am I limited to
using sm?  Performance is an issue for me - I'd like to avoid the
overhead of invoking extra programs if possible.

Any insights would be greatly appreciated.

Anne
-- 
***************************************************
Anne Wilson			UCAR Unidata Program		
anne@unidata.ucar.edu		       P.O. Box 3000
              			  Boulder, CO  80307
----------------------------------------------------
Unidata WWW server       http://www.unidata.ucar.edu/
****************************************************
Re: Piping an article to a program via newsfeeds
#54456
Author: Jeffrey M. Vinocur
Date: Mon, 01 Oct 2001 22:54
40 lines
2107 bytes
In article <3BB646A2.8D7DC023@unidata.ucar.edu>,
Anne Wilson  <anne@unidata.ucar.edu> wrote:
>
>I am trying to send an article to a program I wrote via an entry in the
>newsfeeds file.  Being a newbie, it's not going the way I expected.  
>
>The article is a binary file that I encoded for transmission.  The
>program currently reads from stdin.

Do you want your program to be executed once for every article?
if yes, you want a program feed.  If not, you want a channel
feed.


>Second, I'm getting the idea that I must use the sm to actually get the
>article.  Is there any other way?

No. 


>       You need to translate wire formatted article when you
>       use raw data, while sm does this.  Are you still need
>       it?
>
>Does this mean that an article is reformatted in some way for
>transmission?

I'm not sure about this.  But...


>Performance is an issue for me - I'd like to avoid the
>overhead of invoking extra programs if possible.

What language are you using? 

If it's C, I believe you can link against the INN libraries and
do the sm() call yourself.  


Re: Piping an article to a program via newsfeeds
#54471
Author: Anne Wilson
Date: Tue, 02 Oct 2001 17:33
57 lines
3018 bytes
"Jeffrey M. Vinocur" wrote:
> 
> In article <3BB646A2.8D7DC023@unidata.ucar.edu>,
> Anne Wilson  <anne@unidata.ucar.edu> wrote:
> >
> >I am trying to send an article to a program I wrote via an entry in the
> >newsfeeds file.  Being a newbie, it's not going the way I expected.
> >
> >The article is a binary file that I encoded for transmission.  The
> >program currently reads from stdin.
> 
> Do you want your program to be executed once for every article?
> if yes, you want a program feed.  If not, you want a channel
> feed.
> 
> >Second, I'm getting the idea that I must use the sm to actually get the
> >article.  Is there any other way?
> 
> No.
> 
> >       You need to translate wire formatted article when you
> >       use raw data, while sm does this.  Are you still need
> >       it?
> >
> >Does this mean that an article is reformatted in some way for
> >transmission?
> 
> I'm not sure about this.  But...
> 
> >Performance is an issue for me - I'd like to avoid the
> >overhead of invoking extra programs if possible.
> 
> What language are you using?
> 
> If it's C, I believe you can link against the INN libraries and
> do the sm() call yourself.


Jeffrey,

Thank you for responding.  I am writing in C - I'll incorporate the sm
call into my code.

But, it seems odd to me that innd would not be able to dump the raw
article.  Isn't it extra work to have to call the sm?  Isn't it innd's
job is to handle both incoming and outgoing feeds? 

Anne
-- 
***************************************************
Anne Wilson			UCAR Unidata Program		
anne@unidata.ucar.edu		       P.O. Box 3000
              			  Boulder, CO  80307
----------------------------------------------------
Unidata WWW server       http://www.unidata.ucar.edu/
****************************************************
Re: Piping an article to a program via newsfeeds
#54479
Author: Jeffrey M. Vinocur
Date: Tue, 02 Oct 2001 20:26
21 lines
1609 bytes
In article <3BB9FA6D.F9D4090F@unidata.ucar.edu>,
Anne Wilson  <anne@unidata.ucar.edu> wrote:
>
>But, it seems odd to me that innd would not be able to dump the raw
>article.  Isn't it extra work to have to call the sm?

For INN to give you the raw article, it would just be calling sm
anyway.  So it might be more convenient, but no faster.


>Isn't it innd's job is to handle both incoming and outgoing
>feeds? 

Read the "Note" in the first paragraph of Feed Types in your
newsfeeds manpage.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Piping an article to a program via newsfeeds
#54604
Author: Tony Rentschler
Date: Tue, 09 Oct 2001 16:01
29 lines
1869 bytes
In article <9pd7to$sh$1@marduk.litech.org>, Jeffrey M. Vinocur
<jeff@litech.org> wrote:

> In article <3BB9FA6D.F9D4090F@unidata.ucar.edu>,
> Anne Wilson  <anne@unidata.ucar.edu> wrote:
> >
> >But, it seems odd to me that innd would not be able to dump the raw
> >article.  Isn't it extra work to have to call the sm?
> 
> For INN to give you the raw article, it would just be calling sm
> anyway.  So it might be more convenient, but no faster.
> 
> 
> >Isn't it innd's job is to handle both incoming and outgoing
> >feeds? 
> 
> Read the "Note" in the first paragraph of Feed Types in your
> newsfeeds manpage.

I can't seem to find a description of an article token. What is it
exactly? Is it relevant if one is not using the storage manager? Is it
applicable to INN 2.2.x?

Thanks

-- 
Tony Rentschler
New York, NY
Re: Piping an article to a program via newsfeeds
#54605
Author: Andrew Gierth
Date: Tue, 09 Oct 2001 17:34
20 lines
1801 bytes
>>>>> "Tony" == Tony Rentschler <trentschler@ap.org> writes:

 Tony> I can't seem to find a description of an article token. What is
 Tony> it exactly?

An article token is a magic thingy that looks like @000000.....@
which can be passed to the storage API to retrieve the article (i.e.
the article's location is encoded in the token in some fashion).

 Tony> Is it relevant if one is not using the storage manager?

no (though from 2.3 onwards you don't have any choice about that)

 Tony> Is it applicable to INN 2.2.x?

2.2.x uses tokens only if storageapi is enabled.

-- 
Andrew.
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