diff --git a/Dockerfile b/Dockerfile index 59d4f22..bdddd21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM python:3-alpine WORKDIR /app COPY requirements.txt /app/requirements.txt -COPY ./hype /app +COPY ./hype /app/hype RUN pip install -r requirements.txt @@ -14,4 +14,4 @@ RUN mkdir -p /app/secrets/ COPY ./config/* /app/config/ -ENTRYPOINT ["python", "/app/main.py"] \ No newline at end of file +ENTRYPOINT ["python", "-m", "hype"] diff --git a/hype/_init_.py b/hype/__init__.py similarity index 100% rename from hype/_init_.py rename to hype/__init__.py diff --git a/hype/__main__.py b/hype/__main__.py new file mode 100644 index 0000000..528e4c5 --- /dev/null +++ b/hype/__main__.py @@ -0,0 +1,7 @@ +from .config import Config +from .hype import Hype + +bot = Hype(Config()) +bot.login() +bot.update_profile() +bot.start() diff --git a/hype/config.py b/hype/config.py index 925a0cc..95777d3 100644 --- a/hype/config.py +++ b/hype/config.py @@ -1,6 +1,7 @@ +import logging from typing import List + import yaml -import logging class BotAccount: diff --git a/hype/hype.py b/hype/hype.py index 16f3977..0e13f45 100644 --- a/hype/hype.py +++ b/hype/hype.py @@ -1,9 +1,11 @@ +import logging +import os.path import time + import schedule -import logging from mastodon import Mastodon -from config import Config -import os.path + +from .config import Config class Hype: diff --git a/hype/main.py b/hype/main.py deleted file mode 100644 index 6b81c65..0000000 --- a/hype/main.py +++ /dev/null @@ -1,7 +0,0 @@ -from hype import Hype -from config import Config - -bot = Hype(Config()) -bot.login() -bot.update_profile() -bot.start() \ No newline at end of file