diff --git a/main.py b/main.py index 1e04d91..6d4d84e 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,8 @@ from flask_marshmallow import Marshmallow from flask_bootstrap import Bootstrap from wtforms import SubmitField, StringField, HiddenField, SelectField, IntegerField, TextAreaField, validators from flask_wtf import FlaskForm +import glob +from datetime import datetime import os import re import socket @@ -158,9 +160,15 @@ def about(): else: o['str']=o['str']+l except FileNotFoundError: + most_recent=0 + for file in glob.glob("./*"): + timestamp = os.path.getctime(file) + if timestamp < most_recent: + continue + most_recent = timestamp o={} o['date']="No known date" - o['str']='No commits to display (if this is DEV then last build is now)' + o['str']=f'No commits to display (if this is DEV then last change was {datetime.fromtimestamp(most_recent).replace(microsecond=0)})' # add last commit (or fake commit if no file) commits.append(o) diff --git a/templates/about.html b/templates/about.html index 2cf52de..633cbc2 100644 --- a/templates/about.html +++ b/templates/about.html @@ -1,27 +1,5 @@ - - - -
-