Added a bunch of custom behaviours

This commit is contained in:
Lynne 2018-09-08 23:56:30 +00:00
parent 98883b9756
commit 5a0e8bd89d
2 changed files with 59 additions and 2 deletions

View file

@ -17,6 +17,6 @@ make a bot (probably on bots in space) and follow the target accounts
run `python3` to login and scrape
run `pyhton3` to make a toot
run `python3` to make a toot
cron is an okay choice to make it toot regularly

View file

@ -2,6 +2,7 @@ import markovify
import json
import time
from mastodon import Mastodon
import re, random
api_base_url = "" #todo: this shouldn't be hardcoded
@ -16,8 +17,64 @@ with open("corpus.txt", encoding="utf-8") as fp:
sentence = None
# you will make that damn sentence
while sentence is None:
while sentence is None or len(sentence) > 500:
sentence = model.make_sentence(tries=100000)
toot = sentence.replace("\0", "\n")
if random.randint(1, 10) == 3:
#time for some nonstandard behaviour babey
choice = random.randint(1, 3)
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",
"get nae nae'd", "you're the worst", "begone thot", "you're a stink"]
prefaces = ["hey", "guess what", "", "special message for",
"telegram for", "bringing this fight to mastodon."]
toot = "{} {}".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",
"transbian", "optimistic", "pessimistic", "quiet", "smart"]
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",
"great, hit me up ;)"]
toot = "{} girls are {}".format(random.choice(girls),
elif choice == 3:
#don't do this one TOO much otherwise it'll get really old
if random.randint(1, 3) == 2:
lesbian = "lesbian"
toot = "".join(random.sample(lesbian, len(lesbian)))
print ("lynne is still working on me. i'm not done quite yet!")
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:",
"i may be a lowly python script, but", "", "beep boop", "heads up:",
"from now on,", "protip:", "life advice:", "take it from me,",
"as a slime girl,", "as a robot,"]
if random.randint(1, 10) == 3:
#add a prefix
if len(toot) < 500:
#if it's already the maximum length, don't waste our time
toot = "{} {}".format(random.choice(prefixes), toot)
while len(toot) > 500:
#if it's too long, keep trying again
toot = "{} {}".format(random.choice(prefixes), toot)
print("Created toot: {}".format(toot))