Skip to content

Commit ce95962

Browse files
authored
Merge pull request #5 from v411e/develop
Fix package structure
2 parents 836cf9e + a2843ce commit ce95962

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM python:3-alpine
33
WORKDIR /app
44

55
COPY requirements.txt /app/requirements.txt
6-
COPY ./hype /app
6+
COPY ./hype /app/hype
77

88
RUN pip install -r requirements.txt
99

@@ -14,4 +14,4 @@ RUN mkdir -p /app/secrets/
1414

1515
COPY ./config/* /app/config/
1616

17-
ENTRYPOINT ["python", "/app/main.py"]
17+
ENTRYPOINT ["python", "-m", "hype"]
File renamed without changes.

hype/__main__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from .config import Config
2+
from .hype import Hype
3+
4+
bot = Hype(Config())
5+
bot.login()
6+
bot.update_profile()
7+
bot.start()

hype/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import logging
12
from typing import List
3+
24
import yaml
3-
import logging
45

56

67
class BotAccount:

hype/hype.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import logging
2+
import os.path
13
import time
4+
25
import schedule
3-
import logging
46
from mastodon import Mastodon
5-
from config import Config
6-
import os.path
7+
8+
from .config import Config
79

810

911
class Hype:

hype/main.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)