From 7fc7150cac3b487d6326c92bde5e5449c4e240b7 Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Tue, 26 Mar 2024 14:43:10 +0100 Subject: [PATCH 1/2] set white space to normal --- print.css | 1 + 1 file changed, 1 insertion(+) diff --git a/print.css b/print.css index a3184e3..03daa32 100644 --- a/print.css +++ b/print.css @@ -42,6 +42,7 @@ mark { display: block; padding-left: 0.5cm; font-family: "DuctusRegular"; + white-space: normal; } h1, From f838a40ff28785f7358a6f3abf37b3cf89ad0d25 Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Tue, 26 Mar 2024 14:01:02 +0000 Subject: [PATCH 2/2] fix the package install script --- script.py | 7 ++++--- templates/book.jinja | 15 +++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/script.py b/script.py index c49c8e4..77304d6 100644 --- a/script.py +++ b/script.py @@ -44,10 +44,11 @@ time_since_last_boot = now - slb_date dpkg_date = now.strftime("%Y-%m-%d") -list_package_installs = subprocess.run(["grep","-E", '${dpkg_date}.*install|install.*${dpkg_date}', "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines() -list_package_upgrade = subprocess.run(["grep","-E", '${dpkg_date}.*upgrade|upgrade.*${dpkg_date}', "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines() -list_package_remove = subprocess.run(["grep","-E", '${dpkg_date}.*remove|remove.*${dpkg_date}', "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines() +list_package_installs = subprocess.run(["grep","-E", dpkg_date + '.*install|install.*' + dpkg_date, "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines() +list_package_upgrade = subprocess.run(["grep","-E", dpkg_date + '.*upgrade|upgrade.*' + dpkg_date, "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines() + +list_package_remove = subprocess.run(["grep","-E", dpkg_date + '.*remove|remove.*' + dpkg_date, "/var/log/dpkg.log"], capture_output=True).stdout.decode('UTF-8').splitlines() device_info_grab = subprocess.run(["grep", 'Model' , "/proc/cpuinfo"], check=True, capture_output=True) device_info = run_command(['awk', '-F:', '{ print $2}'], based=device_info_grab.stdout) diff --git a/templates/book.jinja b/templates/book.jinja index 07e8ac0..e5e9048 100644 --- a/templates/book.jinja +++ b/templates/book.jinja @@ -70,16 +70,19 @@ {% endif %}
tldr@chopchop:~ $sudo journalctl -S today _COMM=useradd -r
- + Users are assigned to groups, which allow them rights to read or edit files, run commands or apply infrastructural changes. For chopchop, we all have 'sudo rights': the ability to perform any command, including the more sensitive ones. Sudo is a command that's short for 'superuser do', with it, a user has more privileges, like installing or updating a package or performing a restart. - + + {% if users_created_today is defined %} - {% 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).{% else %}No new users were created today. The trust network remains the same size.{% endif %} + {% 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). + {% else + No new users were created today. The trust network remains the same size. + {% endif %} - {% endif %} + {% endif %} {% if list_package_installs|length > 0 %}
tldr@chopchop:~ $ grep 'install' /var/log/dpkg.log