🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #54576

Re: piping via newsfeeds problem

#54576
From: Anne Wilson
Date: Mon, 08 Oct 2001 20:23
71 lines
3900 bytes
Andrew Gierth wrote:
> 
> >>>>> "Jeffrey" == Jeffrey M Vinocur <jeff@litech.org> writes:
> 
>  >> test!:!*,unidata.hds\
>  >> :Tc,Wn:\
>  >> /opt/news/util/dataProdHandlers/retrieveArtAsProd >
>  >> /opt/news/test/sent.out
> 
>  Jeffrey> You realize that every time you process an article it will
>  Jeffrey> overwrite the previous result?
> 
> Actually, it won't; the sent.out file will be clobbered every time the
> channel command is respawned (which happens if it exits, or the
> channel is flushed or restarted, or if the newsfeeds file or active
> file is reloaded, etc.)
> 

Yeah, it appends.

> My inclination, though, would be to have the channel program do all
> the file manipulations (even if it's just a trivial script wrapper
> round the real program).
> 
> My guess is that the problem is actually caused by failure to flush
> the output _within_ the channel program (using ctlinnd won't help with
> that).
> 

mmm, that could be.  But, why would it work properly from the command
line?  What's different?

Also, Jeffrey mentioned having the program log some info.  I did have it
log byte counts to stderr and it appeared to be processing the entire
data product.  Clearly, I'll have to get more information out of it.

Like you both pointed out, I will ultimately need unique file names. 
I'll have to extract some information out of the data product for that
purpose.  

The way our current system works is cool, although difficult for users
who are non computer people.  We use regular expressions to match
products IDs.  Portions of the regular expression can be parenthesized,
and those parts of the product ID that match the parenthesized portion
of the regexp can be used in the file name.  This all happens via a
configuration file.  here's an example that uses the 2nd and 3rd
parenthesized expression in the file name (the product ID is something
like L2-<something>/KWBC/yyyymmddhhmmss):

^L2-([^/]*)/(....)/([0-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9][0-2][0-9][0-5][0-9][0-9][0-9]) 
FILE    data/nexradII/compressed/\2/\3.raw

It would be nice if I could do something similar via newsfeeds, but
that's looking doubtful to me at this point.  Since I need to run
products through this "decoder" anyway, maybe that's the way to handle
extracting such info...  

Anne

> --
> Andrew.

-- 
***************************************************
Anne Wilson			UCAR Unidata Program		
anne@unidata.ucar.edu		       P.O. Box 3000
              			  Boulder, CO  80307
----------------------------------------------------
Unidata WWW server       http://www.unidata.ucar.edu/
****************************************************
Technical Details
Message-ID: <3BC20B5E.5571C5AC@unidata.ucar.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!btnet-peer0!btnet-peer1!btnet!isdnet!ctu-gate!news.nctu.edu.tw!feeder.seed.net.tw!attdv1!attdv2!ip.att.net!frgp!ucar!not-for-mail
References: <3BBDD092.D1CF35F8@unidata.ucar.edu> <9po0vm$mcc$1@marduk.litech.org> <87n134ryyq.fsf@erlenstar.demon.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <3BC20B5E.5571C5AC@unidata.ucar.edu>
Subject: Re: piping via newsfeeds problem
Date: Mon, 08 Oct 2001 14:23:58 -0600
From: Anne Wilson <anne@unidata.ucar.edu>
References: <3BBDD092.D1CF35F8@unidata.ucar.edu> <9po0vm$mcc$1@marduk.litech.org> <87n134ryyq.fsf@erlenstar.demon.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!btnet-peer0!btnet-peer1!btnet!isdnet!ctu-gate!news.nctu.edu.tw!feeder.seed.net.tw!attdv1!attdv2!ip.att.net!frgp!ucar!not-for-mail
Newsgroups: news.software.nntp
Organization: UCAR
Lines: 70
NNTP-Posting-Host: imogene.unidata.ucar.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.ucar.edu 1002572638 19510 128.117.140.28 (8 Oct 2001 20:23:58 GMT)
X-Complaints-To: news@news.ucar.edu
NNTP-Posting-Date: 8 Oct 2001 20:23:58 GMT
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.2-2smp i686)
X-Accept-Language: en