From 6fe3720de5902ed8b8172759b2a5b5705ccb0cdc Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 15 Oct 2025 08:24:39 +0200 Subject: [PATCH 1/4] Readme updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 31ad722..237d41f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ sudo apt install -y git ``` 3. Clone repository ```bash -git clone https://lab.c95.org/fr4nz/LoMeS.git && cd LoMeS +git clone https://lab.c95.org/fr4nz/LoMeS.git && cd LoMeS && git checkout dev-1 ``` 4. Run development environment setup ```bash From 46d1c894e2b830c908612f94b449bb2a4b08c558 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Wed, 15 Oct 2025 19:07:59 +0200 Subject: [PATCH 2/4] flask update --- lomes-app.py | 16 ++++++++++++---- templates/index.html | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lomes-app.py b/lomes-app.py index 2a116cc..c83f6f8 100755 --- a/lomes-app.py +++ b/lomes-app.py @@ -1,14 +1,22 @@ #!/bin/python3 from flask import Flask, render_template +import datetime import getpass -import socket +import os app = Flask(__name__) @app.route("/") def index(): - user=getpass.getuser() - return render_template("index.html", user=user) + user = getpass.getuser() + preTime = datetime.datetime.now() + time = preTime.strftime("%H:%M:%S - %a %d.%m.%Y") + uname_fields = ("sysname", "nodename", "release", "version", "machine") + uname_info = os.uname() + sysinfo = "\n".join(f"{field}: {value}" for field, value in zip(uname_fields, uname_info)) + lineBreak = sysinfo.replace("\n", "
") -app.run(host="127.0.0.1", port=5000) + return render_template("index.html", user=user, time=time, sysinfo=sysinfo, content=lineBreak) + +app.run(host="127.0.0.1", port=5000, debug=True) \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 541c51f..67526ed 100644 --- a/templates/index.html +++ b/templates/index.html @@ -23,6 +23,8 @@
  • User executing flask : {{user}}
  • +
  • Machine time : {{time}}
  • +
  • System : {{sysinfo}}
From f2ae7731fff252a701a1564da90f40b6a3e4e6f0 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Wed, 15 Oct 2025 19:31:45 +0200 Subject: [PATCH 3/4] Some new features --- lomes-app.py | 7 +++---- templates/index.html | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lomes-app.py b/lomes-app.py index c83f6f8..9c6c4ba 100755 --- a/lomes-app.py +++ b/lomes-app.py @@ -12,11 +12,10 @@ def index(): user = getpass.getuser() preTime = datetime.datetime.now() time = preTime.strftime("%H:%M:%S - %a %d.%m.%Y") - uname_fields = ("sysname", "nodename", "release", "version", "machine") + uname_fields = ("System", "Hostname", "Release") uname_info = os.uname() - sysinfo = "\n".join(f"{field}: {value}" for field, value in zip(uname_fields, uname_info)) - lineBreak = sysinfo.replace("\n", "
") + sysinfo = "\n".join(f"{field}: {value} | " for field, value in zip(uname_fields, uname_info)) - return render_template("index.html", user=user, time=time, sysinfo=sysinfo, content=lineBreak) + return render_template("index.html", user=user, time=time, sysinfo=sysinfo) app.run(host="127.0.0.1", port=5000, debug=True) \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 67526ed..4e6cf4b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -24,7 +24,7 @@
  • User executing flask : {{user}}
  • Machine time : {{time}}
  • -
  • System : {{sysinfo}}
  • +
  • {{sysinfo}}
From 576239daadc2ae37401609807c0f21f89a959755 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Wed, 15 Oct 2025 19:33:43 +0200 Subject: [PATCH 4/4] Some new features --- lomes-app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lomes-app.py b/lomes-app.py index 9c6c4ba..a8260e7 100755 --- a/lomes-app.py +++ b/lomes-app.py @@ -12,7 +12,7 @@ def index(): user = getpass.getuser() preTime = datetime.datetime.now() time = preTime.strftime("%H:%M:%S - %a %d.%m.%Y") - uname_fields = ("System", "Hostname", "Release") + uname_fields = ("System", "Hostname", "Kernel") uname_info = os.uname() sysinfo = "\n".join(f"{field}: {value} | " for field, value in zip(uname_fields, uname_info))