From d827f3e3bf331c97738eba5588f600164315af6d Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Tue, 26 Mar 2024 22:39:14 +0100 Subject: [PATCH] test list_package_installs --- script.py | 3 ++- templates/book.jinja | 34 ++++++++++++++++------------------ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/script.py b/script.py index 5282e30..294aec1 100644 --- a/script.py +++ b/script.py @@ -79,7 +79,8 @@ output = template.render( list_package_installs=list_package_installs, # list_package_upgrade=list_package_upgrade, list_package_upgrade=fallback, - list_package_remove=list_package_remove, + # list_package_remove=list_package_remove, + list_package_remove=fallback, device_info=device_info, days_since_last_boot = time_since_last_boot.days, kitchen_services = kitchen_services, diff --git a/templates/book.jinja b/templates/book.jinja index 0154f20..7d94837 100644 --- a/templates/book.jinja +++ b/templates/book.jinja @@ -148,7 +148,7 @@ user_deleted : {{ user_deleted }} {{ log_output(list_package_installs) }} - {% if list_package_installs|length < 1 %} + {% if list_package_installs|length = 0 %} Today no new packages were installed... @@ -162,12 +162,12 @@ user_deleted : {{ user_deleted }} {{ log_output(list_package_upgrade) }} + Packages are upgraded to fix Previous bugs they had, or allow new options for usage they did not have prior. - {% endif %} - {% if list_package_upgrade|length < 0 %} - Out of the installed packages, none were upgraded today... + {% else %} + No existing packages were upgraded today. {% endif %} {% if list_package_remove|length > 0 %} @@ -175,20 +175,18 @@ user_deleted : {{ user_deleted }} These package were removed today: - - {% endif %} - {% if list_package_remove|length < 0 %} - No packages were removed today... + + {{ log_output(list_package_remove) }} + + + Packages could be removed because of consuming too much storage, not being used by the people who share the + server, or they are no longer secure. It is often good practice to 'do some spring cleaning' every now and + then and remove the packages that no longer serve you any purpose. + + + {% else %} + + No packages were removed today. {% endif %}