render some empty ones

main
vitrinekast 8 months ago
parent aff742a185
commit c81ff462a5

@ -58,6 +58,7 @@ ip_address = run_command(['awk', '$1 == "inet" {gsub(/\/.*$/, "", $2); print $2}
print("start running the service commands, this sometimes takes longer"); print("start running the service commands, this sometimes takes longer");
logins_today_log = subprocess.run(["sudo", "journalctl","_COMM=systemd-logind","-r" , "--output-fields=MESSAGE", "-S", "today", "-g", "'New session'" ], capture_output=True) logins_today_log = subprocess.run(["sudo", "journalctl","_COMM=systemd-logind","-r" , "--output-fields=MESSAGE", "-S", "today", "-g", "'New session'" ], capture_output=True)
print(logins_today_log)
logins_today = run_command(['grep', '-v', "'Boot'"], based=logins_today_log.stdout) logins_today = run_command(['grep', '-v', "'Boot'"], based=logins_today_log.stdout)
kitchen_services = run_command(["sudo", "journalctl", "-S", "today", "-u", "kitchen-stove.service", "-u", "kitchen-bin.service", "-u", "kitchen-fridge.service", "-r", "-n"]).splitlines() kitchen_services = run_command(["sudo", "journalctl", "-S", "today", "-u", "kitchen-stove.service", "-u", "kitchen-bin.service", "-u", "kitchen-fridge.service", "-r", "-n"]).splitlines()
@ -76,11 +77,11 @@ output = template.render(
# users_created_today=users_created_today, # users_created_today=users_created_today,
users_created_today=fallback, 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_upgrade=list_package_upgrade, # list_package_upgrade=list_package_upgrade,
list_package_upgrade=fallback, list_package_upgrade=[],
# list_package_remove=list_package_remove, # list_package_remove=list_package_remove,
list_package_remove=fallback, list_package_remove=[],
device_info=device_info, device_info=device_info,
days_since_last_boot = time_since_last_boot.days, days_since_last_boot = time_since_last_boot.days,
kitchen_services = kitchen_services, kitchen_services = kitchen_services,

@ -91,9 +91,9 @@ user_deleted : {{ user_deleted }}
<h1>The state of chopchop on {{now}}</h1> <h1>The state of chopchop on {{now}}</h1>
<hr /> <hr />
<p><em>tldr@chopchop:~ $</em>whoami</p> <p><em>tldr@chopchop:~ $</em>whoami</p>
<p>{{device_info}}</p> <p>{{ device_info }}</p>
<p>{{chopchop}}</p> <p>{{ hostname }}</p>
<p>{{ip_address}}</p> <p>{{ ip_address }}</p>
<mark> <mark>
XPUB 1 users use chopchop as a shared community server. XPUB 1 users use chopchop as a shared community server.
chopchop is usually located in the Piet Zwart Wijnhaven building, although for this occassion it is resting on the chopchop is usually located in the Piet Zwart Wijnhaven building, although for this occassion it is resting on the
@ -130,7 +130,7 @@ user_deleted : {{ user_deleted }}
{{ log_output(users_created_today) }} {{ log_output(users_created_today) }}
{% if users_created_today|length > 0 %} {% if users_created_today|length > 0 %}
<mark> <code>{{last_user_added_name}}</code> 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).</mark> <mark> <code>{{ last_user_added_name | replace(", ", "") }}</code> 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).</mark>
{% else %} {% else %}
<mark>No new users were created today. The trust network remains the same size.</mark> <mark>No new users were created today. The trust network remains the same size.</mark>
{% endif %} {% endif %}
@ -158,13 +158,13 @@ user_deleted : {{ user_deleted }}
<p><em>tldr@chopchop:~ $</em> grep 'upgrade' /var/log/dpkg.log</p> <p><em>tldr@chopchop:~ $</em> grep 'upgrade' /var/log/dpkg.log</p>
<mark> <mark>
Out of the installed packages, these ones were upgraded: Out of the existing packages, these were upgraded:
</mark> </mark>
{{ log_output(list_package_upgrade) }} {{ log_output(list_package_upgrade) }}
<mark> <mark>
Packages are upgraded to fix Previous bugs they had, or allow new options for usage they did not have prior. Packages are upgraded to fix previous bugs they had, or allow new options for usage they did not have prior.
</mark> </mark>
{% else %} {% else %}
<mark> No existing packages were upgraded today.</mark> <mark> No existing packages were upgraded today.</mark>

Loading…
Cancel
Save