diff options
-rw-r--r-- | Dockerfile | 12 | ||||
-rw-r--r-- | on_this_day.py | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f0b13e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.9-slim + +RUN apt update -y && apt install -y calendar + +RUN pip install requests beautifulsoup4 lxml + +COPY config.py . +COPY main.py . +COPY on_this_day.py . +COPY config.py . + +CMD python main.py diff --git a/on_this_day.py b/on_this_day.py index 970cec9..96e8a69 100644 --- a/on_this_day.py +++ b/on_this_day.py @@ -31,7 +31,7 @@ def get_today_wikipedia(): def get_week_holidays(): print("getting holidays") - command = "calendar -f /usr/share/calendar/calendar.mark -A 14".split(" ") + command = "calendar -f /data/calendar.mark -A 14".split(" ") output = subprocess.check_output(command) output = output.decode("utf-8").strip().split("\n") return "</li>\n<li>".join(output) or "No holidays this fortnight." |