mirror of
https://github.com/Paillat-dev/presentator.git
synced 2026-01-02 01:06:20 +00:00
Update main.py
This commit is contained in:
@@ -109,13 +109,13 @@ class:
|
|||||||
handler.write(img_data)
|
handler.write(img_data)
|
||||||
with open(f"./data/{uid}/{b64}{datenow}/{subject}.md", "w", encoding="utf8") as f: f.write(present)
|
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
|
#we execute the command to convert the markdown file to a pdf and html file and also generate the first slide image
|
||||||
cmd = f"./code/marp --pdf --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md"
|
cmd = f"./marp --pdf --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md"
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
print(cmd)
|
print(cmd)
|
||||||
cmd = f"./code/marp --image png -o ./data/{uid}/{b64}{datenow}/{subject}.png --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md"
|
cmd = f"./marp --image png -o ./data/{uid}/{b64}{datenow}/{subject}.png --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md"
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
print(cmd)
|
print(cmd)
|
||||||
cmd = f"./code/marp --html --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md"
|
cmd = f"./marp --html --allow-local-files ./data/{uid}/{b64}{datenow}/{subject}.md"
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
print(cmd)
|
print(cmd)
|
||||||
#we create an embed with the first slide imageand send it with the pdf file and the markdown file
|
#we create an embed with the first slide imageand send it with the pdf file and the markdown file
|
||||||
|
|||||||
Reference in New Issue
Block a user