* Add scottish filter by Adam Borowski. Closes: #436168
authorjoey <joey@a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Fri, 10 Aug 2007 00:19:09 +0000 (00:19 +0000)
committerjoey <joey@a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Fri, 10 Aug 2007 00:19:09 +0000 (00:19 +0000)
Makefile
debian/changelog
debian/copyright
filters.6
scottish [new file with mode: 0755]

index 8e7049d8c2301c6e3663a571a68bb0444df3ff26..9fb3326b31a7fb37ba5175b7f946d40701c81e69 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 LEX    = flex
 BUILD  = jethro kraut cockney jive nyc ken ky00te newspeak nethackify
 OTHER  = eleet b1ff chef jibberish upside-down rasterman studly fudd \
 LEX    = flex
 BUILD  = jethro kraut cockney jive nyc ken ky00te newspeak nethackify
 OTHER  = eleet b1ff chef jibberish upside-down rasterman studly fudd \
-         censor spammer uniencode pirate kenny
+         censor spammer uniencode pirate kenny scottish
 CFLAGS = -O2 -lfl
 INSTALL_PROGRAM = install
 
 CFLAGS = -O2 -lfl
 INSTALL_PROGRAM = install
 
index 3d64294b59a34d2684893ec3a55d61d02a7596fd..e96d98da8ea17cb47b78da1ecdb16fcf3af32a92 100644 (file)
@@ -1,8 +1,9 @@
 filters (2.40) UNRELEASED; urgency=low
 
   * Update url to web page in README.
 filters (2.40) UNRELEASED; urgency=low
 
   * Update url to web page in README.
+  * Add scottish filter by Adam Borowski. Closes: #436168
 
 
- -- Joey Hess <joeyh@debian.org>  Thu, 17 May 2007 00:12:46 -0400
+ -- Joey Hess <joeyh@debian.org>  Thu, 09 Aug 2007 17:18:26 -0700
 
 filters (2.39) unstable; urgency=low
 
 
 filters (2.39) unstable; urgency=low
 
index cbb40660db4636c793051a60fad62a082e71eac7..b6b39270014a849badb4464787672e8b9d585103 100644 (file)
@@ -105,7 +105,12 @@ The kenny filter is copyright (C) 2001,2002 by Christian Garbs
 <mitch@cgarbs.de>, Alan Eldridge <alane@geeksrus.net>, and is licensed
 under the Artistic license.
 
 <mitch@cgarbs.de>, Alan Eldridge <alane@geeksrus.net>, and is licensed
 under the Artistic license.
 
-Everything else is copyright 1999-2005 by Joey Hess, under the terms of GPL.
+The scottish fileter is copyright 2007 by Adam Borowski
+<kilobyte@angband.pl>, and is licensed under the GPL.
+
+Everything else is copyright 1999-2007 by Joey Hess, under the terms of
+GPL.
+
 On Debian systems, the full text of the GNU GPL can be found in
 /usr/share/common-licenses/GPL and the Artistic license in 
 /usr/share/common-licenses/Artistic
 On Debian systems, the full text of the GNU GPL can be found in
 /usr/share/common-licenses/GPL and the Artistic license in 
 /usr/share/common-licenses/Artistic
index bdba766ab28984c3ffecdab85799ff57d9c78381..9404c26267a115ed4c05e388f64822f5b6767fc2 100644 (file)
--- a/filters.6
+++ b/filters.6
@@ -1,6 +1,6 @@
 .TH FILTERS 6
 .SH NAME
 .TH FILTERS 6
 .SH NAME
-ken, b1ff, censor, chef, cockney, eleet, fudd, jethro, jibberish, jive, kenny, kraut, ky00te, nethack, newspeak, nyc, pirate, rasterman, spammer, studly, uniencode, upside\-down \- assorted text filters
+ken, b1ff, censor, chef, cockney, eleet, fudd, jethro, jibberish, jive, kenny, kraut, ky00te, nethack, newspeak, nyc, pirate, rasterman, scottish, spammer, studly, uniencode, upside\-down \- assorted text filters
 .SH SYNOPSIS
  $SHELL | chef
  
 .SH SYNOPSIS
  $SHELL | chef
  
