diff --git a/README.md b/README.md index a86ea9f..ce9aca6 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,4 @@ run `python3 main.py` to login and scrape run `pyhton3 gen.py` to make a toot -this will toot once every three hours after until it crashes - -maybe the code won't be total jenk eventually but \shrug +cron is an okay choice to make it toot regularly diff --git a/gen.py b/gen.py index 8ed533a..a4cd651 100644 --- a/gen.py +++ b/gen.py @@ -13,13 +13,9 @@ client = Mastodon( with open("corpus.txt") as fp: model = markovify.NewlineText(fp.read()) -print("Running...") -while True: - print("tooting") - # This is not the best long term fix tbh - sentence = None - while sentence is None: - sentence = model.make_sentence() - client.toot(sentence.replace(chr(31), "\n")) - print("sleeping") - time.sleep(60*60*3) +print("tooting") +# This is not the best long term fix tbh +sentence = None +while sentence is None: + sentence = model.make_sentence(tries=100000) +client.toot(sentence.replace(chr(31), "\n"))