releasing version 2.35
authorjoey <joey@a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Fri, 26 Aug 2005 03:13:45 +0000 (03:13 +0000)
committerjoey <joey@a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Fri, 26 Aug 2005 03:13:45 +0000 (03:13 +0000)
Makefile
README
debian/changelog
debian/control
debian/copyright
debian/rules
filters.6
jibberish [changed mode: 0644->0755]
nethackify.dir/makefile [new file with mode: 0644]
nethackify.dir/nethackify.c [new file with mode: 0644]
nethackify.dir/readme [new file with mode: 0644]

index a8aa65a8b0eb5d8abcb410bb9ca3384dce1d0dcd..4742a5a74d6661d46c13040dda5d973f575ece76 100644 (file)
--- 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 1857f62ed72f57edc99a0601bf9032da9f52a95e..9fc0355947ac6f68f164e156cf05596527403c28 100644 (file)
--- 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
index 633539c18d020e658e966cd32e9b541266c8b6a4..778f8ab5335be7ce6a4ca48d10c89ce7a981adcf 100644 (file)
@@ -1,3 +1,10 @@
+filters (2.35) unstable; urgency=low
+
+  * Add nethackify filter. Closes: #317656
+  * Add automatic webpage update gunk.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 25 Aug 2005 22:24:29 -0400
+
 filters (2.34) unstable; urgency=low
 
   * Add uniencode filter. Because υɳіϲоⅾе is fun.
index 64551229a9a0f9294e361c59038df6829e8287da..ab15d0633f0b421f58dcb1e0e01a66b13f1a059b 100644 (file)
@@ -3,7 +3,7 @@ Section: games
 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.9.0
+Standards-Version: 3.6.2
 
 Package: filters
 Architecture: any
index 2bd742d67798200b6684471dc03503155ff145a6..762b40bc254850d0caa3e3430e25eee7249b6781 100644 (file)
@@ -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�
+<gurkan@linuks.mine.nu> 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.
index 4b26afea833bdd8e0b664f571606b8a8b4552ad3..2260c614e0555740691969b4fbe90712f808645e 100755 (executable)
@@ -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
index 05c56ed5520f11edf72822727887a1aca2f6bc8c..cbba0f4af40d4a7f23d8aefd7063303688851b2a 100644 (file)
--- 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
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/nethackify.dir/makefile b/nethackify.dir/makefile
new file mode 100644 (file)
index 0000000..8c2fd9e
--- /dev/null
@@ -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 (file)
index 0000000..1f6cb6c
--- /dev/null
@@ -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 <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/time.h>
+
+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; i<strlen(str); i++) {
+       for(c=0; c<strlen(normal); c++) {
+           if(normal[c]==str[i]) {
+               if (myrandom(3)>0) {
+               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<strlen(normal); c++) {
+               if(normal[c]==ch[0]) {
+                   switch(myrandom(5)) {
+                       case 4: if(nethack5[c]!=' ') ch[0]=nethack5[c];
+                       case 3: if(nethack4[c]!=' ') ch[0]=nethack4[c];
+                       case 2: if(nethack3[c]!=' ') ch[0]=nethack3[c]; break;
+                       case 1: if(nethack2[c]!=' ') ch[0]=nethack2[c]; break;
+                       case 0: ch[0]=nethack1[c]; break;
+                       default: break;
+                   }
+               }
+           }
+           printf("%c",ch[0]);
+       }
+       fclose(f);
+    } else {
+       for(i=1; i<argc; i++) {
+           nethackify(argv[i]);
+       }
+       printf("\n");
+    }
+    
+    return 0;
+}
diff --git a/nethackify.dir/readme b/nethackify.dir/readme
new file mode 100644 (file)
index 0000000..470d3da
--- /dev/null
@@ -0,0 +1,9 @@
+
+nethackify
+tries to write text ala nethack
+
+cat /etc/motd/ | nhprint
+/exec -o nhprint "good morning :)"
+
+released under the gpl
+copyright 2004 by Gürkan Sengün <gurkan@linuks.mine.nu>
This page took 0.019456 seconds and 4 git commands to generate.