Article View: news.software.readers
Article #38977Re: Appending signatures - the algorithm (Re: What's in a signature?)
From: Curt Welch
Date: Sat, 21 Feb 1998 00:00
Date: Sat, 21 Feb 1998 00:00
67 lines
4459 bytes
4459 bytes
lahvak@math.mps.ohio-state.edu (Jan Hlavacek) wrote: > On 20 Feb 1998 12:42:53 GMT, Jeroen Scheerder <js@xs4all.nl> wrote: > > Sven Guckes (guckes@math.fu-berlin.de): > > > > > remove all sigdashes lines from sigfile > > > > Actually, I think you mean "remove all sigdashes from article body". > > Sigdashes inside .sigs are irrelevant: everything after the first > > '^-- $' is, by definition, part of the .sig. No confusion there. > Or is it everything after the last "^-- $"? > Where is it defined? It's not defined, and it doesn't need to be in my opinion. Most articles on Usenet that have a "-- " will have only one of them and it will correctly define the .sig. So, any of the algorithms (like finding the first dash dash space or the last) will work fine. If you want to be more accurate on the few articles that have multiple, dash dash spaces, then the newsreader author is free to implement any algorithm they choose. The reality these days is that most articles that have more than one dash dash space line are caused by multiple sigs being appended. So, the "everything after the first '-- '" algorithm will produce better results than the "everything after the last" algorithm. But, I've seen at least one case where a file was appended after the sig. The article was clearly formatted incorrectly, yet I want my newsreader to "do the right thing" even when given bad data, so what I chose to implement was an algorithm that looked for the first "-- ", but limited it's search to the last part of the article. "last part" was defined by an algorithm which I forget but was based on the length of the article. Basically, if the sig is too long, it will be treaded as part of the article and not part of the sig when creating a reply. Also, I've seen articles with a double dash but no space. I also look for those if there's not a valid dash dash space, but I only honor the double dash if it's in something like the last 10 lines of the article. And then there's the issue of articles that have been run though PGP. It's not uncommon to see a PGP signed article where the dash dash space as been changed into a dash space dash dash space. Finding the sig correctly in those is even more work :). As far as what a newsreader should do when creating a new article, I think it should probably try to prevent multiple dash dash spaces in the article. If there are extra dash dash spaces at the end of the article or the beginning of the sig, they should be stripped out and replaced with a single dash dash space. If there are other dash dash spaces in the article or sig, they should be changed to a simple double dash (removing the space). But, if there is no sig, then the user should be allowed to add one by hand at the end of the article and insert the dash dash space themself. So in this case, the dash dash space in the body shouldn't be changed to a dash dash. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<19980220220515.252$V5@newsreader.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sys.mac.comm.mbox.zip!not-for-mailReferences:
<smfr-1202981139350001@dynamic23.pm01.mv.best.com> <jammer-1302981538050001@sense-sea-pm5-19.oz.net> <hshubs-1302982145340001@ip241.dallas2.tx.pub-ip.psi.net> <ethridge-1402980955550001@ppp10-6.dllstx.onramp.net> <forbes-1402981802530001@msf-5.pr.mcs.net> <1d4gpeh.pre88g1urd238N@ppp050.0.mmtl.videotron.net> <rbraun-1502981851390001@dialin1145.cstone.net> <jammer-1502981644250001@sense-sea-pm3-1.oz.net> <0AFFCAD2FB5DF021.5215E615A5A68C17.011EAF784412D9DC@library-proxy.airnews.net> <slrn6ermsd.5qo.lahvak@math.mps.ohio-state.edu>Show Full Headers
Complete Article Headers
Message-ID: <19980220220515.252$V5@newsreader.com>
Subject: Re: Appending signatures - the algorithm (Re: What's in a signature?)
Date: Sat, 21 Feb 1998 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <smfr-1202981139350001@dynamic23.pm01.mv.best.com> <jammer-1302981538050001@sense-sea-pm5-19.oz.net> <hshubs-1302982145340001@ip241.dallas2.tx.pub-ip.psi.net> <ethridge-1402980955550001@ppp10-6.dllstx.onramp.net> <forbes-1402981802530001@msf-5.pr.mcs.net> <1d4gpeh.pre88g1urd238N@ppp050.0.mmtl.videotron.net> <rbraun-1502981851390001@dialin1145.cstone.net> <jammer-1502981644250001@sense-sea-pm3-1.oz.net> <0AFFCAD2FB5DF021.5215E615A5A68C17.011EAF784412D9DC@library-proxy.airnews.net> <slrn6ermsd.5qo.lahvak@math.mps.ohio-state.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sys.mac.comm.mbox.zip!not-for-mail
X-Deja-AN: 327146446
X-User: Curt@NewsReader.Com
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
Organization: KCW Consulting
X-Url: http://CurtWelch.Com/
Newsgroups: comp.sys.mac.comm,news.software.readers