From c43e721ba655ab15f38644d0b61f4584f604167b Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 20 Sep 2019 17:57:14 +1000 Subject: [PATCH] more opinions, basic template filling --- post.py | 40 ++++++++++++++++++++++++++-------------- takes.json | 45 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 18 deletions(-) diff --git a/post.py b/post.py index 4991ba8..b68f488 100644 --- a/post.py +++ b/post.py @@ -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))) diff --git a/takes.json b/takes.json index 4b66819..e14156b 100644 --- a/takes.json +++ b/takes.json @@ -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" ] }