From d492b9f7c1cb2c1304df58b24986fea903adf928 Mon Sep 17 00:00:00 2001 From: fordprefect Date: Fri, 8 Jan 2021 14:45:34 +0100 Subject: [PATCH] some changes --- .gitignore | 2 +- pin.run | 99 +++++++++++++++++++++++++++--------------------------- style.css | 4 +-- 3 files changed, 53 insertions(+), 52 deletions(-) diff --git a/.gitignore b/.gitignore index 151a12d..ab8ec4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -db.txt +db.cfg diff --git a/pin.run b/pin.run index bc15ef0..c15f535 100755 --- a/pin.run +++ b/pin.run @@ -9,7 +9,7 @@ from datetime import datetime #locale.setlocale(locale.LC_TIME, "de_DE") origin_url = "https://augustiner-kantorei.de/pinnwand" -database = "db.txt" +database = "db.cfg" def get_arguments(): """Wrapper for cgi-environment. @@ -60,7 +60,7 @@ with open(database, "r") as f: table = "" for line in content: tstamp, ort, name, comment, timestamp = line.split("\t") - if float(tstamp) < now: + if float(tstamp) < now - 60*60: continue zeit = datetime.fromtimestamp(float(tstamp)) hzeit = datetime.strftime(zeit, "%a, %d.%m.%Y %H:%M") @@ -75,8 +75,9 @@ print(f"""

Überschrift

Terminangebote

+Termine werden eine Stunde nach Erreichen des Termins automatisch nicht mehr angezeigt.
- + {table}
ZeitOrtNameBemerkung
ZeitpunktTreffpunktNameBemerkung
@@ -89,48 +90,6 @@ if oversize: else: print("""
- - : - -   -   Zeit (hh:mm DD.MM.YYYY)
-  Ort
-  Name
-  Bemerkung
+   + + : + +   Zeitpunkt (Tag. Monat. Jahr Stunde:Minute)
+  Treffpunkt
+  Name
+  Bemerkung
""") diff --git a/style.css b/style.css index 477118f..5982fe6 100644 --- a/style.css +++ b/style.css @@ -2,8 +2,8 @@ div.box { color:#cecece; background-image: url('https://dukun.de/linen_login.jpg'); background-size: 100%; - width: 100%; - height: 90%; + width: 90%; + height: 87%; margin: 0px auto; overflow: auto; padding:10px;