more opinions, basic template filling

This commit is contained in:
Lynne Megido 2019-09-20 17:57:14 +10:00
parent eca6f75c57
commit c43e721ba6
2 changed files with 67 additions and 18 deletions

40
post.py
View File

@ -16,21 +16,33 @@
from mastodon import Mastodon
import json, random
try:
cfg = json.load(open('config.json', 'r'))
except:
print("Couldn't load config.json. Make sure you run login.py first!\n-----")
raise
# try:
# cfg = json.load(open('config.json', 'r'))
# except:
# print("Couldn't load config.json. Make sure you run login.py first!\n-----")
# raise
meta = json.load(open('meta.json', 'r'))
takes = json.load(open('takes.json'))
# log in
client = Mastodon(
client_id=cfg['client']['id'],
client_secret=cfg['client']['secret'],
access_token=cfg['secret'],
api_base_url=cfg['site'])
take = random.choice(takes['templates']).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")])
)
# make a post!
# if you delete this line, you can also remove the random module from the imports list.
client.status_post("Hi! Your random number is: {}".format(random.randint(0,10000)))
print(take)
# # log in
# client = Mastodon(
# client_id=cfg['client']['id'],
# client_secret=cfg['client']['secret'],
# access_token=cfg['secret'],
# api_base_url=cfg['site'])
# # make a post!
# # if you delete this line, you can also remove the random module from the imports list.
# client.status_post("Hi! Your random number is: {}".format(random.randint(0,10000)))

View File

@ -55,18 +55,17 @@
"wage labour",
"capital",
"currency",
"a ruling class",
"the ruling class",
"terrorism",
"communal ownership of the means of production",
"worker's guilds",
"intellectual property",
"personal property",
"private property",
"a legal system",
"jail",
"women's rights",
"universal basic income",
"true free speech",
"free speech",
"open borders",
"the working class",
"dictatorship of the proletariat",
@ -87,6 +86,44 @@
"civilisation",
"technology",
"civil rights",
"rational choice"
"rational choice",
"personal freedom"
],
"sites": [
"fedi",
"tumblr",
"reddit",
"4chan",
"youtube",
"myspace",
"twitter",
"facebook",
"twitch",
"myspace"
],
"templates": [
"{thing} and {thing2} are mutually exclusive",
"{ideology} provides {thing} at the expense of {thing2}",
"{thing} is dividing the left",
"{thing}. {thing2}. {thing3}. what do they have in common? {ideology}.",
"{ideolog}s hate {thing} so much and i love it",
"\"{thing} is bad\", says the fucking {ideolog}",
"if you're against {thing}, you are literally not a {ideolog}",
"{ideology} is what happens when you try to build an ideology around {thing}",
"{ideolog}s will claim to support {thing} while railing against {thing2} and it's pathetic",
"me: time to check {site}\n{site}: *incoherent rambling about {thing}*\nme: *closes tab*",
"show me one person on {site} who isn't a {ideolog}",
"someone who i've followed for months just posted the worst fucking take about {thing} so i guess i'm blocking them now",
"just wait until i start ranting about {thing}",
"i was a {ideolog} until i learned about {thing}",
"slowly realising that i might be a {ideolog}",
"fight {ideology} with {ideology2}!",
"{ideolog}s be like \"let's just solve {thing} with {thing2}\"",
"{ideology} is fundamentally incompatible with {thing}",
"you, a {ideolog}: b-but what about {thing}?\nme, genius follower of {ideology}: {thing2}.",
"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}",
"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"
]
}