LEX = flex
BUILD = jethro kraut cockney jive nyc ken ky00te newspeak
-OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd
+OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd censor spammer
CFLAGS = -O2
INSTALL_PROGRAM = install
This is a collection of filters to do all sorts of strange things to text.
-B1ff, the Swedish Chef, and an eleet filter are included.
+B1ff, the Swedish Chef, and an eleet filter are included, along with many,
+many more.
Since the original versions of some of these filters have copyright
problems, I have done a "clean room" re-implementation of the original lex
'ER' => 'UR',
'S+\b' => 'Z',
'KN' => 'N',
+ 'IE' => 'EI',
);
$_=uc;
--- /dev/null
+#!/usr/bin/perl
+# Censor filter.
+# Copyright 2002 by Joey Hess under the terms of the GNU GPL.
+
+# Yes, this program is self-modifying code, if you want it to be.
+if (exists $ENV{ADD_WORD}) {
+ open(IN, $0) || die "cannot read myself";
+ @lines=<IN>;
+ close IN;
+ open OUT, ">$0" || die "cannot write myself";
+ for (@lines) {
+ print OUT $_;
+ if (/^__DATA__\n$/) {
+ open(DATAOUT, "|sort|uniq|column >> $0");
+ $ENV{ADD_WORD} =~ y/n-za-m/a-z/;
+ print DATAOUT "$ENV{ADD_WORD}\n";
+ print DATAOUT join("\n",
+ map { chomp; split ' ', $_ } <DATA>);
+ close DATAOUT;
+ exit;
+ }
+ }
+}
+
+$censored = join("|", reverse sort { $a cmp $b }
+ grep { length $_ }
+ map { chomp; y/a-z/n-za-m/; split ' ', $_ } <DATA>);
+
+while (<>) {
+ s/\b($censored)ed/CENSORED/ig; # don't say "CENSOREDed"
+ s/\b($censored)/CENSORED/ig;
+ print $_;
+}
+
+__DATA__
+ahqr enaql grng pbzrvat t\f+fcbg
+anxrq encr guebng pbzvat tebva
+avccyr erne gvg pebgpu ubbgre
+bcravat fangpu gvggl penc ubeal
+beny fchax gvggvr penpx ubyr
+betl fcrez hgrehf pernz uhzc
+betnfz fcuvapgre ihyin phag unaqwbo
+certanag fghq intvan phz urnq
+cevpx fgnss ivetva phzzvat wvfz
+chff fhpx ivoengbe pnzr xabo
+chffl fjnyybj jbzo preivk xvff
+chffvrf fperj jrg pureel ybir
+chovp frk juber pyvg ybire
+chqraqhz frkhny kkk pyvgbehf ybirq
+chzc frrq nany pyvggl ybnq
+cnagvrf frzra nerbyn pyvznk ynovn
+crargengr funsg nff qevyyrq ynvq
+crargengrq funt nffubyr qrsybjre yrfovna
+cravf funttvat obbo qvpx yvcf
+crgre fuvg oernfg qvyqb znfgheong
+crpxre fyhg ohgg rebgvp znfgheongr
+cunyyhf fyhggvfu ohggbpx rerpgvba znfgheongvat
+cvff fyvg onyy rkcbfrq znzznel
+ebfrohq gbathr ovgpu shpx znzznevrf
+ebq gbby oybj snpvny
+ehg gjng pbpx t-fcbg
-* censor filter (should be easy)
* continue to make the chef filter more similar to the old one
* write and collect more filters
+* does anyone have an asci-art cow font?
+filters (2.27) unstable; urgency=low
+
+ * Added a censor filter.
+ * Added a spammer filter which generates spamassassin-triggering
+ pseudo-spam from input.
+ * Updated eleet filter (which should perhaps be renamed to just 'leet')
+ to the <ahem> standards of irc circa mid 2002.
+ * Make jibberish filter only run text through 3 to 8 of the other filters.
+ * Various improvements.
+
+ -- Joey Hess <joeyh@debian.org> Sun, 3 Nov 2002 16:37:12 -0500
+
filters (2.26) unstable; urgency=low
* Don't use dh_installmanpages.
Priority: optional
Build-Depends: debhelper (>= 4), flex, bison | byacc | btyacc, dpkg-dev (>= 1.9.0)
Maintainer: Joey Hess <joeyh@debian.org>
-Standards-Version: 3.5.6.1
+Standards-Version: 3.5.7.0
Package: filters
Architecture: any
This is a Debian prepackaged version of the filters package.
This package was put together and debianized by Joey Hess
-<joeyh@debian.org>, using sources from
- http://qz.to/~eli/src.html and
- ftp://ftp.funet.fi/pub/misc/old-hsu-archive/unsorted/2/kraut.shar.gz
+<joeyh@debian.org>, using sources from all over.
The jethro filter has this copyright:
** Public domain. Use at your own risk. Y'all come back now, heah?
# just for reference, you may do whatever you like with this file.
-Everything else is copyright 1999-2001 by Joey Hess, under the terms of GPL.
+Everything else is copyright 1999-2002 by Joey Hess, under the terms of GPL.
The full text of the GNU GPL can be found in /usr/share/common-licenses/GPL
on Debian systems.
#!/usr/bin/perl -p
-# Eleet filter, Copyright 1999 by Joey Hess under the terms of the GNU GPL.
+# Eleet filter, Copyright 1999,2002 by Joey Hess under the terms of the GNU GPL.
BEGIN {
- $transstring="4bcd3fgh1jklmn0pqr5+uvwxyz";
- $t="tr/a-zA-Z/$transstring".uc($transstring)."/";
+ # abcdefghijklmnopqrstuvwxyz
+ $transstring="4bcd3fgh1jklmn0pqr5tuvwxyz";
+ $t="tr/a-zA-Z/$transstring$transstring/";
}
+s/porn/pr0n/g;
+s/elite/l33t/g;
eval $t;
-s:h:|-|:ig;
-s:l:|_:ig;
-s:m:/\\/\\:ig;
-s:n:/\\/:ig;
-s:v:\\/:ig;
-s:x:><:ig;
+
+# These are not in common usage anymore.
+#s:h:|-|:ig;
+#s:l:|_:ig;
+#s:m:/\\/\\:ig;
+#s:n:/\\/:ig;
+#s:w:\\/\\/:ig;
+#s:v:\\/:ig;
+#s:x:><:ig;
.TH FILTERS 6
.SH NAME
-ken, b1ff, chef, cockney, eleet, fudd, jethro, jibberish, jive, kraut, ky00te, newspeak, nyc, rasterman, studly, upside-down \- assorted text filters
+ken, b1ff, censor, chef, cockney, eleet, fudd, jethro, jibberish, jive, kraut, ky00te, newspeak, nyc, rasterman, spammer, studly, upside-down \- assorted text filters
.SH SYNOPSIS
$SHELL | chef
+
+ newspeak < thesis.tex > newthesis.tex
+
+ eleet | wall # b1ff works well too
+
+ b1ff | bitchx | censor
.SH "DESCRIPTION"
All of these programs are filters to do all sorts of strange things to text.
No racial or societal slurs are intended. For amusement only.
.IP jive
Jive English
.IP jibberish
-Runs text through all the rest of the filters, to make really weird output.
+Runs text through a random selection of the rest of the filters, to make really
+weird output.
.IP ken
English into Cockney, featuring (dubious) rhyming
slang for a lot of computer terminology.
fans) accent on any text file.
.IP newspeak
A-la-1984
+.IP censor
+CDA-ize text
.IP nyc
Brooklyn English
.IP rasterman
Makes text look like it came from the keyboard of Carsten Haitzler.
+.IP spammer
+Turns honest text into something that is liable to be flagged as spam.
.IP studly
Studly caps.
.IP upside-down
.SH "SEE ALSO"
.IP /usr/share/doc/filters/SAMPLES
Lists samples of the output of all the filters.
-.SH AUTHOR
-The eleet, upside-down, chef, and b1ff filters were written by Joey
-Hess <joey@kitenet.net>. Daniel V Klein <dvk@lonewolf.com> wrote the
+.SH AUTHORS
+The eleet, upside-down, chef, b1ff, and censor filters were written by
+Joey Hess <joey@kitenet.net>. Daniel V Klein <dvk@lonewolf.com> wrote the
cockney, jive, and nyc filters. jibberish is by Raul Miller
<rdm@test.legislate.com>, jethro is by Duane Paulson
<ci922@cleveland.freenet.edu>, rasterman is by Zachary Beane, ken is by
#!/usr/bin/perl
-# jibberish -- run all filters in random order
+# jibberish -- run filters in random order
$ENV{PATH}.=":/usr/games";
rasterman
newspeak
studly
+censor
+spammer
);
# shuffle order
}
# start the pipe...
-my $pipe= join '|', @all;
+my $pipe= join '|', @all[0..3 + rand(5)];
open FILTER, "$pipe|"
- or die ""Never mind...\n";;
+ or die "Never mind...\n";
# display the results
while (<FILTER>) {
# (($c + $offset) % 4) == 2 and print (ord($c) ^ 32) or print($c);
(($c + $offset) % 4) != 2 and print($c) or $c =~ tr/[A-Za-z]/[a-zA-Z]/, print $c;
}
-