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"""
| Zeit | Ort | Name | Bemerkung |
|---|---|---|---|
| Zeitpunkt | Treffpunkt | Name | Bemerkung |