From d70b08533bc6f60bf462bb993f331d2d99a3216e Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Thu, 12 Aug 2021 15:08:33 +0200 Subject: [PATCH] messages improved --- sp_replace_typ.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sp_replace_typ.py b/sp_replace_typ.py index 27b7433..1cdb6e9 100755 --- a/sp_replace_typ.py +++ b/sp_replace_typ.py @@ -13,10 +13,6 @@ GMT = '' def get_famid_name_from_imgfile(imgfile_path): if os.path.isfile(imgfile_path) == False: sys.exit("Datei nicht gefunden. Bitte geben Sie eine gültige .img-Datei an.") - # fid = subprocess.run(f'{GMT} -i {imgfile_path} | grep ", FID " | cut -d\',\' -f 2 | sed -e \'s/ FID //\'', - # shell=True, capture_output=True, text=True).stdout.strip() - # name = subprocess.run(f'{GMT} -i {imgfile_path} | grep ", FID " | cut -d\',\' -f 3 | sed -e \'s/ //\'', - # shell=True, capture_output=True, text=True).stdout.strip() # output = subprocess.run( # [f'{GMT} -i "{imgfile_path}"'], shell=True, capture_output=True, text=True).stdout @@ -30,7 +26,7 @@ def get_famid_name_from_imgfile(imgfile_path): match = re.search(pattern, output) if not match: sys.exit( - f"Keine gültige gmapsupp-Datei: {imgfile_path}\nBitte geben Sie eine gültige Datei an.") + f"Keine gültige gmapsupp-Datei!\nBitte geben Sie eine valide Datei für Garmin/QMapShack an.") fid = str(match.group(1), 'UTF-8').strip() name = str(match.group(2), 'UTF-8').strip() @@ -124,7 +120,8 @@ def ask_for_visualization(): def main(): parser = argparse.ArgumentParser( - description='Das Programm passt die Darstellung der Garmin-"Speichenkarte" an. ') + description='Das Programm passt die Darstellung der "Speichenkarte" ' + 'für Garmin-Geräte/QMapShack an. ') parser.add_argument('imgfile', type=str, help='Garmin gmapsupp-Datei') parser.add_argument('-t', '--typdir', type=str, help='Verzeichnis mit den TYP-Dateien')