Article View: news.software.readers
Article #191225Re: [slrn] very easy display filter enabling colour in message body
From: Alan Connor
Date: Mon, 02 Oct 2006 06:41
Date: Mon, 02 Oct 2006 06:41
69 lines
3577 bytes
3577 bytes
On news.software.readers, in <20061002123732@usenet.piggo.com>, "Troy Piggins" wrote: Troy, A chastised Alan Connor tries again :-) > I've been using a demime and t-prot display filter for some > time to tidy up MIME pgp signed and html messages, and trimming > long quote blocks, trimming overly long sigs etc. All good. > > I just recently started playing with my own display filter to > take it all one step further to fix some things like improper > sig delimiters etc using a sed script. I got that working and > thought I'd share. It's very customisable. > > While playing with it I had a thought about colours (that's > the same as colors, but with a 'u' in it like there should be > ;-) ). One of the things that frustrate me with slrn is that > you can't colour the body of a message for anything other than > slrn's inbuilt options - emphasis, bold, url's etc. > > Well guess what, with my new homemade display filter you can. > Sort of. Just create a sed expression to change the text you > want coloured into /emphasis/, *bold*, or _underline_. > > eg, say I want to colour my name in the message body. I add > this entry into my display filter: > > sed -e ' > s/Troy Piggins/*&*/ > # other substitutions can go here too! > # eg fix incorrect sig delimiters > s/^--$/-- / > ' > > This changes my name to *Troy Piggins* in the message body. That shows up as your name with asterisks on either side of it here in _my_ slrn. I like it that way. The formatting of complex scripts like this one are really messed up by the newsservers and especially when quoted in a followup. Better to put it on a web/ftp site wrapped in basic HTML tags, or uuencoded/mimencoded encoded tarballs. <snip> > algorithm doesn't seem to like the colons or something. > > Also if you followup a filtered message, it's the filtered > message that is quoted not the original, because the macro > replaces the article (not on the server, just viewed). You can > turn off the filter by hitting <esc>-7 or whatever you assign > unregister_display_filters to. > > Hope the above makes sense. If not, just ask. I'll certainly give it a good study, Troy. Thanks. Kind of strange mixing bash and slang, isn't it? Alan -- http://home.earthlink.net/~alanconnor/contact.html http://home.earthlink.net/~alanconnor/cr.html http://home.earthlink.net/~alanconnor/publickey.html
Technical Details
Message-ID:
<slrnei1d4a.2as.i3x9mdw@b29x3m.invalid>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!65807237!not-for-mailReferences:
<20061002123732@usenet.piggo.com>Show Full Headers
Complete Article Headers
Message-ID: <slrnei1d4a.2as.i3x9mdw@b29x3m.invalid> Subject: Re: [slrn] very easy display filter enabling colour in message body Date: Mon, 02 Oct 2006 06:41:55 GMT From: Alan Connor <i3x9mdw@j9n35c.invalid> References: <20061002123732@usenet.piggo.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.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!65807237!not-for-mail Newsgroups: news.software.readers X-Homepage: http://home.earthlink.net/~alanconnor/ X-Local-Newsserver: slrnpull 0.9.8.1 User-Agent: slrn/0.9.8.1 (Debian) Lines: 69 NNTP-Posting-Host: 4.242.3.235 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1159771315 4.242.3.235 (Sun, NNTP-Posting-Date: Sun, 01 Oct 2006 23:41:55 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net