🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #74692

Re: Xnews: quote prefix bug

#74692
From: Robert Amesz
Date: Thu, 29 Mar 2001 22:53
57 lines
3842 bytes
Brian wrote:

> [Snip]
>
>Wouldn't there be a way for you to find the quote level, strip out
>the spaces, then place a single space after the last quote prefix in
>the series? IOW, you must be doing some type of "quote detection"
>anyway because we now have the ability to apply different colors to
>different quote levels. 

Well, in the [misc] page of the setup dialog, top right, you can
adjust the regex to detect quoted lines. 

However, the trouble with line-by-line quote detection is that it
doesn't always get it right. It is much more reliable to analyse the
post as a whole, and then decide what is the most likeley
quote-prefix. By making a few passes over the text, you can determine
this, independently, for every level of quotation. 

Some time ago I experimented with this in Python (well, you *may*
have noticed my X-Face) and it works quite well. Once you have parsed
the posting in this way it also becomes (relatively) easy to improve
the formatting. These are the things I have tried: 

- Force the quote prefix character to be displayed as a'>', even when
  the poster used a ':', '|', or whatever.
- Force a single space between the quote prefix character(s) and the
  text.
- Force an empty line where the quote level changes 
- Repair badly wrapped text, even at deeper quote levels.

After this, I tried to come up with a simple and robust algorithm to
guess which linebreaks are 'soft' and which are 'hard' (you need to
know this on order to re-wrap the text) but that proved to be a bit
harder than I thought. As I was just experimenting for my own
amusement I decided to give it a rest. Still, even without this,
other things should be easy to implement. I'm thinking of: 

- Fixing bottom quoting (Ecch! That *really* annoys me.)
- Removing excessive quoting. (You know, some people quote 300 lines,
  and then just add a line or two of their own. Lazy bastards.) 
- Removing quoted .sigs. 

Well, the list could be longer yet, but you get the picture. The one
disadvantage of this scheme is that you need to have all the text in
memory before you can fully analyze it. If you have a fast
connection, or use Hamster that shouldn't be a big problem, though,
except for really long posts. 

Mind you, I'm not a Delphi-programmer (and as I was never too keen on
Pascal's syntax and quirks I'm not really eager to learn) so this 
doesn't really help Luu Tran, I know, but I just wanted to say these 
things can be done, and they're not as difficult as you might think. 


Robert Amesz
Technical Details
Message-ID: <Xns9074886C97CCrcamesz@127.0.0.1>
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!supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!newsfeed.icl.net!newspeer.clara.net!news.clara.net!dispose.news.demon.net!news.demon.nl!demon!amesz.demon.nl!not-for-mail
References: <Xns90719555328Bbrianspamcopnet@207.126.101.100> <Xns9071D6AF863D4wqnytneab@news.wherever> <Xns9071EC0776A1luutrangeocities@206.13.28.182> <Xns90721F848B7E5brianspamcopnet@207.126.101.100> <Xns9072947EA9406luutrangeocities@206.13.28.182> <Xns9072BC627D300brianspamcopnet@207.126.101.100>

Show Full Headers
Complete Article Headers
Message-ID: <Xns9074886C97CCrcamesz@127.0.0.1>
Subject: Re: Xnews: quote prefix bug
Date: Thu, 29 Mar 2001 22:53:15 GMT
From: rcameszREMOVETHIS@dds.removethistoo.nl (Robert Amesz)
References: <Xns90719555328Bbrianspamcopnet@207.126.101.100> <Xns9071D6AF863D4wqnytneab@news.wherever> <Xns9071EC0776A1luutrangeocities@206.13.28.182> <Xns90721F848B7E5brianspamcopnet@207.126.101.100> <Xns9072947EA9406luutrangeocities@206.13.28.182> <Xns9072BC627D300brianspamcopnet@207.126.101.100>
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!supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!newsfeed.icl.net!newspeer.clara.net!news.clara.net!dispose.news.demon.net!news.demon.nl!demon!amesz.demon.nl!not-for-mail
Newsgroups: news.software.readers
Reply-To: rcamesz@dds.nl
NNTP-Posting-Host: amesz.demon.nl
X-NNTP-Posting-Host: amesz.demon.nl:212.238.72.220
X-Trace: news.demon.nl 985906395 pluto:25424 NO-IDENT amesz.demon.nl:212.238.72.220
X-Complaints-To: abuse@nl.demon.net
X-Posting-Agent: Hamster/1.3.13.0
User-Agent: Xnews/4.03.25
Lines: 56