diff --git a/mobilizon_bots/main.py b/mobilizon_bots/main.py new file mode 100644 index 0000000..b2a9d61 --- /dev/null +++ b/mobilizon_bots/main.py @@ -0,0 +1,14 @@ +from mobilizon_bots.storage.db import MobilizonBotsDB + + +def main(): + """ + STUB + :return: + """ + db = MobilizonBotsDB().setup() + unpublished_events = Mobilizon().get_unpublished_events() + published_events = db.get_published_events() + event = select_event_to_publish() + result = PublisherCoordinator(event).publish() if event else exit(0) + exit(0 if result.is_success() else 1) diff --git a/mobilizon_bots/storage/db.py b/mobilizon_bots/storage/db.py index 2b556a4..0f75c60 100644 --- a/mobilizon_bots/storage/db.py +++ b/mobilizon_bots/storage/db.py @@ -3,8 +3,8 @@ from pathlib import Path from tortoise import Tortoise -class MobotsDB: - def __init__(self, path: Path): +class MobilizonBotsDB: + def __init__(self, path: Path = None): self.path = path async def setup(self):