Guest User

Hackertext

a guest
Dec 4th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. #!/usr/bin/python3
  2. # Hackertext
  3. # Prints the sequence to display the given text as hackertext
  4. # License: MIT License
  5.  
  6. import argparse
  7.  
  8. options_parser = argparse.ArgumentParser(description="Print given text as a hackertext emote string.")
  9. options_parser.add_argument("words", nargs="*")
  10. args = options_parser.parse_args()
  11.  
  12. out = ""
  13. for word in args.words:
  14.     for c in str(word):
  15.         if c.lower() in 'abcdefghijklmnopqrstuvwxyz':
  16.             out += ":hacker_" + c.lower() + ": "
  17.         else:
  18.             out += " "
  19.  
  20.     out += " "
  21.  
  22. print(out)
Add Comment
Please, Sign In to add comment