X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/e942a1622bddf3338096393c3906c1adc871d198..c679d9010451b986bae719a6abe0458af2b2dfb9:/filters/email-gravatar.py diff --git a/filters/email-gravatar.py b/filters/email-gravatar.py index 4445615..d70440e 100755 --- a/filters/email-gravatar.py +++ b/filters/email-gravatar.py @@ -20,6 +20,7 @@ import sys import hashlib +import codecs email = sys.argv[1].lower().strip() if email[0] == '<': @@ -27,7 +28,12 @@ if email[0] == '<': if email[-1] == '>': email = email[0:-1] +page = sys.argv[2] + +sys.stdin = codecs.getreader("utf-8")(sys.stdin.detach()) +sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) + md5 = hashlib.md5(email.encode()).hexdigest() text = sys.stdin.read().strip() -print(" " + text) +print("Gravatar " + text)