Pfad
This commit is contained in:
parent
05c21afb28
commit
52dd0eb5a7
1 changed files with 24 additions and 4 deletions
|
|
@ -106,7 +106,8 @@ def WelcomePilot():
|
|||
"Startflughafen: " + origin.get("icao_code"),
|
||||
"Du bist von deiner Art her:" + str(stimmung()),
|
||||
"Wetter am Ziel" + metar_dest,
|
||||
"Übersetze immer die ICAO Abkürzungen",
|
||||
"Verwende nie die ICAO Abkürzungen, übersetze diese.",
|
||||
"Erwähne 2 bis 3 Sehenswürdigkeiten, die auf dem Flug von Start zum Ziel überflogen werden",
|
||||
"Flugnummer" + general.get("flight_number"),
|
||||
"Wetter am Start" + metar_origin}
|
||||
|
||||
|
|
@ -170,7 +171,17 @@ def Simbriefimport():
|
|||
return (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)
|
||||
|
||||
def txtSave(Datei, Inhalt):
|
||||
voice = None
|
||||
Inhalt = Inhalt.replace("„", "").replace("“", "").replace('"', "")
|
||||
with open(Datei, "r", encoding="utf-8") as f:
|
||||
erste_zeile = f.readline().strip()
|
||||
if erste_zeile.startswith("##Voice:"):
|
||||
voice = erste_zeile + "\n"
|
||||
Inhalt = voice + Inhalt
|
||||
with open(Datei, 'w', encoding="utf-8") as e:
|
||||
e.write(Inhalt)
|
||||
return None
|
||||
host = os.getcwd()
|
||||
|
||||
Pfad = os.getcwd() + '/Universal_txts/Windows'
|
||||
|
|
@ -223,9 +234,18 @@ print(replaceFiles())
|
|||
|
||||
metarCabin = METAR()
|
||||
print(metarCabin.choices[0].message.content)
|
||||
|
||||
metar = metarCabin.choices[0].message.content
|
||||
metar = "\n".join(filter(None, map(str.strip, metar.splitlines())))
|
||||
|
||||
welcomePilot = WelcomePilot()
|
||||
print(welcomePilot.choices[0].message.content)
|
||||
|
||||
Inhalt = welcomePilot.choices[0].message.content
|
||||
Inhalt = "\n".join(filter(None, map(str.strip, Inhalt.splitlines())))
|
||||
print(Inhalt)
|
||||
print(os.getcwd())
|
||||
|
||||
Pfad = os.getcwd() + '/Universal_txts/Windows/neu/BoardingWelcomePilot.txt'
|
||||
txtSave(Pfad, Inhalt)
|
||||
|
||||
Pfad = os.getcwd() + '/Universal_txts/Windows/neu/FastenSeatbelt.txt'
|
||||
txtSave(Pfad, metar)
|
||||
Loading…
Add table
Add a link
Reference in a new issue