From a20e1f330402a8e90dcc108ffedc890e26fd964e Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Tue, 26 Mar 2024 22:34:40 +0100 Subject: [PATCH] change markup of list_package_installs --- print.css | 1 + script.py | 3 ++- templates/book.jinja | 24 ++++++++++-------------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/print.css b/print.css index 29343bf..7d6086c 100644 --- a/print.css +++ b/print.css @@ -304,6 +304,7 @@ q { body { font-family: "CascadiaCode VTT"; font-size: 0.8rem; + text-align: left; margin: 2rem 1rem 1rem 1rem; } diff --git a/script.py b/script.py index 21d7356..d85b938 100644 --- a/script.py +++ b/script.py @@ -76,7 +76,8 @@ output = template.render( # users_created_today=users_created_today, users_created_today=fallback, since_last_boot=since_last_boot, - list_package_installs=list_package_installs, + # list_package_installs=list_package_installs, + list_package_installs = [], list_package_upgrade=list_package_upgrade, list_package_remove=list_package_remove, device_info=device_info, diff --git a/templates/book.jinja b/templates/book.jinja index 1411d52..21ad017 100644 --- a/templates/book.jinja +++ b/templates/book.jinja @@ -130,31 +130,27 @@ user_deleted : {{ user_deleted }} {{ log_output(users_created_today) }} {% if users_created_today|length > 0 %} - {{last_user_name}} user was added, and the network of trust grew ever so slightly. Users will be trusted with not just the keys and passwords to the "house" which is the server, but with a portion of responsibility to keep it afloat and contribute to what makes it a community of practices (and network of knowledge and dependence). + {{last_user_added_name}} user was added, and the network of trust grew ever so slightly. Users will be trusted with not just the keys and passwords to the "house" which is the server, but with a portion of responsibility to keep it afloat and contribute to what makes it a community of practices (and network of knowledge and dependence). {% else %} No new users were created today. The trust network remains the same size. {% endif %} {% endif %} - {% if list_package_installs|length > 0 %} -

tldr@chopchop:~ $ grep 'install' /var/log/dpkg.log

+ +

tldr@chopchop:~ $ grep 'install' /var/log/dpkg.log

- - Today the following packages were installed: - + + 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 + and how they will change their interactions with and on their shared server. + - {{ log_output(list_package_installs) }} - - 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 - and how they will change their interactions with and on their shared server. - - {% endif %} + {{ log_output(list_package_installs) }} + {% if list_package_installs|length < 0 %} Today no new packages were installed... - This part also not working {% endif %} {% if list_package_upgrade|length > 0 %}