ticketfrei/ticketfrei.py

24 lines
583 B
Python
Raw Normal View History

2017-06-17 16:15:13 +00:00
import pytoml as toml
import time
2017-06-17 18:49:30 +00:00
from retootbot import RetootBot
from retweetbot import RetweetBot
2017-06-17 18:27:53 +00:00
2017-06-17 17:37:33 +00:00
if __name__ == '__main__':
# read config in TOML format (https://github.com/toml-lang/toml#toml)
with open('ticketfrei.cfg') as configfile:
2017-06-17 18:49:30 +00:00
config = toml.load(configfile)
mbot = RetootBot(config)
tbot = RetweetBot()
try:
statuses = []
while True:
statuses = mbot.retoot(statuses)
statuses = tbot.flow(statuses) # XXX not implemented in RetweetBot
time.sleep(1)
except:
tbot.shutdown()