2017-06-17 16:15:13 +00:00
|
|
|
import pytoml as toml
|
|
|
|
import time
|
2017-07-11 20:05:46 +00:00
|
|
|
import traceback
|
2017-06-17 16:15:13 +00:00
|
|
|
|
2017-06-17 18:49:30 +00:00
|
|
|
from retootbot import RetootBot
|
|
|
|
from retweetbot import RetweetBot
|
2017-06-17 20:11:44 +00:00
|
|
|
from trigger import Trigger
|
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)
|
|
|
|
|
2017-06-17 23:33:47 +00:00
|
|
|
trigger = Trigger(config)
|
2017-06-17 20:11:44 +00:00
|
|
|
|
2017-06-25 15:50:03 +00:00
|
|
|
mbot = RetootBot(config, trigger)
|
2017-06-25 16:31:16 +00:00
|
|
|
tbot = RetweetBot(trigger, config)
|
2017-06-17 18:49:30 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
statuses = []
|
|
|
|
while True:
|
|
|
|
statuses = mbot.retoot(statuses)
|
2017-06-25 19:42:06 +00:00
|
|
|
statuses = tbot.flow(statuses)
|
2017-07-11 20:55:49 +00:00
|
|
|
time.sleep(6)
|
2017-07-11 20:05:46 +00:00
|
|
|
except:
|
|
|
|
traceback.print_exc()
|
2017-06-17 18:49:30 +00:00
|
|
|
tbot.shutdown()
|