From: joey Date: Fri, 26 Aug 2005 03:13:45 +0000 (+0000) Subject: releasing version 2.35 X-Git-Tag: 2.39~8 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=5b25ff5fd3b9b003388d17dc15434d92b287a647;p=filters.git releasing version 2.35 --- diff --git a/Makefile b/Makefile index a8aa65a..4742a5a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ LEX = flex -BUILD = jethro kraut cockney jive nyc ken ky00te newspeak +BUILD = jethro kraut cockney jive nyc ken ky00te newspeak nethackify OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd censor spammer uniencode CFLAGS = -O2 -lfl INSTALL_PROGRAM = install @@ -33,6 +33,7 @@ clean: $(RM) -f core *.o *~ $(BUILD) *.c SAMPLES cd ky00te.dir && make clean rm -f kraut.dir/lex.yy.c + cd nethackify.dir && make clean .SUFFIXES: .l @@ -53,3 +54,6 @@ ky00te: kraut: cd kraut.dir && lex kraut.l cd kraut.dir && cc kraut.c lex.yy.c -o ../kraut + +nethackify: + cd nethackify.dir && make diff --git a/README b/README index 1857f62..9fc0355 100644 --- a/README +++ b/README @@ -2,6 +2,8 @@ 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, along with many, many more. +http://kitenet.net/programs/filters + Since the original versions of some of these filters have copyright problems, I have done a "clean room" re-implementation of the original lex filters in perl. I did this without looking at the original code to the diff --git a/debian/changelog b/debian/changelog index 633539c..778f8ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +filters (2.35) unstable; urgency=low + + * Add nethackify filter. Closes: #317656 + * Add automatic webpage update gunk. + + -- Joey Hess Thu, 25 Aug 2005 22:24:29 -0400 + filters (2.34) unstable; urgency=low * Add uniencode filter. Because υɳіϲоⅾе is fun. diff --git a/debian/control b/debian/control index 6455122..ab15d06 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: games Priority: optional Build-Depends: debhelper (>= 4), flex, bison | byacc | btyacc, dpkg-dev (>= 1.9.0) Maintainer: Joey Hess -Standards-Version: 3.5.9.0 +Standards-Version: 3.6.2 Package: filters Architecture: any diff --git a/debian/copyright b/debian/copyright index 2bd742d..762b40b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -95,6 +95,9 @@ has the following license statement: # just for reference, you may do whatever you like with this file. +The nethackify filter is copyright 2004 by G�kan Seng� + and is released under the gpl. + Everything else is copyright 1999-2005 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. diff --git a/debian/rules b/debian/rules index 4b26afe..2260c61 100755 --- a/debian/rules +++ b/debian/rules @@ -33,5 +33,17 @@ binary-arch: build dh_md5sums dh_builddeb +VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)') + +# Update the web page. Not intended for use by anyone except the +# author. +DIR=/home/web/kitenet.net/programs/filters +installhook: + cp debian/changelog $(DIR)/CHANGES + cp TODO $(DIR)/TODO + echo -n $(VERSION) > $(DIR)/LATEST-VERSION-IS + rm -f $(DIR)/*.tar.gz + ln -s /home/joey/lib/debian/unstable/filters_$(VERSION).tar.gz $(DIR)/filters-$(VERSION).tar.gz + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary diff --git a/filters.6 b/filters.6 index 05c56ed..cbba0f4 100644 --- a/filters.6 +++ b/filters.6 @@ -40,6 +40,8 @@ Generates text with a bad German accent. .IP ky00te This program places a very cute (and familiar to FurryMuck fans) accent on any text file. +.IP nethackify +Wiped out text like can be found in nethack. .IP newspeak A-la-1984 .IP censor diff --git a/jibberish b/jibberish old mode 100644 new mode 100755 diff --git a/nethackify.dir/makefile b/nethackify.dir/makefile new file mode 100644 index 0000000..8c2fd9e --- /dev/null +++ b/nethackify.dir/makefile @@ -0,0 +1,16 @@ +../nethackify: + gcc nethackify.c -o ../nethackify + +test: + @../nethackify The kitten bites.--More-- + @../nethackify You begin praying to Odin. You finish your prayer.--More-- + @../nethackify A black glow surrounds you. + +clean: + rm -f ../nethackify + +install: + cp ../nethackify /usr/bin + +uninstall: + rm /usr/bin/nethackify diff --git a/nethackify.dir/nethackify.c b/nethackify.dir/nethackify.c new file mode 100644 index 0000000..1f6cb6c --- /dev/null +++ b/nethackify.dir/nethackify.c @@ -0,0 +1,87 @@ + +/* +nethackify +tries to write text ala nethack + +cat /etc/motd/ | nethackify +/exec -o nethackify "good morning :)" + +gurkan@linuks.mine.nu +*/ + +#include +#include +#include +#include + +char *normal ="ABCDEFGHIKLMNOPQRTUVWZbdeghjklmnoqwy:;01678"; +char *nethack1="^P(|||C||||||CFCP|J/V/|cccni||nrccvv.,C|o/3"; +char *nethack2="?b?)F-(-?<_??(?(F???/??|??????r???????(???o"; +char *nethack3=" [ [L \\ "; +char *nethack4=" [ \\ "; +char *nethack5=" _ \\ "; + +int myrandom(float max) +{ + return ((int)(max*rand()/(RAND_MAX+1.0))); +} + +void nethackify(char* str) +{ + int i,c; + for(i=0; i0) { + switch(myrandom(5)) { + case 4: if(nethack5[c]!=' ') str[i]=nethack5[c]; + case 3: if(nethack4[c]!=' ') str[i]=nethack4[c]; + case 2: if(nethack3[c]!=' ') str[i]=nethack3[c]; break; + case 1: if(nethack2[c]!=' ') str[i]=nethack2[c]; break; + case 0: str[i]=nethack1[c]; break; + default: break; + } + } + } + } + printf("%c",str[i]); + } + + printf(" "); +} + +int main(int argc, char **argv) +{ + int i,c; + struct timeval tv; + FILE *f; + char ch[1]; + + srand((gettimeofday(&tv,NULL),tv.tv_usec)); + if (argc==1) { + f=stdin; + while(fread(ch,1,1,f)) { + for(c=0; c