From 53a1b82784398bb0047b6fc60740da01f78a7630 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Sat, 15 Jan 2022 13:18:16 +0100 Subject: [PATCH 1/4] new run configuration for malta to only merge files --- .vscode/launch.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 694f262a..e4cee821 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -115,6 +115,23 @@ "100" ] }, + { + "name": "malta-only-merge", + "type": "python", + "request": "launch", + "program": "${workspaceRoot}/wahoo_map_creator.py", + "console": "integratedTerminal", + "args": [ + "malta", + "-tag", + "tag-wahoo.xml", + "-fp", + "-c", + "-md", + "100", + "-om" + ] + }, { "name": "malta-geofabrik", "type": "python", From d58770f115edc6c444d9439704ace992f3ba835a Mon Sep 17 00:00:00 2001 From: Benjamin Date: Sat, 15 Jan 2022 13:21:19 +0100 Subject: [PATCH 2/4] macOS adjustment: do not include full path in zip file --- common_python/osm_maps_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_python/osm_maps_functions.py b/common_python/osm_maps_functions.py index 57f3da4f..1138fd6b 100644 --- a/common_python/osm_maps_functions.py +++ b/common_python/osm_maps_functions.py @@ -603,7 +603,7 @@ def make_and_zip_files(self, keep_map_folders, extension): cmd = ['zip', '-r'] cmd.extend( - [folder_name + '.zip', os.path.join(fd_fct.OUTPUT_DIR, folder_name)]) + [folder_name + '.zip', folder_name]) # cmd.append(folder_name + '.zip') # cmd.append(os.path.join(fd_fct.OUTPUT_DIR, folder_name)) From 41751921196a7a3db11c3714d4086e0d36911b6b Mon Sep 17 00:00:00 2001 From: Benjamin Kreuscher Date: Sat, 15 Jan 2022 13:38:04 +0100 Subject: [PATCH 3/4] Windows adjustment: do not include country folder in zip file --- common_python/osm_maps_functions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common_python/osm_maps_functions.py b/common_python/osm_maps_functions.py index 1138fd6b..8e4fa928 100644 --- a/common_python/osm_maps_functions.py +++ b/common_python/osm_maps_functions.py @@ -598,12 +598,15 @@ def make_and_zip_files(self, keep_map_folders, extension): path_7za = os.path.join(fd_fct.TOOLING_WIN_DIR, '7za') cmd = [path_7za, 'a', '-tzip'] + cmd.extend( + [folder_name + '.zip', os.path.join(".", folder_name, "*")]) + # Non-Windows else: cmd = ['zip', '-r'] - cmd.extend( - [folder_name + '.zip', folder_name]) + cmd.extend( + [folder_name + '.zip', folder_name]) # cmd.append(folder_name + '.zip') # cmd.append(os.path.join(fd_fct.OUTPUT_DIR, folder_name)) From 6beabf90aa5b97ef586403b740d468a40f1f491a Mon Sep 17 00:00:00 2001 From: Benjamin Date: Sat, 15 Jan 2022 13:44:27 +0100 Subject: [PATCH 4/4] remove unused comment --- common_python/osm_maps_functions.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/common_python/osm_maps_functions.py b/common_python/osm_maps_functions.py index 8e4fa928..6a5b957d 100644 --- a/common_python/osm_maps_functions.py +++ b/common_python/osm_maps_functions.py @@ -607,8 +607,6 @@ def make_and_zip_files(self, keep_map_folders, extension): cmd.extend( [folder_name + '.zip', folder_name]) - # cmd.append(folder_name + '.zip') - # cmd.append(os.path.join(fd_fct.OUTPUT_DIR, folder_name)) subprocess.run(cmd, cwd=fd_fct.OUTPUT_DIR, check=True)