From 4b5a64da204415744f1f39da180543908a3497e2 Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Mon, 25 Mar 2024 19:07:57 +0100 Subject: [PATCH] include font files in pub --- script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.py b/script.py index 5cf23ee..93edbea 100644 --- a/script.py +++ b/script.py @@ -99,7 +99,7 @@ print("Output the files"); # Export the html as book.html, which is used as an input for pandoc with open("/home/xpub/www/html/tl-dr/book.html", "w") as f: print(output, file=f) - subprocess.run(["pandoc", "/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], capture_output=True) + subprocess.run(["pandoc", "/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='fonts/Cascadia/ttf/CascadiaCode-*.ttf'" "--epub-embed-font='fonts/Ductus/Ductus*.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_" + now.strftime("%Y-%m-%d_%H%M%S") + ".epub"], capture_output=True) create_all_logs_file();