This commit is contained in:
hubobel 2025-12-28 20:23:51 +01:00
parent 178298340e
commit 5c4fe7922b
9 changed files with 32 additions and 53 deletions

View file

@ -1,4 +1,4 @@
#V0.1.1b @PC
#V@MAC
from __future__ import annotations
import requests
import json
@ -18,14 +18,12 @@ import subprocess
VERSION = "0.2.0"
APP_NAME = "Simbriefimport"
COMPANY = "Carsten"
COPYRIGHT = "© 2025 Carsten"
COMPANY = "HintergassenZeug"
COPYRIGHT = "© 2025 Hubobel"
VERSION_INFO_FILE = Path("version_info.txt")
VERSION_RUNTIME_FILE = Path("version_runtime.txt")
def _git_build_number() -> int:
try:
out = subprocess.check_output(
@ -458,15 +456,11 @@ def delete(pfad_ogg):
logging.info("Datei gelöscht: %s", pfad_ogg)
return None
host = os.getcwd()
Pfad = os.getcwd() + '/Announcements/'
_airports_cache = None
_airlines_cache = None
app_dir = get_app_dir()
setup_logging(app_dir, level=logging.INFO, console=True)
conf_file = app_dir / "Simbriefimport.conf"
@ -491,12 +485,9 @@ else:
conf_file
)
#passw = conf()
client = OpenAI(
api_key=passw['AI']['Token'])
# dict
if "--make-version" in sys.argv:
ver = ensure_version_info(force=True) # <-- MUSS True sein
print(ver)
@ -504,7 +495,6 @@ if "--make-version" in sys.argv:
Stimmung = str(stimmung())
(zfw, tow, payload, pax, metar_dest, metar_origin, fuel, distance, fl, flightlevel, flightnumber, airline,
aircraft_name, aircraft_icao, land_time, start_time, block, time, aircraft, dest_icao, dest_name, dest, origin_icao,
origin_name, origin, general, airline_icao, route, creationdate) = Simbriefimport()
@ -562,13 +552,11 @@ logging.info(
logging.info("--------------------------------------------------")
Pfad_wd = Pfad + airline_icao + '/'
ordnerneu = Path(Pfad_wd + '/neu/')
logging.info(Pfad_wd)
BACKUP(Pfad_wd)
#print(replaceFiles())
ordnerneu.mkdir(exist_ok=True)
logging.info("--------------------------------------------------")
@ -643,6 +631,5 @@ logging.info(" F E R T S C H ")
logging.info("--------------------------------------------------")
logging.info("Version: %s", get_runtime_version())
#VERSION = str("Version: %s.%s", VERSION, get_build())
ver = ensure_version_info() # erzeugt version_info.txt im Dev-Workspace
logging.info("Programmversion: %s", get_runtime_version())