🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90303

Re: working with cnfs

#90303
From: Julien ÉLIE
Date: Mon, 17 Apr 2023 18:15
36 lines
2425 bytes
Hi Nigel,

> 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'm sure I'm not the first person who wants to do this so hopeful
> someone has a solution.

I'm unfortunately not aware of such a tool for other storage methods 
than tradindexed.  Even timehash won't respond to the second point as 
articles are not classified by hierarchy.

If someone has ever written a script to do that, I would happily add it 
to INN.

I would otherwise just suggest to retrieve articles one by one from the 
history file, and parse them.
To do that, take the last field of each line in the history field, and 
give its value to "sm -q".

Example for the first article in the history file in pathdb:

% head -n1 history | cut -f3 | sm -q

You'll get the article on standard output.  You could then grep in it 
whatever you want.
You now need to iterate over each article.

Of course a more complex script should be written if your search has 
several parameters (in a hierarchy, from someone, etc.).

-- 
Julien ÉLIE

« Ira furor breuis est. » (Horace)
Technical Details
Message-ID: <u1k2cf$1ran5$1@news.trigofacile.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>

Show Full Headers
Complete Article Headers
Message-ID: <u1k2cf$1ran5$1@news.trigofacile.com>
Subject: Re: working with cnfs
Date: Mon, 17 Apr 2023 20:15:43 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <20230417103454.440dbdc0@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
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 17 Apr 2023 18:15:43 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176-143-2-105.abo.bbox.fr:176.143.2.105"; logging-data="1944293"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0
Cancel-Lock: sha1:Tm4PmdPWxqjCGxY9OZLRsf1+p2I= sha256:xvUmBEFdl2dkNPwuCeG+loW+2sKONL2vv6H5oSdB8bA= sha1:7OvDTLPUcx/af3x2C2/yKKuezUw= sha256:E4hiraknS8D8uI5eVgx+kH4jS+CG8SKhCh7bGf5Jh6Y=
In-Reply-To: <20230417103454.440dbdc0@wibble.sysadmininc.com>