From 76823f6939d48de63fc5e451c586f2136bb77847 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Sat, 18 Feb 2017 20:47:20 +0100 Subject: [PATCH] Allow Markov and lyrics bots to use separate accounts for tweeting --- lyricsbot.py | 2 +- markov.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lyricsbot.py b/lyricsbot.py index 5a0e762..598170f 100755 --- a/lyricsbot.py +++ b/lyricsbot.py @@ -24,7 +24,7 @@ def postprocess(lid, tid, db = dbtools.dbHelper()): db.executeQuery("UPDATE lyrics SET active = 1 WHERE ref = %i;" % int(lid)) db.commit() -def tweet(text, ref = 0, two = twitools.twObject()): +def tweet(text, ref = 0, two = twitools.twoHelper(setuptools.LYRICS)): return two.tweet(text, ref).id if __name__ == "__main__": diff --git a/markov.py b/markov.py index 9b04af3..26dc7f6 100755 --- a/markov.py +++ b/markov.py @@ -9,7 +9,7 @@ def getText(db = dbtools.dbHelper()): def markovify(text): return markovify.Text(text).make_short_sentence(130).replace("@", "@​") -def tweet(text, ref = 0, two = twitools.twObject()): +def tweet(text, ref = 0, two = twitools.twoHelper(setuptools.MARKOV)): return two.tweet(text, ref).id if __name__ == "__main__":