Article View: news.software.readers
Article #191226Re: [slrn] very easy display filter enabling colour in message body
From: Troy Piggins
Date: Mon, 02 Oct 2006 07:04
Date: Mon, 02 Oct 2006 07:04
81 lines
4092 bytes
4092 bytes
* Alan Connor wrote: > On news.software.readers, in <20061002123732@usenet.piggo.com>, > "Troy Piggins" wrote: > > Troy, > > A chastised Alan Connor tries again :-) No worries. >> 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. No worries - it's a personal thing. I just thought that if I'm highlighting a lot of things in a message, I don't want *'s etc everywhere. > 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. When I'm happy enough with it I'll put it up on my website along with some other macros. >> 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? Yeah, but I don't know how to do it in slang. If I could just get more than this miserly 24hours in one day I'd be right. Something like 36hours per day would do me. I could work, then come home and play with slang at night, and still sleep. Somebody slow down the spinning of the Earth for me, would ya? -- Troy Piggins ,-o o ) Ubuntu linux 6.06 http://ubuntu.com RLU#415538 http://counter.li.org `-o uptime: 16:58:41 up 21 days,22:27,2 users,load average:0.00,0.00,0.00
Technical Details
Message-ID:
<20061002165841@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!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mailReferences:
<20061002123732@usenet.piggo.com> <slrnei1d4a.2as.i3x9mdw@b29x3m.invalid>Show Full Headers
Complete Article Headers
Message-ID: <20061002165841@usenet.piggo.com> Subject: Re: [slrn] very easy display filter enabling colour in message body Date: Mon, 02 Oct 2006 17:04:50 +1000 From: Troy Piggins <usenet-0610@piggo.com> References: <20061002123732@usenet.piggo.com> <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!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail Newsgroups: news.software.readers Reply-To: usenet-0610@piggo.com User-Agent: slrn/0.9.8.1pl1/rt (Linux) Lines: 81 NNTP-Posting-Host: 203.206.60.205 X-Trace: 1159772702 per-qv1-newsreader-01.iinet.net.au 8413 203.206.60.205