only use 10k toots rather than all of them to avoid having Too Many Toots

This commit is contained in:
Lynne 2019-01-14 08:38:54 +10:00
parent a218e07022
commit 213c40351d
No known key found for this signature in database
GPG Key ID: FB7B970303ACE499
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ def make_sentence(output):
db = sqlite3.connect("toots-copy.db")
db.text_factory=str
c = db.cursor()
toots = c.execute("SELECT content FROM `toots`").fetchall()
toots = c.execute("SELECT content FROM `toots` ORDER BY RANDOM() LIMIT 10000").fetchall()
toots_str = ""
for toot in toots:
toots_str += "\n{}".format(toot[0])