Article View: news.software.readers
Article #35304Re: slrn: want post_body_filter_hook
From: Byrial Jensen
Date: Sat, 19 Jul 1997 00:00
Date: Sat, 19 Jul 1997 00:00
40 lines
1892 bytes
1892 bytes
Pardoz <pardoz@io.com> wrote: >On 16 Jul 1997 07:49:09 GMT, Kikutani Makoto <kikutani@jdc.ericsson.se> >wrote: > >>But I felt difficulty because I should trim both header and signature >>from the file. If there is a hook for filtering only body part, >>it'll be easy. > > I'll second the request for a body-filtering hook (it would also >make spell-checking much easier, since you wouldn't have ispell or >whatever hiccupping on the Path: and References: lines). I wrote a little utility program named newsbody to filter only the body part of an article. It is like called this: newsbody -qs -n .article -p ispell -- -x %f It will take the file '.article', and remove from it the header, the signature (because of the -s flag), and all quotes (because of the -q flag). It will then write the result to the file '.article.body' and call: ispell -x .article.body When ispell returns it will change the body part of '.article' according to the changes in '.article.body' and eventually delete '.article.body' again. You can the download the C source to newsbody from <URL:http://home3.inet.tele.dk/byrial/slrn/newsbody.c>. I have only tried the program on my Linux box. I don't know, but I guess that it will compile on most systems. If changes are needed, please let me know. Regards, - Byrial
Technical Details
Message-ID:
<slrn5t25me.70.byrial@ask.ask>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<5qhudl$n04@newstoo.ericsson.se> <slrn5spfbq.26.pardoz@io.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn5t25me.70.byrial@ask.ask> Subject: Re: slrn: want post_body_filter_hook Date: Sat, 19 Jul 1997 00:00:00 +0000 From: byrial@post3.tele.dk (Byrial Jensen) References: <5qhudl$n04@newstoo.ericsson.se> <slrn5spfbq.26.pardoz@io.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 257736655 Newsgroups: news.software.readers