Weitere Anpassungen der config.py

This commit is contained in:
2025-06-06 20:18:29 +02:00
parent 2040d6b9c3
commit 1b08c6426a
+24 -7
View File
@@ -5,34 +5,43 @@ from pydantic_settings import BaseSettings # , SettingsConfigDict
class JavaVm(BaseModel): class JavaVm(BaseModel):
version: str = "" version: str
path_to_binary_file: Path path_to_binary_file: Path
class DiffPdf(BaseModel): class DiffPdf(BaseModel):
version: str = "" version: str
path_to_binary_file: Path path_to_binary_file: Path
default_params: list[str] default_params: list[str]
output_file_extension: str = "pdf"
class SaxonJar(BaseModel): class SaxonJar(BaseModel):
version: str = "" version: str
path_to_jar_file: Path path_to_jar_file: Path
output_file_extension: str = "fo"
class ApacheFop(BaseModel): class ApacheFop(BaseModel):
version: str = "" version: str
path_to_dir: Path path_to_dir: Path
output_file_extension: str = "pdf"
class Project(BaseModel): class XslDir(BaseModel):
name: str
path_to_root_dir: Path
class PdfProject(BaseModel):
name: str name: str
project_dir: Path project_dir: Path
java_version: str java_version: str
diff_pdf_version: str diff_pdf_version: str
saxon_jar_version: str saxon_jar_version: str
apache_fop_version: str apache_fop_version: str
default_params: dict[str, str] = {} xsl_dir_name: str
default_xslt_params: dict[str, str] = {}
class AppSettings(BaseSettings): class AppSettings(BaseSettings):
@@ -40,4 +49,12 @@ class AppSettings(BaseSettings):
diff_pdfs: list[DiffPdf] diff_pdfs: list[DiffPdf]
saxon_jars: list[SaxonJar] saxon_jars: list[SaxonJar]
apache_fops: list[ApacheFop] apache_fops: list[ApacheFop]
projects: list[Project] = [] pdf_projects: list[PdfProject] = []
class PdfProjectSettings(BaseSettings):
"""
Speichert Projekt-Einstellungen direkt im Ordner des Projekts in einer klartextdatei
"""
pass