first commit of shared_libs coarse build

This commit is contained in:
2025-06-04 00:40:07 +02:00
parent 25355baf37
commit d1521ac9f5
8 changed files with 1452 additions and 0 deletions

22
file_and_dir_ensure.py Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/python3
"""Utility functions for setting up the application."""
from logview_app_config import AppConfig
from pathlib import Path
# Logging
LOG_DIR = Path.home() / ".local/share/lxlogs"
Path(LOG_DIR).mkdir(parents=True, exist_ok=True)
LOG_FILE_PATH = LOG_DIR / "logviewer.log"
def prepare_app_environment() -> None:
"""Ensures that all required files and directories exist."""
AppConfig.ensure_directories()
AppConfig.create_default_settings()
AppConfig.ensure_log()
if __name__ == "__main__":
prepare_app_environment()