@@ -55,6 +55,9 @@ Brooklyn English
 Talk like a pirate.
 .IP rasterman
 Makes text look like it came from the keyboard of Carsten Haitzler.
 Talk like a pirate.
 .IP rasterman
 Makes text look like it came from the keyboard of Carsten Haitzler.
+.IP scottish
+Fake scottish (dwarven) accent filter, inspired by the character "Durkon"
+from Order of the Stick.
 .IP spammer
 Turns honest text into something that is liable to be flagged as spam.
 .IP studly
 .IP spammer
 Turns honest text into something that is liable to be flagged as spam.
 .IP studly
@@ -76,5 +79,5 @@ cockney, jive, and nyc filters. jibberish is by Raul Miller
 Stephen K Mulrine <skm@eqsn.net>, newspeak is by Jamie Zawinski
 <jwz@jwz.org>, studly is by Nick Phillips <nwp@lemon\-computing.com>, 
 Gurkan Sengun <gurkan@linuks.mine.nu> wrote nethackify, Dougal Campbell
 Stephen K Mulrine <skm@eqsn.net>, newspeak is by Jamie Zawinski
 <jwz@jwz.org>, studly is by Nick Phillips <nwp@lemon\-computing.com>, 
 Gurkan Sengun <gurkan@linuks.mine.nu> wrote nethackify, Dougal Campbell
-<dougal@gunters.org> wrote pirate, kraut is by John Sparks, and Kenny is by
-Christian Garbs and Alan Eldridge.
+<dougal@gunters.org> wrote pirate, kraut is by John Sparks, scottish by
+Adam Borowski, and Kenny is by Christian Garbs and Alan Eldridge.
diff --git a/scottish b/scottish
new file mode 100755 (executable)
index 0000000..aff89a0
--- /dev/null
+++ b/scottish
@@ -0,0 +1,51 @@
+#!/usr/bin/perl -w
+# Fake scottish (dwarven) accent filter, by Adam Borowski, inspired by the
+# character "Durkon" from Order of the Stick by Rich Burlew.  GPL, 2007.
+use strict;
+
+my @repl=qw(
+  ^yes$:aye            there:thar              eir$:ar
+  about:aboot          ^he$:'e                 them:'em
+  ^him:'im             out_of$:outta           of_course:'course
+  ^of$:o'              ^and$:an'               to$:ta
+  tog:tag              that:tha                the:tha
+  wouldn't:wouldn'ta   cannot:cannae           can't:cannae
+  don't:dinnae         're$:r                  for$:fer
+  ver$:'er             ber$:b'r                every$:ev'ry
+  en$:'n               ^if$:if'n               enl:'nl
+  eng:'ng              ing:in'                 ment:mn't
+  ^es:'s               ^ex:'s                  ^not$:na
+  ^no$:nay             n't_have:n'tve          ^is$:be
+  ^are$:be             have:haf                abl:'bl
+  ^you$:ye             ^your:yer               ^you':ye'
+  noth:nuth            ^this$:'tis             ^here:'ere
+  doesn't:don't                at_a$:atta              ith$:it'
+  ered$:'red           into$:inta              ^before:'fore
+  wit'_':wit_'         wit'_t:wit_t            wit'_w:wit_w
+  wit'_y:wit_y         get_a:git_a             ally$:'lly$
+  ^my:me               ^i_think$:methinks      nay_w:na_w
+  ^one$:'un            ^'un_a:one_a            at_ta$:atta
+  ot_ta$:otta          ^isn't$:ain't           ^so_th:s'th
+  ned$:n'd             ^because:'cause
+), my @r;
+
+sub firstu($) {
+       $_[0]=~s/^([^a-z]*)([a-z])/$1\u$2/;
+       return $_[0];
+}
+
+for(@repl) {
+       s/_/ /g;
+       my ($l,$r)=split(/:/,$_);
+       for([$l,$r], [firstu $l, firstu $r], ["\U$l","\U$r"]) {
+               ($l,$r)=@$_;
+               $l=~s/^\^/\\b/;
+               $l=~s/\$$/\\b/;
+               push @r, [qr/$l/, $r];
+       }
+}
+
+while(my $txt=<>) {
+       $txt=~s/$$_[0]/$$_[1]/g for @r;
+       print $txt;
+}
This page took 0.018436 seconds and 4 git commands to generate.