rarepepe.py
· 551 B · Python
Raw
#!/usr/bin/env python
try:
from urllib import urlopen
except:
from urllib.request import urlopen
from colorama import init
init()
colormap = {
ord("0"): "\033[49m",
ord("2"): "\033[42m",
ord("6"): "\033[45m",
ord("7"): "\033[47m",
ord("8"): "\033[40m",
ord("f"): "\033[47m"
}
origpepe = urlopen("https://github.com/kylemsguy/memetest86/raw/master/rarepepe.h").readlines()[1:-1]
pepe = [line.decode('utf-8').strip().replace("0x", "").translate(colormap).split(",") for line in origpepe]
print("\033[49m\n".join(" ".join(line) for line in pepe))
| 1 | #!/usr/bin/env python |
| 2 | try: |
| 3 | from urllib import urlopen |
| 4 | except: |
| 5 | from urllib.request import urlopen |
| 6 | |
| 7 | from colorama import init |
| 8 | init() |
| 9 | |
| 10 | colormap = { |
| 11 | ord("0"): "\033[49m", |
| 12 | ord("2"): "\033[42m", |
| 13 | ord("6"): "\033[45m", |
| 14 | ord("7"): "\033[47m", |
| 15 | ord("8"): "\033[40m", |
| 16 | ord("f"): "\033[47m" |
| 17 | } |
| 18 | |
| 19 | origpepe = urlopen("https://github.com/kylemsguy/memetest86/raw/master/rarepepe.h").readlines()[1:-1] |
| 20 | pepe = [line.decode('utf-8').strip().replace("0x", "").translate(colormap).split(",") for line in origpepe] |
| 21 | |
| 22 | print("\033[49m\n".join(" ".join(line) for line in pepe)) |