|
|
@ -15,10 +15,15 @@ path = "/home/xpub/www/html/tl-dr/log-books"
|
|
|
|
if not os.path.exists(path):
|
|
|
|
if not os.path.exists(path):
|
|
|
|
os.makedirs(path)
|
|
|
|
os.makedirs(path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(time_ago_arg):
|
|
|
|
|
|
|
|
now = datetime.today() - timedelta(days=time_ago_arg)
|
|
|
|
|
|
|
|
else:
|
|
|
|
now = datetime.today()
|
|
|
|
now = datetime.today()
|
|
|
|
|
|
|
|
|
|
|
|
book_name = "TL;DR_" + now.strftime("%B %dth %Y")
|
|
|
|
book_name = "TL;DR_" + now.strftime("%B %dth %Y")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(f"making a book called {book_name}")
|
|
|
|
|
|
|
|
|
|
|
|
def get_journalctl_on():
|
|
|
|
def get_journalctl_on():
|
|
|
|
if time_ago_arg:
|
|
|
|
if time_ago_arg:
|
|
|
|
return ["-S", f"{time_ago_arg + 1} days ago", "-U", f"{time_ago_arg} days ago"]
|
|
|
|
return ["-S", f"{time_ago_arg + 1} days ago", "-U", f"{time_ago_arg} days ago"]
|
|
|
|