Compare commits
2 commits
9ba477751c
...
1c38aa94e8
Author | SHA1 | Date | |
---|---|---|---|
1c38aa94e8 | |||
491a8a51b3 |
3 changed files with 45 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"bot_name": "My cool fedi bot",
|
"bot_name": "leftbot",
|
||||||
"source_url": "https://github.com/Lynnesbian/fediverse-bot-template",
|
"source_url": "https://git.lynnesbian.space/lynnesbian/leftbot",
|
||||||
"admin": "you@your.instance"
|
"admin": "lynnesbian@fedi.lynnesbian.space"
|
||||||
}
|
}
|
||||||
|
|
37
post.py
37
post.py
|
@ -16,11 +16,11 @@
|
||||||
from mastodon import Mastodon
|
from mastodon import Mastodon
|
||||||
import json, random
|
import json, random
|
||||||
|
|
||||||
# try:
|
try:
|
||||||
# cfg = json.load(open('config.json', 'r'))
|
cfg = json.load(open('config.json', 'r'))
|
||||||
# except:
|
except:
|
||||||
# print("Couldn't load config.json. Make sure you run login.py first!\n-----")
|
print("Couldn't load config.json. Make sure you run login.py first!\n-----")
|
||||||
# raise
|
raise
|
||||||
meta = json.load(open('meta.json', 'r'))
|
meta = json.load(open('meta.json', 'r'))
|
||||||
takes = json.load(open('takes.json'))
|
takes = json.load(open('takes.json'))
|
||||||
|
|
||||||
|
@ -34,15 +34,24 @@ take = random.choice(takes['templates']).format(
|
||||||
ideolog = random.choice([i[:-1] + "t" for i in takes['ideologies'] if i.endswith("ism")])
|
ideolog = random.choice([i[:-1] + "t" for i in takes['ideologies'] if i.endswith("ism")])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cw = random.choice(takes['content warnings']).format(
|
||||||
|
ideology = random.choice(takes['ideologies']),
|
||||||
|
ideology2 = random.choice(takes['ideologies']),
|
||||||
|
thing = random.choice(takes['things']),
|
||||||
|
thing2 = random.choice(takes['things']),
|
||||||
|
thing3 = random.choice(takes['things']),
|
||||||
|
site = random.choice(takes['sites']),
|
||||||
|
ideolog = random.choice([i[:-1] + "t" for i in takes['ideologies'] if i.endswith("ism")])
|
||||||
|
)
|
||||||
|
|
||||||
print(take)
|
print(take)
|
||||||
|
|
||||||
# # log in
|
# log in
|
||||||
# client = Mastodon(
|
client = Mastodon(
|
||||||
# client_id=cfg['client']['id'],
|
client_id=cfg['client']['id'],
|
||||||
# client_secret=cfg['client']['secret'],
|
client_secret=cfg['client']['secret'],
|
||||||
# access_token=cfg['secret'],
|
access_token=cfg['secret'],
|
||||||
# api_base_url=cfg['site'])
|
api_base_url=cfg['site'])
|
||||||
|
|
||||||
# # make a post!
|
# make a post!
|
||||||
# # if you delete this line, you can also remove the random module from the imports list.
|
client.status_post(take, spoiler_text = cw)
|
||||||
# client.status_post("Hi! Your random number is: {}".format(random.randint(0,10000)))
|
|
||||||
|
|
20
takes.json
20
takes.json
|
@ -124,6 +124,24 @@
|
||||||
"if {ideology} was a pokemon it would be weak to {thing}",
|
"if {ideology} was a pokemon it would be weak to {thing}",
|
||||||
"broke: solving {thing} with {ideology}\nwoke: realising {ideology} creates {thing}\nbespoke: solving {ideology} with {ideology2}",
|
"broke: solving {thing} with {ideology}\nwoke: realising {ideology} creates {thing}\nbespoke: solving {ideology} with {ideology2}",
|
||||||
"love too log on to {site} dot com and see {ideolog}s defending {thing}",
|
"love too log on to {site} dot com and see {ideolog}s defending {thing}",
|
||||||
"{ideology}: {thing} is an unsolvable problem\n{ideolog}s, who have had {thing} sorted for years: sure thing buddy"
|
"{ideology}: {thing} is an unsolvable problem\n{ideolog}s, who have had {thing} sorted for years: sure thing buddy",
|
||||||
|
"fred from scooby doo pulling the mask off of {ideology} to reveal {ideology2}",
|
||||||
|
"{ideology} is a fun game where you get rid of {thing} to create {thing2}",
|
||||||
|
"{ideology}, or as it's known in japan, super {thing} 64",
|
||||||
|
"my level 23 {ideolog} bard just gained a rank in {thing}",
|
||||||
|
"it's all fun and games until the {ideolog} starts talking about {thing}",
|
||||||
|
"my friends, sobbing: you can't just call everything {ideology}\nme, pointing at {thing}: {ideology}"
|
||||||
|
],
|
||||||
|
"content warnings": [
|
||||||
|
"subtooting an entire ideology",
|
||||||
|
"ranting about {ideology} again",
|
||||||
|
"{ideolog} hot take",
|
||||||
|
"subtoot, politics",
|
||||||
|
"politics, probably gonna delete this",
|
||||||
|
"{ideolog} memeing",
|
||||||
|
"pol, -",
|
||||||
|
"politics",
|
||||||
|
"let's get political",
|
||||||
|
"{thing} and {ideology}"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue