🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90307

Re: working with cnfs

#90307
From: Nigel Reed
Date: Mon, 17 Apr 2023 22:31
50 lines
2734 bytes
On Mon, 17 Apr 2023 21:37:49 -0000 (UTC)
gof-cut-this-news@cut-this-chmurka.net.invalid (Adam W.) wrote:

> Nigel Reed <sysop@endofthelinebbs.com> wrote:
> 
> > 1. How can I search the entire spool for a given phrase.
> > 
> > 2. How can I search a given hierarchy recursively for a given
> > phrase.  
> 
> I don't have a direct answer (other than what Julien said), but if
> the search phrase is always the same, then you could add another
> newsfeeds entry and feed all new articles to the program with "Tp".
> This program (script) could do the grep and, for example, send you an
> email, or post to a private group, or whatever (~15 years ago I used
> to have a similar setup, reposting all replies to my posts to a
> private group, accessible only by me -- it was more convenient to
> reply to them this way).
> 
> Now I'm using it to count articles on Polish newsgroups to produce
> results like these:
> 
> http://news.chmurka.net/top15.php
> 
> The line is:
> 
> chmurka.postprocessor.pl\
>         :!*,pl.*,alt.pl.*\
>         :Tp:/usr/local/news/local/bin/post-processor-pl.sh %s
> 
> Now, as I think of it, it would be doable to do such grepping script
> by writing a program that reads the CNFS file (the format has to be
> described somewhere, or can be deduced from the source code) and
> maybe dumps its contents to stdout (or searches for a phrase and
> dumps the whole article), but I don't know of anything like that.
> 
> On the other hand, CNFS is a binary format, but posts are stored in a
> text format, so maybe something like this will suffice?
> 
> strings cnfs-file | grep phrase
> grep -a phrase cnfs-file

Unfortunately the queries would be ad-hoc. I was looking at CPAN,
212,470 modules and nothing to work with CNFS. 


-- 
End Of The Line BBS - Plano, TX
telnet endofthelinebbs.com 23
Technical Details
Message-ID: <20230417173141.795d85a5@wibble.sysadmininc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <20230417103454.440dbdc0@wibble.sysadmininc.com> <u1ke7c$634$1$arnold@news.chmurka.net>

Show Full Headers
Complete Article Headers
Message-ID: <20230417173141.795d85a5@wibble.sysadmininc.com>
Subject: Re: working with cnfs
Date: Mon, 17 Apr 2023 17:31:41 -0500
From: Nigel Reed <sysop@endofthelinebbs.com>
References: <20230417103454.440dbdc0@wibble.sysadmininc.com> <u1ke7c$634$1$arnold@news.chmurka.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: End Of The Line BBS
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: www.sysadmininc.com; posting-host="47.189.156.66"; logging-data="398259"; mail-complaints-to="usenet@www.sysadmininc.com"
X-Newsreader: Claws Mail 4.1.1git47 (GTK 3.24.33; x86_64-pc-linux-gnu)