Frachtarray hinzugefügt
This commit is contained in:
parent
f7185c5d1c
commit
ba7c9ecf7f
2 changed files with 11 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ COPYRIGHT = "© 2025 Hubobel"
|
||||||
|
|
||||||
VERSION_INFO_FILE = Path("version_info.txt")
|
VERSION_INFO_FILE = Path("version_info.txt")
|
||||||
VERSION_RUNTIME_FILE = Path("version_runtime.txt")
|
VERSION_RUNTIME_FILE = Path("version_runtime.txt")
|
||||||
|
Fracht = False
|
||||||
def _git_build_number() -> int:
|
def _git_build_number() -> int:
|
||||||
try:
|
try:
|
||||||
out = subprocess.check_output(
|
out = subprocess.check_output(
|
||||||
|
|
@ -366,6 +366,8 @@ def replaceFiles():
|
||||||
return files
|
return files
|
||||||
def Simbriefimport():
|
def Simbriefimport():
|
||||||
#USERNAME = "hubobel"
|
#USERNAME = "hubobel"
|
||||||
|
Fracht = False
|
||||||
|
|
||||||
USERNAME = passw['Prompt']['Simbrief']
|
USERNAME = passw['Prompt']['Simbrief']
|
||||||
URL = "https://www.simbrief.com/api/xml.fetcher.php"
|
URL = "https://www.simbrief.com/api/xml.fetcher.php"
|
||||||
params = {
|
params = {
|
||||||
|
|
@ -413,9 +415,11 @@ def Simbriefimport():
|
||||||
zfw = data['weights']['est_zfw']
|
zfw = data['weights']['est_zfw']
|
||||||
airline_icao = general.get("icao_airline")
|
airline_icao = general.get("icao_airline")
|
||||||
route = data['general']['route']
|
route = data['general']['route']
|
||||||
|
if airline_icao in passw['Fracht']:
|
||||||
|
Fracht = True
|
||||||
#print(data.keys())
|
#print(data.keys())
|
||||||
#print(data['general'])
|
#print(data['general'])
|
||||||
return (zfw, tow, payload, pax, metar_dest, metar_origin, fuel, distance, fl, flightlevel, flightnumber, airline,
|
return (Fracht, 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,
|
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)
|
origin_icao, origin_name, origin, general, airline_icao, route, creationdate)
|
||||||
def txtSave(Datei, Inhalt):
|
def txtSave(Datei, Inhalt):
|
||||||
|
|
@ -517,7 +521,7 @@ if "--make-version" in sys.argv:
|
||||||
|
|
||||||
Stimmung = str(stimmung())
|
Stimmung = str(stimmung())
|
||||||
|
|
||||||
(zfw, tow, payload, pax, metar_dest, metar_origin, fuel, distance, fl, flightlevel, flightnumber, airline,
|
(Fracht, 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,
|
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()
|
origin_name, origin, general, airline_icao, route, creationdate) = Simbriefimport()
|
||||||
logging.info("--------------------------------------------------")
|
logging.info("--------------------------------------------------")
|
||||||
|
|
@ -552,6 +556,7 @@ logging.info("Geplanter Start: %s UTC", start_time)
|
||||||
logging.info("Geplante Landung: %s UTC", land_time)
|
logging.info("Geplante Landung: %s UTC", land_time)
|
||||||
|
|
||||||
logging.info("Fluggerät: %s (%s)", aircraft_icao, aircraft_name)
|
logging.info("Fluggerät: %s (%s)", aircraft_icao, aircraft_name)
|
||||||
|
|
||||||
logging.info("Cruiselevel: FL%s", fl)
|
logging.info("Cruiselevel: FL%s", fl)
|
||||||
logging.info("Entfernung: %s nm", distance)
|
logging.info("Entfernung: %s nm", distance)
|
||||||
|
|
||||||
|
|
@ -584,7 +589,7 @@ ordnerneu.mkdir(exist_ok=True)
|
||||||
logging.info("--------------------------------------------------")
|
logging.info("--------------------------------------------------")
|
||||||
logging.info("START .txt Erzeugung ")
|
logging.info("START .txt Erzeugung ")
|
||||||
logging.info("--------------------------------------------------")
|
logging.info("--------------------------------------------------")
|
||||||
debug = False
|
debug = True
|
||||||
if debug == False:
|
if debug == False:
|
||||||
metarCabin = METAR()
|
metarCabin = METAR()
|
||||||
metar = metarCabin.choices[0].message.content
|
metar = metarCabin.choices[0].message.content
|
||||||
|
|
@ -680,3 +685,4 @@ logging.info("--------------------------------------------------")
|
||||||
logging.info("Version: %s", get_runtime_version())
|
logging.info("Version: %s", get_runtime_version())
|
||||||
ver = ensure_version_info() # erzeugt version_info.txt im Dev-Workspace
|
ver = ensure_version_info() # erzeugt version_info.txt im Dev-Workspace
|
||||||
logging.info("Programmversion: %s", get_runtime_version())
|
logging.info("Programmversion: %s", get_runtime_version())
|
||||||
|
print(Fracht)
|
||||||
|
|
|
||||||
|
|
@ -289,4 +289,5 @@
|
||||||
"Smirnov",
|
"Smirnov",
|
||||||
"Volkov"
|
"Volkov"
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue