Tw

Convert stdin to a unicode typewriter font

#!/usr/bin/python3
import sys
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
type_chars = "π™°π™±π™²π™³π™΄π™΅π™Άπ™·π™Έπ™Ήπ™Ίπ™»π™Όπ™½π™Ύπ™Ώπš€πšπš‚πšƒπš„πš…πš†πš‡πšˆπš‰πšŠπš‹πšŒπšπšŽπšπšπš‘πš’πš“πš”πš•πš–πš—πš˜πš™πššπš›πšœπšπšžπšŸπš πš‘πš’πš£πŸΆπŸ·πŸΈπŸΉπŸΊπŸ»πŸΌπŸ½πŸΎπŸΏ"
def bold(text):
    return ''.join(
        type_chars[chars.index(c)] if c in chars else c
        for c in text
    )
for line in sys.stdin:
    print(bold(line), end='')

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply