First import
git-svn-id: http://photonzero.com/dotfiles/trunk@1 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
commit
83d40113d2
60 changed files with 4264 additions and 0 deletions
73
bin/unborkify
Executable file
73
bin/unborkify
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
#!/usr/local/bin/perl
|
||||
|
||||
use Getopt::Std;
|
||||
getopts('u');
|
||||
|
||||
$user = (getpwuid($<))[0];
|
||||
|
||||
%maps = (
|
||||
'a' => "\340\341\342\343\344\345",
|
||||
'c' => "\242\347",
|
||||
'd' => "\360",
|
||||
'e' => "\350\351\352\353",
|
||||
'i' => "\354\355\356\357",
|
||||
'n' => "\361",
|
||||
'o' => "\272\362\363\364\365\366\370",
|
||||
'p' => "\376",
|
||||
'q' => "\266",
|
||||
'u' => "\265\371\372\373\374",
|
||||
'x' => "\244\327",
|
||||
'y' => "\375",
|
||||
'A' => "\300\301\302\303\304\305",
|
||||
'B' => "\337",
|
||||
'C' => "\307\251",
|
||||
'D' => "\320",
|
||||
'E' => "\310\311\312\313",
|
||||
'I' => "\314\315\316\317",
|
||||
'L' => "\243",
|
||||
'N' => "\321",
|
||||
'O' => "\322\323\324\325\326",
|
||||
'P' => "\336",
|
||||
'R' => "\256",
|
||||
'U' => "\331\332\333\334",
|
||||
'Y' => "\245\335",
|
||||
'!' => "\241",
|
||||
'>' => "\273",
|
||||
'<' => "\253",
|
||||
'"' => "\250",
|
||||
'+' => "\367",
|
||||
'|' => "\246",
|
||||
',' => "\270",
|
||||
'?' => "\277",
|
||||
'0' => "\330",
|
||||
'2' => "\262",
|
||||
'3' => "\263"
|
||||
);
|
||||
|
||||
$| = 1;
|
||||
|
||||
while (<>) {
|
||||
CHAR: for $i (0..(length($_) - 1)) {
|
||||
$c = substr($_,$i,1);
|
||||
|
||||
# if ($c eq 'A' && substr($_,$i+1,1) eq 'E') {
|
||||
# print "\306";
|
||||
# $skip = 1; next;
|
||||
# } elsif ($c eq 'a' && substr($_,$i+1,1) eq 'e') {
|
||||
# print "\346";
|
||||
# $skip = 1; next;
|
||||
# } else {
|
||||
# print((defined $maps{$c}) ?
|
||||
# substr($maps{$c}, int rand(length($maps{$c})), 1) : $c);
|
||||
# }
|
||||
|
||||
for $x (keys %maps) {
|
||||
if ($maps{$x} =~ /\Q$c/) {
|
||||
print $x;
|
||||
next CHAR;
|
||||
}
|
||||
}
|
||||
|
||||
print $c;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue