diff --git a/code/main.py b/code/main.py index c9f7b5f..c5f5aa8 100644 --- a/code/main.py +++ b/code/main.py @@ -109,13 +109,13 @@ class: handler.write(img_data) with open(f"./data/{uid}/{b64}{datenow}/{subject}.md", "w", encoding="utf8") as f: f.write(present) #we execute the command to convert the markdown file to a pdf and html file and also generate the first slide image - cmd = f"marp --pdf --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md" + cmd = f"./code/marp --pdf --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md" os.system(cmd) print(cmd) - cmd = f"marp --image png -o ./data/{uid}/{b64}{datenow}/{subject}.png --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md" + cmd = f"./code/marp --image png -o ./data/{uid}/{b64}{datenow}/{subject}.png --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md" os.system(cmd) print(cmd) - cmd = f"marp --html --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md" + cmd = f"./code/marp --html --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md" os.system(cmd) print(cmd) #we create an embed with the first slide imageand send it with the pdf file and the markdown file diff --git a/docker/Dockerfile b/docker/Dockerfile index 54f5d50..c4017a7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,4 +9,4 @@ RUN wget https://github.com/marp-team/marp-cli/releases/download/v2.3.0/marp-cli RUN tar -xvf marp-cli-v2.3.0-linux.tar.gz RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /presentator/code USER appuser -CMD ["python", "main.py"] \ No newline at end of file +CMD ["python", "./code/main.py"] \ No newline at end of file