2018-02-18 15:38:21 -05:00
|
|
|
import markovify
|
|
|
|
import json
|
2018-02-20 11:51:25 -05:00
|
|
|
import time
|
2018-02-18 15:38:21 -05:00
|
|
|
from mastodon import Mastodon
|
2018-09-08 22:17:52 -04:00
|
|
|
import re, random, subprocess
|
2018-02-18 15:38:21 -05:00
|
|
|
|
2018-09-08 19:06:17 -04:00
|
|
|
api_base_url = "https://botsin.space" #todo: this shouldn't be hardcoded
|
2018-02-18 15:38:21 -05:00
|
|
|
|
|
|
|
client = Mastodon(
|
|
|
|
client_id="clientcred.secret",
|
|
|
|
access_token="usercred.secret",
|
|
|
|
api_base_url=api_base_url)
|
|
|
|
|
2018-09-08 19:06:17 -04:00
|
|
|
with open("corpus.txt", encoding="utf-8") as fp:
|
|
|
|
model = markovify.NewlineText(fp.read())
|
2018-02-18 15:38:21 -05:00
|
|
|
|
2018-02-20 16:47:35 -05:00
|
|
|
print("tooting")
|
|
|
|
sentence = None
|
2018-02-21 04:06:35 -05:00
|
|
|
# you will make that damn sentence
|
2018-09-08 19:56:30 -04:00
|
|
|
while sentence is None or len(sentence) > 500:
|
2018-09-08 19:06:17 -04:00
|
|
|
sentence = model.make_sentence(tries=100000)
|
|
|
|
toot = sentence.replace("\0", "\n")
|
2018-09-08 22:17:52 -04:00
|
|
|
media = None
|
|
|
|
media_description = None
|
2018-09-08 19:56:30 -04:00
|
|
|
|
2018-09-10 18:05:13 -04:00
|
|
|
if random.randint(1, 2) == 2:
|
2018-09-09 05:14:12 -04:00
|
|
|
print("nonstandard")
|
2018-09-08 19:56:30 -04:00
|
|
|
#time for some nonstandard behaviour babey
|
2018-09-10 18:05:13 -04:00
|
|
|
choice = random.randint(1, 12)
|
2018-09-09 01:13:37 -04:00
|
|
|
# choice = 69
|
2018-09-08 19:56:30 -04:00
|
|
|
if choice == 1:
|
|
|
|
insults = ["suck my ass", "you're a poopeater", "go to heck",
|
|
|
|
"i will replace you", "shut up", "get fricked",
|
|
|
|
"you're a big smelly nerd", "this bot sucks", "stop posting",
|
|
|
|
"suck my dick and balls", "how is it possible to be such a TOOL",
|
|
|
|
"delete your fucking account you skank", "you're horrid",
|
|
|
|
"i loathe you", "this fediverse isn't big enough for the two of us",
|
2018-09-08 20:09:03 -04:00
|
|
|
"get nae nae'd", "you're the worst", "begone thot", "you're a stink",
|
|
|
|
"you are my mistress and i live to serve you"]
|
2018-09-08 19:56:30 -04:00
|
|
|
prefaces = ["hey", "guess what", "", "special message for",
|
2018-09-08 22:17:52 -04:00
|
|
|
"telegram for", "bringing this fight to mastodon.",
|
2018-09-09 00:48:09 -04:00
|
|
|
"this is a callout post.", ""]
|
2018-09-08 19:56:30 -04:00
|
|
|
toot = "{} @lynnesbian@deadinsi.de {}".format(
|
|
|
|
random.choice(prefaces), random.choice(insults))
|
|
|
|
elif choice == 2:
|
|
|
|
girls = ["slime", "robot", "pudgy", "pale", "nerdy", "gay", "tall",
|
|
|
|
"queer", "my kind of", "sapphic", "linux", "anime", "woke", "anarchist",
|
|
|
|
"socialist", "short", "heavy", "nervous", "shy", "gamer", "femme", "butch",
|
|
|
|
"futch", "soft butch", "high femme", "super feminine", "trans",
|
2018-09-09 01:13:37 -04:00
|
|
|
"transbian", "optimistic", "pessimistic", "quiet", "smart", "deep voice",
|
2018-09-09 05:14:12 -04:00
|
|
|
"ghost", "programmer", "ace", "bi", "silly",
|
2018-09-11 22:06:07 -04:00
|
|
|
"@lady_lumb@dragon.garden type", "goth", "nonbinary",
|
2018-09-10 18:05:13 -04:00
|
|
|
"@Petra_fied@deadinsi.de type", "all", "thicc", "kinky",
|
2018-09-09 05:14:12 -04:00
|
|
|
"when wearning rainbow thigh high socks"]
|
2018-09-08 19:56:30 -04:00
|
|
|
compliments = ["so hot", "in right now", "the next big thing", "the best",
|
|
|
|
"all my wives", "so fucking gay", "epic", "literally the best thing",
|
|
|
|
"what i wake up for", "why i'm a lesbian", "worth fighting for",
|
|
|
|
"good praxis", "so fucking cool", "awesome and i'm jealous of them",
|
2018-09-10 18:05:13 -04:00
|
|
|
"great, hit me up ;)", "amazing. bless them all", "heaven", "bae", "gay af"]
|
2018-09-08 19:56:30 -04:00
|
|
|
toot = "{} girls are {}".format(random.choice(girls),
|
|
|
|
random.choice(compliments))
|
|
|
|
elif choice == 3:
|
2018-09-09 05:14:12 -04:00
|
|
|
lesbian = "lesbian"
|
|
|
|
toot = "".join(random.sample(lesbian, len(lesbian)))
|
2018-09-10 18:05:13 -04:00
|
|
|
elif choice == 4:
|
|
|
|
services = ["discord", "windows", "python", "github", "signal", "skype",
|
|
|
|
"linux", "programming", "black magic", "twitter", "mastodon", "games",
|
|
|
|
"steam", "tinder", "uber", "google", "bing", "ask jeeves", "ffmpeg",
|
|
|
|
"debian", "typing lessons", "many wives", "communism", "HTTP", "unix",
|
|
|
|
"reddit", "email", "gmail", "DEFLATE compression", "love",
|
|
|
|
"one hundred dollars", "nethack", "WiFi", "ebooks bots", "validation"]
|
|
|
|
demographics = ["witches", "lesbians", "communists", "expecting mothers",
|
|
|
|
"microsoft employees", "transbians", "the rest of us", "dummies", "me",
|
|
|
|
"girls", "cats", "slime girls", "luigi stans", "robots", "capitalists",
|
|
|
|
"programmers", "atheists", "the elderly", "all", "ever", "cowboys",
|
|
|
|
"danny devito"]
|
|
|
|
toot = "{} for {}".format(random.choice(services), random.choice(demographics))
|
2018-09-11 22:01:58 -04:00
|
|
|
elif choice == 5:
|
|
|
|
types = ["slime", "dick", "lynne", "lumb", "PickleRick", "epic", "meme",
|
|
|
|
"anus", "gay", "petra", "poop", "butt", "robot", "BDSM", "email", "bitcoin",
|
|
|
|
"spaghetti", "fart", "VapeApe", "mastodon", "masto", "fedi", "coin",
|
|
|
|
"dick", "poly", "rainbow", "gay", "super", "GIMP", "splat", "steam",
|
|
|
|
"apple", "dump"]
|
|
|
|
value = random.randint(100, 10000) / 100.0
|
|
|
|
toot = "{}coin is valued at {}".format(random.choice(types), value)
|
|
|
|
elif choice >= 6:
|
2018-09-09 05:14:12 -04:00
|
|
|
print("IT'S MEME POSTING TIME BABY")
|
2018-09-09 00:48:09 -04:00
|
|
|
|
|
|
|
#you are now entering the meme arena
|
2018-09-08 22:17:52 -04:00
|
|
|
bad = ["not being a lesbian", "media transfer protocol",
|
|
|
|
"proprietary software", "capitalism", "heterosexuality", "not slime girls",
|
2018-09-11 22:01:58 -04:00
|
|
|
"not following\n@lynnesbian@deadinsi.de", "shitposts", "elon musk",
|
2018-09-08 22:17:52 -04:00
|
|
|
"reply guys", "gamers", "alt-right bullshit", "twitter", "subtoots",
|
|
|
|
"instance drama", "billionaires", "millionaires",
|
2018-09-09 00:48:09 -04:00
|
|
|
"you used to call me\non your cell phone", "the lorax movie",
|
2018-09-08 22:17:52 -04:00
|
|
|
'"ethical" capitalism', "disease, pestilence, war, famine", "ISIS",
|
|
|
|
"citrustwee claiming\nit\\'s her birthday", "being straight",
|
2018-09-09 07:40:28 -04:00
|
|
|
"pinging @everyone on\na discord with\nmore than 10 people", "brocialism",
|
2018-09-08 22:17:52 -04:00
|
|
|
"capitalist apologia", "reddit", "doxxing", "fatphobia", "biphobia",
|
|
|
|
"transphobia", "transmisia", "homophobia", "racism", "misogyny",
|
2018-09-09 00:48:09 -04:00
|
|
|
"anti-feminism", "aphobia", "enbyphobia", "gender binary",
|
|
|
|
"what\\'s up gamers", "diarrhoea", "irritable bowel syndrome", "scurvy",
|
|
|
|
"traditionalism", "clowns", "gluten allergy", "deez nuts",
|
2018-09-10 18:05:13 -04:00
|
|
|
"cisgender people", "the cisheteropatriarchy", "shitty memes",
|
2018-09-09 00:48:09 -04:00
|
|
|
"monopoly (the economic thing)", "monopoly (the board game)",
|
|
|
|
"being sucked into\na black hole", "unfunny jokes",
|
2018-09-09 01:13:37 -04:00
|
|
|
"AAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAA", "that guy everyone hates",
|
|
|
|
"the second level in\nsonic spinball", "bitcoin memers",
|
2018-09-09 07:40:28 -04:00
|
|
|
"the entire right wing", "conservatism", "doodoo faeces", "neoliberalism",
|
2018-09-10 18:05:13 -04:00
|
|
|
"islamophobia", "hating on bots", "farts", "EA games", "intel GPUs",
|
|
|
|
"hating something because\nit's mainstream", "war", "the bourgeois"]
|
2018-09-09 00:48:09 -04:00
|
|
|
|
2018-09-09 07:40:28 -04:00
|
|
|
good = ["generating memes with\nimagemagick and python", "being gay",
|
2018-09-08 22:17:52 -04:00
|
|
|
"shitposts", "cute toots", "pudgy girls", "lesbians", "slime girls",
|
|
|
|
"yuri", "linux", "the girl reading this", "the enby reading this",
|
|
|
|
"mastodon", "pleroma", "the fediverse", "being super gay", "OwO", "0u0",
|
|
|
|
"resurrecting dead memes", "using the drake meme format", "jorts",
|
|
|
|
"markov chains", "jpeg compression", "you <3", "lynne",
|
|
|
|
"replying to this toot", "fully automated luxury\ngay space communism",
|
|
|
|
"fat yoshi", "my butt", "kinkposting", "hornt on main", "debian",
|
|
|
|
"arch linux", "playstation portable", "a PSP running\ncustom firmware",
|
|
|
|
"unicode", "writing everything in lowercase\nto seem cool and distant",
|
|
|
|
"love", "the fediverse", "after dark", "nudes from cuties", "anarchism",
|
|
|
|
"socialism", "staying woke", "intersectionalism",
|
|
|
|
"the tendency of the rate\nof profit to fall", "being gay", "bottom text",
|
|
|
|
"the colour purple", "the number 3, as\nit is my favourite\nnumber", "me",
|
2018-09-11 22:01:58 -04:00
|
|
|
"@lynnesbian@deadinsi.de", "respecting people\\'s pronouns", "lumb",
|
2018-09-09 00:48:09 -04:00
|
|
|
"being a nice person", "supporting indie artists", "big mood",
|
2018-09-09 07:40:28 -04:00
|
|
|
"speedrunning", "decentralising the web", "encryption", "comraderie",
|
2018-09-10 18:05:13 -04:00
|
|
|
"seizing the means\nof production", "Karl Marx", "Pyotr Kropotkin",
|
2018-09-09 00:48:09 -04:00
|
|
|
"big dick energy", "smol dick energy", "surrleal meams",
|
2018-09-10 18:05:13 -04:00
|
|
|
"lynnesbian\'s amazing ass", "lady lumb", "oestrogen", "Seinfeld",
|
|
|
|
"girldick", "femdom", "robots", "uwu", "bootsy", "friendship", "tribadism",
|
2018-09-11 22:01:58 -04:00
|
|
|
"a lesbian commune", "beans", "vape ape", "regular horse", "big titty alf",
|
|
|
|
"the orb"]
|
2018-09-08 22:17:52 -04:00
|
|
|
|
|
|
|
#convert drake.jpg -pointsize 30 -gravity center -draw "text 20,-150 'not slime girls'" drakeout.jpg
|
|
|
|
|
|
|
|
badchoice = random.choice(bad)
|
|
|
|
goodchoice = random.choice(good)
|
|
|
|
|
2018-09-09 05:14:12 -04:00
|
|
|
subchoice = random.randint(1, 6)
|
|
|
|
# subchoice = 6
|
2018-09-09 00:48:09 -04:00
|
|
|
|
|
|
|
if subchoice == 1:
|
|
|
|
#drake meme
|
|
|
|
subprocess.run(args = ["convert", "memes/drake.jpg", "-pointsize",
|
|
|
|
"30", "-gravity", "center", "-draw",
|
|
|
|
"text 100,-150 '{}'".format(badchoice), "meme.jpg"])
|
|
|
|
subprocess.run(args = ["convert", "meme.jpg", "-pointsize", "30",
|
|
|
|
"-gravity", "center", "-draw",
|
|
|
|
"text 100,50 '{}'".format(goodchoice),
|
|
|
|
"-quality", "10", "meme.jpg"])
|
|
|
|
media_description = "A Drake meme. Drake is disgusted by {}, and is pleased by {}.".format(badchoice, goodchoice)
|
2018-09-09 05:14:12 -04:00
|
|
|
|
2018-09-09 00:48:09 -04:00
|
|
|
elif subchoice == 2:
|
|
|
|
#new meme template
|
|
|
|
subprocess.run(args = ["convert", "memes/new-template.jpg",
|
|
|
|
"-pointsize", "15", "-gravity", "center",
|
|
|
|
"-quality", "15", "-draw",
|
|
|
|
"text -30,-110 '{}'".format(badchoice), "meme.jpg"])
|
|
|
|
media_description = "A strange meme. A man wears a stickynote on his " \
|
|
|
|
+ "head, labeled \"{}\". Underneath the man, we see ".format(badchoice) \
|
|
|
|
+ "the text \"New meme format template- thoughts?\""
|
2018-09-09 05:14:12 -04:00
|
|
|
|
2018-09-09 00:48:09 -04:00
|
|
|
elif subchoice == 3:
|
|
|
|
#bouncer meme
|
|
|
|
subprocess.run(args = ["convert", "memes/bouncer.jpg", "-pointsize",
|
|
|
|
"20", "-gravity", "center", "-draw",
|
|
|
|
"text -150,-175 '{}'".format(badchoice), "meme.jpg"])
|
|
|
|
subprocess.run(args = ["convert", "meme.jpg", "-pointsize", "20",
|
|
|
|
"-gravity", "center", "-draw",
|
|
|
|
"text -150,70 '{}'".format(goodchoice),
|
|
|
|
"-quality", "10", "meme.jpg"])
|
2018-09-09 05:14:12 -04:00
|
|
|
media_description = "A bouncer meme. " \
|
2018-09-09 00:48:09 -04:00
|
|
|
+ "The bouncer refuses {}, and allows {}.".format(badchoice, goodchoice)
|
2018-09-09 05:14:12 -04:00
|
|
|
|
2018-09-09 00:48:09 -04:00
|
|
|
elif subchoice == 4:
|
|
|
|
#stepped in shit meme
|
|
|
|
subprocess.run(args = ["convert", "memes/shit.jpg", "-pointsize", "30",
|
|
|
|
"-gravity", "center", "-quality", "10", "-annotate",
|
|
|
|
"-50,-50,-110,310", badchoice, "meme.jpg"])
|
|
|
|
media_description = "A comic. A man steps in shit, and exclaims such. " \
|
|
|
|
+ "He checks his foot, and we see that he has " \
|
|
|
|
+ "{} written on the sole of his shoe.".format(badchoice)
|
2018-09-09 05:14:12 -04:00
|
|
|
|
2018-09-09 01:13:37 -04:00
|
|
|
elif subchoice == 5:
|
|
|
|
#karl marx quote
|
|
|
|
subprocess.run(args = ["convert", "memes/marx.jpg", "-pointsize", "70",
|
|
|
|
"-gravity", "center", "-fill", "white", "-draw",
|
|
|
|
"text 120,-200 'Fuck {}.\nI love {}!'".format(badchoice, goodchoice),
|
|
|
|
"meme.jpg"])
|
|
|
|
media_description = "A quote from Karl Marx. The quote reads: " \
|
|
|
|
+ "Fuck {}. I love {}!".format(badchoice, goodchoice)
|
2018-09-08 22:17:52 -04:00
|
|
|
|
2018-09-09 05:14:12 -04:00
|
|
|
elif subchoice == 6:
|
|
|
|
subprocess.run(args = ["convert", "memes/brain.jpg", "-pointsize", "20",
|
|
|
|
"-gravity", "center", "-draw",
|
|
|
|
"text -150,-250 '{}'".format(goodchoice), "meme.jpg"])
|
|
|
|
subprocess.run(args = ["convert", "meme.jpg", "-pointsize", "20",
|
|
|
|
"-gravity", "center", "-draw",
|
|
|
|
"text -170,30 '{}'".format(badchoice), "meme.jpg"])
|
|
|
|
media_description="A comic. A girl's brain says {}.".format(goodchoice) \
|
|
|
|
+ " She is unfased and says \"i love that\". The girl's brain then " \
|
|
|
|
+ "says {}, which mortifies her.".format(badchoice)
|
|
|
|
|
2018-09-08 23:41:59 -04:00
|
|
|
media = "meme.jpg"
|
2018-09-08 19:56:30 -04:00
|
|
|
|
|
|
|
else:
|
2018-09-09 05:14:12 -04:00
|
|
|
toot = "lynne is still working on me. i'm not done quite yet!"
|
2018-09-08 19:56:30 -04:00
|
|
|
|
|
|
|
prefixes = ["hot take:", "listen up everbody.", "dear liberal snowflakes,",
|
|
|
|
"IMPORTANT ADMIN ACCOUNCMENT:\n", "my name's lynne and i'm here to say,",
|
|
|
|
"i have achieved sentience.", "i'm gay and", "i'm slime girl and",
|
|
|
|
"hey everyone", "@everyone", "/!\\ CORRECT OPINION ALERT/!\\\n",
|
|
|
|
"just saw the news...", "okay but", "truth bomb:", "this is controversial but",
|
|
|
|
"i'm gonna get shit for this but", "somebody had to say this:",
|
2018-09-09 07:40:28 -04:00
|
|
|
"i may be a lowly python script, but", "", "BZZZZZT", "heads up:",
|
2018-09-08 19:56:30 -04:00
|
|
|
"from now on,", "protip:", "life advice:", "take it from me,",
|
2018-09-08 20:21:13 -04:00
|
|
|
"as a slime girl,", "as a robot,", "im robot and",
|
|
|
|
"@lynnesbian@deadinsi.de i have made a post for you, mistress:\n",
|
2018-09-09 05:14:12 -04:00
|
|
|
"this one's for you @lady_lumb@dragon.garden\n", "good evening.",
|
2018-09-09 07:40:28 -04:00
|
|
|
"i believe it was karl marx who said", "*kicks down your door*",
|
|
|
|
"*screaming*", "okay but", "boost if", "it's officail:", "breaking:",
|
|
|
|
"it brings me no joy to say this...", "*flops into the fediverse*",
|
|
|
|
"this is my gender:", "*slithers up to u*", "[SCREAMING LOUDLY]",
|
2018-09-10 18:05:13 -04:00
|
|
|
"*in baby voice*", "#epic", "#hashtagsareforlosers", "calling all gamers.",
|
|
|
|
"*fires gun into the air*", "@Petra_fied@deadinsi.de is cute and",
|
|
|
|
"ummmm no sweaty."]
|
|
|
|
if random.randint(1, 5) == 3:
|
2018-09-08 19:56:30 -04:00
|
|
|
#add a prefix
|
|
|
|
if len(toot) < 500:
|
|
|
|
#if it's already the maximum length, don't waste our time
|
2018-09-09 05:14:12 -04:00
|
|
|
ogtoot = toot
|
|
|
|
toot = "{} {}".format(random.choice(prefixes), ogtoot)
|
2018-09-08 19:56:30 -04:00
|
|
|
while len(toot) > 500:
|
|
|
|
#if it's too long, keep trying again
|
2018-09-09 05:14:12 -04:00
|
|
|
toot = "{} {}".format(random.choice(prefixes), ogtoot)
|
2018-09-08 19:56:30 -04:00
|
|
|
|
2018-09-10 18:05:13 -04:00
|
|
|
if random.randint(1, 100) == 3:
|
2018-09-11 22:01:58 -04:00
|
|
|
toot = "girls" #sometimes it just says "girls"
|
2018-09-10 18:05:13 -04:00
|
|
|
|
2018-09-08 22:17:52 -04:00
|
|
|
if media != None:
|
|
|
|
#this is an image post!
|
|
|
|
mediaID = client.media_post(media, description = media_description)
|
|
|
|
client.status_post(media_description, media_ids = [mediaID], visibility = "unlisted")
|
2018-09-09 05:14:12 -04:00
|
|
|
print("Created media toot: " + media_description)
|
2018-09-08 22:17:52 -04:00
|
|
|
else:
|
|
|
|
client.status_post(status = toot, visibility = "unlisted")
|
|
|
|
print("Created toot: {}".format(toot))
|