Skip to content

Instantly share code, notes, and snippets.

@windytan
Created February 5, 2017 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save windytan/d95dfe334cc9658a3837943d420689f6 to your computer and use it in GitHub Desktop.
Save windytan/d95dfe334cc9658a3837943d420689f6 to your computer and use it in GitHub Desktop.
if (/^\.ninja (.+)/) {
$irivi = lc($1);
$irivi =~ tr/ÅÄÖ/åäö/;
$irivi =~ tr/åäöéèü/aaoeeu/;
$irivi =~ s/[^a-z\- ]//g;
$irivi =~ s/\s+$//;
$irivi =~ s/\s\s/ /g;
%ninjanames = qw( a KA b ZU c MI d TE e KU f LU g JI h RI i KI j ZU
k ME l TA m RIN n TO o MO p NO q KE r SHI s ARI
t CHI u DO v RU w MEI x NA y FU z ZI );
for (keys %ninjanames) {
$irivi =~ s/$_/$ninjanames{$_}/g;
}
$irivi .= "!";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment