use fallback

main
vitrinekast 8 months ago
parent af0f985b59
commit 8145bb217f

@ -67,13 +67,14 @@ env = Environment(loader=FileSystemLoader("/home/xpub/www/html/tl-dr/templates")
# loading the template (use template.jinja when generating the html webview) # loading the template (use template.jinja when generating the html webview)
template = env.get_template("book.jinja") template = env.get_template("book.jinja")
fallback = list_package_installs
# rendering the template and storing the resultant text in variable output # rendering the template and storing the resultant text in variable output
output = template.render( output = template.render(
now = now.strftime("%B %dth %Y"), now = now.strftime("%B %dth %Y"),
last_user_added=last_user_added.stdout.decode('UTF-8'), last_user_added=last_user_added.stdout.decode('UTF-8'),
last_user_added_name=last_user_added_name, last_user_added_name=last_user_added_name,
users_created_today=users_created_today, # users_created_today=users_created_today,
users_created_today=fallback,
since_last_boot=since_last_boot, since_last_boot=since_last_boot,
list_package_installs=list_package_installs, list_package_installs=list_package_installs,
list_package_upgrade=list_package_upgrade, list_package_upgrade=list_package_upgrade,

@ -18,6 +18,7 @@
<meta property="og:image" content=""> <meta property="og:image" content="">
<meta property="og:description" content=""> <meta property="og:description" content="">
<meta property="og:url" content=""> <meta property="og:url" content="">
<link rel="stylesheet" href="print.css">
<title>A log book of {{now}}</title> <title>A log book of {{now}}</title>
</head> </head>
@ -137,18 +138,18 @@ user_deleted : {{ user_deleted }}
{% endif %} {% endif %}
{% if list_package_installs|length > 0 %} {% if list_package_installs|length > 0 %}
<p><em>tldr@chopchop:~ $</em> grep 'install' /var/log/dpkg.log</p> <p><em>tldr@chopchop:~ $</em> grep 'install' /var/log/dpkg.log</p>
<mark> <mark>
Today the following packages were installed: Today the following packages were installed:
</mark> </mark>
{{ log_output(list_package_installs) }} {{ log_output(list_package_installs) }}
<mark> <mark>
Packages are often installed to use different software or coding languages or build alternative tools. Often Packages are often installed to use different software or coding languages or build alternative tools. Often
users have to talk about and consider which packages they need and why, as well as how much storage they take up users have to talk about and consider which packages they need and why, as well as how much storage they take up
and how they will change their interactions with and on their shared server. and how they will change their interactions with and on their shared server.
</mark> </mark>
{% endif %} {% endif %}
{% if list_package_installs|length < 0 %} <mark> {% if list_package_installs|length < 0 %} <mark>
Today no new packages were installed... Today no new packages were installed...

Loading…
Cancel
Save