more abs paths

main
vitrinekast 9 months ago
parent 406d1473c1
commit b1890b1a6e

@ -5,7 +5,7 @@ import os
import fnmatch import fnmatch
#create the log directory #create the log directory
path = "./logs" path = "/home/xpub/www/html/tl-dr/logs"
if not os.path.exists(path): if not os.path.exists(path):
os.makedirs(path) os.makedirs(path)
# TODO: check sorting of these files (should be chronological) # TODO: check sorting of these files (should be chronological)
@ -99,7 +99,7 @@ print("Output the files");
# Export the html as book.html, which is used as an input for pandoc # 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: with open("/home/xpub/www/html/tl-dr/book.html", "w") as f:
print(output, file=f) print(output, file=f)
subprocess.run(["pandoc", "/home/xpub/www/html/tl-dr/book.html", "-o", "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], capture_output=True)
print("just generated a new book, also put it in the backlog of logs") 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) 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(); create_all_logs_file();

Loading…
Cancel
Save