Added emoji gen and toot scripts
This commit is contained in:
parent
80f186955b
commit
629abbaf27
29
emgen.py
Executable file
29
emgen.py
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import random
|
||||
import sys
|
||||
|
||||
#Set this to your instance's supported letter sets
|
||||
prefix = ["8b", "archer", "hacker", "jhg", "lazer", "sans_l", "sans_u", "smb", "sm64", "tp", "wide" ]
|
||||
|
||||
input = ""
|
||||
|
||||
for t in sys.argv[1:]:
|
||||
input += str(t + " ")
|
||||
|
||||
output = ""
|
||||
|
||||
for letter in input:
|
||||
rando = random.choice(prefix)
|
||||
if letter == " ":
|
||||
output += u" :blank: \u200b"
|
||||
elif not letter.isalpha():
|
||||
output += letter+"\u200b"
|
||||
elif rando == "lazer":
|
||||
output += ":"+rando+"_"+letter.upper()+u":\u200b"
|
||||
elif letter in ("\'", "\"", "?", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"):
|
||||
output += ":sm64_"+letter+u":\u200b"
|
||||
else:
|
||||
output += ":"+rando+"_"+letter.lower()+u":\u200b"
|
||||
|
||||
print(output)
|
36
emtoot.py
Executable file
36
emtoot.py
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
#Be sure to do 'pip3 install Mastodon.py' first
|
||||
from mastodon import Mastodon
|
||||
import random
|
||||
import sys
|
||||
|
||||
# Create actual API instance
|
||||
mastodon = Mastodon(
|
||||
access_token='insert access token here',
|
||||
api_base_url='https://mastodon.barkshark.tk'
|
||||
)
|
||||
|
||||
#Set this to your instance's supported letter sets
|
||||
prefix = ["8b", "archer", "hacker", "jhg", "lazer", "sans_l", "sans_u", "smb", "sm64", "tp", "wide" ]
|
||||
|
||||
input = ""
|
||||
|
||||
for t in sys.argv[1:]:
|
||||
input += str(t + " ")
|
||||
|
||||
output = ""
|
||||
|
||||
for letter in input :
|
||||
rando = random.choice(prefix)
|
||||
if letter == " ":
|
||||
output += u" :blank: \u200b"
|
||||
elif not letter.isalpha():
|
||||
output += letter
|
||||
elif rando == "lazer":
|
||||
output += ":"+rando+"_"+letter.upper()+u":\u200b"
|
||||
else:
|
||||
output += ":"+rando+"_"+letter.lower()+u":\u200b"
|
||||
#print(output)
|
||||
|
||||
mastodon.status_post(status=output, in_reply_to_id=None, media_ids=None, sensitive=False, visibility="public", spoiler_text="emoji spam uvu", language=None, idempotency_key=None)
|
Loading…
Reference in a new issue