Last active
July 26, 2017 20:06
-
-
Save paradox460/92b3e3b598b8a66e507410cfc01b518b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
Encoding.default_external = Encoding::UTF_8 | |
Encoding.default_internal = Encoding::UTF_8 | |
sound_transforms = { | |
/fuck/i => ('fu' + 'g' * rand(1..5)), | |
/epic/i => 'ebin', | |
/C(?=(?i:[AOULR]))|K/ => 'G', | |
/C(?=(?i:[EIY]))|(?<=\b)S/ => 'Z', | |
/c(?=(?i:[aoulr]))|k/ => 'g', | |
/c(?=(?i:[eiy]))|(?<=\b)s/ => 'z', | |
/(?<=\b)th?/ => 'd', | |
/(?<=\b)Th?/i => 'D' | |
} | |
original = ARGF.read | |
sound_transforms.each do |regex, replace| | |
original.gsub!(regex, replace) | |
end | |
original.tr!('PVWpvw', 'BBVbbv') | |
print original | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment