feat: Add build date functionality and enhance documentation pages

- Added a script to save the build date during Docker image build.
- Introduced a build_date property in the Settings class to retrieve the build date from the environment or file.
- Enhanced the homepage to display system statistics including processed files and active integrations.
- Updated the about page with a comprehensive list of features.
- Added new privacy, imprint, cookies, and terms pages with relevant content.
- Improved the license page with related information links.
- Refactored the base template for better mobile responsiveness and footer links.
This commit is contained in:
Christian Krakau-Louis
2025-04-07 00:05:49 +02:00
parent e669dc8553
commit b93c781339
12 changed files with 584 additions and 55 deletions
+24
View File
@@ -3,6 +3,7 @@
from pydantic_settings import BaseSettings
from typing import Optional, List, Dict, Any
import os
from datetime import datetime
class Settings(BaseSettings):
database_url: str
@@ -121,6 +122,29 @@ class Settings(BaseSettings):
# Feature flags
allow_file_delete: bool = True # Default to allowing file deletion from database
# Get build date from environment or file
@property
def build_date(self) -> str:
# First try to get build date from environment
env_build_date = os.environ.get("BUILD_DATE")
if env_build_date:
return env_build_date
# Then try to get build date from BUILD_DATE file
build_date_file = os.path.join(os.path.dirname(os.path.dirname(__file__)), "BUILD_DATE")
if os.path.exists(build_date_file):
with open(build_date_file, "r") as f:
return f.read().strip()
# If a timestamp file doesn't exist, try to get the app.py creation/modification time
app_file = os.path.join(os.path.dirname(__file__), "app.py")
if os.path.exists(app_file):
timestamp = os.path.getmtime(app_file)
return datetime.fromtimestamp(timestamp).strftime("%B %d, %Y")
# Default to current date if not found elsewhere
return datetime.now().strftime("%B %d, %Y")
# Get version from file or environment
@property
def version(self) -> str: