Also close bug
[filters.git] / LOLCAT
1 #!/usr/bin/perl -p
2 # lolcatz filtur
3 # Copyright 2013 by Joey Hess under the terms of the GNU GPL.
4
5 # an array, not a hash. because order is important
6 @trans_table=(
7 'can i' => 'i can',
8 '\bi\'ve' => 'i',
9 '\ba\s+' => '', # nuke 'a'
10 'cheese' => 'cheez',
11 '\brock\b' => 'rawk',
12 'ese\b' => 'ees',
13 's\'s\b' => 's',
14 '\'s\b' => 's',
15 'er\b' => 'r',
16 'ture\b' => 'chur',
17 'day' => 'dai',
18 '\bok\b' => 'k',
19 '\boks\b' => 'ks',
20 'boy' => 'boi',
21 'tion' => 'shun',
22 'ight' => 'ite',
23 'innocent' => 'innozent',
24 'ph' => 'f',
25 'es' => 'ez',
26 'ed\b' => 'd',
27 'ns' => 'nz',
28 'ks' => 'kz',
29 'ds' => 'dz',
30 'se' => 'ze',
31 'zs' => 's',
32 'sz' => 'z',
33 'ss' => 's',
34 'cc' => 'cs',
35 'ck' => 'k',
36 'oa' => 'o',
37 '\bcat' => 'kat',
38 'ive\b' => 'iv',
39 'ake' => 'aek',
40 'ed\b' => 'd',
41 'ing\b' => 'in',
42 'sion' => 'shun',
43 '\bam\b' => 'iz',
44 '\bhave\b' => 'has',
45 '\bwho' => 'hoo',
46 '\bwake\b' => 'waek',
47 '\bone\b' => '1',
48 '\btwo\b' => '2',
49 '\bto\b' => '2',
50 '\btoo\b' => '2',
51 '\bthree\b' => '3',
52 '\bfour\b' => '4',
53 '\bfor\b' => '4',
54 '\bfore\b' => '4',
55 '\bfive\b' => '5',
56 '\bsix\b' => '6',
57 '\bseven\b' => '7',
58 '\beight\b' => '8',
59 '\bnine\b' => '9',
60 '\bten\b' => '10',
61 'god' => 'ceilin cat',
62 'jezus' => 'jebus',
63 'kitty' => 'kitteh',
64 'saturdai' => 'katurdai',
65 'allah' => 'invisible man',
66 'delicious' => 'delishus',
67 '\bdoctor\b' => 'docta',
68 '\bdr\b' => 'docta',
69 '\bgay\b' => 'ghey',
70 '\bgood\b' => 'gud',
71 '\bever' => 'evr',
72 '\bpage\b' => 'paeg',
73 'cheezburgr' => 'cheezburger', # fix up to canonical form
74 );
75
76 y/A-Z/a-z/;
77
78 while (@trans_table) {
79 $key=shift @trans_table;
80 $value=shift @trans_table;
81 s/$key/$value/g;
82 }
83
84 s/es/ez/g;
85
86 y/a-z/A-Z/;
This page took 0.026699 seconds and 4 git commands to generate.