From b4fd205d65c7c6f7a4db3a3b87c6acbc7cc94089 Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Tue, 26 Mar 2024 13:50:13 +0100 Subject: [PATCH] execute from python --- script.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/script.py b/script.py index e32c524..c49c8e4 100644 --- a/script.py +++ b/script.py @@ -102,16 +102,7 @@ print("Output the files"); with open("/home/xpub/www/html/tl-dr/book.html", "w") as f: print(output, file=f) print("execute the bash script now to create the books"); - subprocess.run(["pandoc", "/home/xpub/www/html/tl-dr/preface.html", "/home/xpub/www/html/tl-dr/book.html", - "-o", "/home/xpub/www/html/tl-dr/logged_book.epub", - "-c", "print.css", "--metadata", - "title="+log_file_name, - "--epub-cover-image=cover.jpg" , - "--epub-embed-font='/home/xpub/www/html/tl-dr/fonts/Cascadia/ttf/CascadiaCode-Light.ttf'" - "--epub-embed-font='/home/xpub/www/html/tl-dr/fonts/Ductus/DuctusRegular.woff'"], capture_output=True) - print("just generated a new book, also put it in the backlog of logs") - subprocess.run(["cp", "/home/xpub/www/html/tl-dr/logged_book.epub", "/home/xpub/www/html/tl-dr/log-books/" + log_file_name + ".epub"], capture_output=True) - create_all_logs_file(); + subprocess.run(['sh', 'create_book.sh']) print("Finished"); # At the moment, we are not storing logs in the log folder anymore