Skip to content

Instantly share code, notes, and snippets.

@justinwoo
Created December 26, 2012 05:12
Show Gist options
  • Save justinwoo/4378070 to your computer and use it in GitHub Desktop.
Save justinwoo/4378070 to your computer and use it in GitHub Desktop.
this script will [le]terally give you brain cancer. This script takes what you have in your clipboard and "le transforms" it into moron-speak. e.g. the quick little brown fox jumps over the lazy dog -> le quick [le]ttle brown fox jumps ov[l]er le lazy dog. Use wisely and not in the presence of children.
#aka brain cancer
import win32clipboard as clippy
def main():
#gotta do this for clip board stuff
clippy.OpenClipboard()
cliptext = clippy.GetClipboardData()
outtext = ''
ctr = 1
for word in cliptext.split('e'):
#replace 'el' with 'le', 'li' with '[le]''
word = word.replace('el','le')
word = word.replace('li','[le]')
#replace 'e' with '[l]e' but 'th' with 'le'
if ctr != len(cliptext.split('e')):
if word[-1] == 'h' and word[-2] == 't':
word = word[:-2] + 'l'
elif word[-1] != 'l':
word = word + '[l]'
outtext += word + 'e'
ctr += 1
outtext = outtext[:-1]
#set the clipboard
clippy.EmptyClipboard()
clippy.SetClipboardText(outtext)
clippy.CloseClipboard()
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment