🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #38922

Appending signatures - the algorithm (Re: What's in a signature?)

#38922
From: Sven Guckes
Date: Thu, 19 Feb 1998 00:00
39 lines
2819 bytes
gberigan@cse.unl.edu (Greg Berigan):
> Can't be having two instances of the canonical signature delimiter appearing.
> Add to that: translating any lines therein of "-- \n" to "--\n"

OK, new version of the add-sig algorithm then:

# Add signature to email or post:
sigfile := $HOME/.signature
if sigfile does not exist
then die "sigfile does not exist"
else
  read first paragraph of sigfile # no empty lines in sigs!
  if sigfile is empty
  then die "sigfile start with empty line(s)"
  else 
    remove all sigdashes lines from sigfile
    if sigfile empty
    then die "sig contains only sigdashes lines"
    else 
      append sigdashes
      append first four lines of sigfile
    end
  end
end

Now, is this correct?  Anything missing?
If so - can anyone convert this to Perl?

Maybe we should convert tabs to spaces, too?
How about a warning on 8bit characters?
Warn on escape codes?

Hmm, seventeen references in this post.
Should I cut it down to ten?  Naah...

Sven

Technical Details
Message-ID: <slrn6epdiv.n3a.guckes@rudin.math.fu-berlin.de>
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
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> <jammer-1502982230030001@sense-sea-pm6-5.oz.net> <1B364DFA69C6C18F.4CD3D554E3200D90.AFCCB6D87106AFC8@library-proxy.airnews.net> <jammer-1702981348140001@sense-sea-pm4-16.oz.net> <alan.zeleznikar-1702981608500001@280-3r-mac9a.wdl.lmco.com> <jammer-1702982055110001@sense-sea-pm9-7.oz.net> <slrn6elqce.k43.guckes@rudin.math.fu-berlin.de> <1d4pnqo.eqk2khve9opnN@n164-33.berlin.snafu.de> <gberigan-1902981618530001@abeln730a.unl.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrn6epdiv.n3a.guckes@rudin.math.fu-berlin.de>
Subject: Appending signatures - the algorithm (Re: What's in a signature?)
Date: Thu, 19 Feb 1998 00:00:00 +0000
From: guckes@math.fu-berlin.de (Sven Guckes)
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> <jammer-1502982230030001@sense-sea-pm6-5.oz.net> <1B364DFA69C6C18F.4CD3D554E3200D90.AFCCB6D87106AFC8@library-proxy.airnews.net> <jammer-1702981348140001@sense-sea-pm4-16.oz.net> <alan.zeleznikar-1702981608500001@280-3r-mac9a.wdl.lmco.com> <jammer-1702982055110001@sense-sea-pm9-7.oz.net> <slrn6elqce.k43.guckes@rudin.math.fu-berlin.de> <1d4pnqo.eqk2khve9opnN@n164-33.berlin.snafu.de> <gberigan-1902981618530001@abeln730a.unl.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: 326738834
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
X-Newsreader-Info: http://www.math.fu-berlin.de/~guckes/slrn/
X-Trace: fu-berlin.de 887928416 18956 (none) 160.45.40.74
Organization: Freie Universitaet Berlin
X-Access: 16 17 19
Mime-Version: 1.0
Reply-To: guckes@math.fu-berlin.de
Newsgroups: comp.sys.mac.comm,news.software.readers