This commit is contained in:
Zsolt Ero
2025-10-23 12:36:03 +02:00
parent aa9c32ea23
commit b0fc592f7c

View File

@@ -14,12 +14,22 @@ rclone_config = Path('../../config/rclone.conf')
url = 'https://download.mapterhorn.com/planet.pmtiles' url = 'https://download.mapterhorn.com/planet.pmtiles'
# Parse URL properly
parsed = urlparse(url) parsed = urlparse(url)
base_url = f'{parsed.scheme}://{parsed.netloc}' base_url = f'{parsed.scheme}://{parsed.netloc}'
path = parsed.path.lstrip('/') path = parsed.path.lstrip('/')
destination = './downloads' bucket_name = 'ofm-mapterhorn'
remote_name = 'remote'
destination = f'{remote_name}:{bucket_name}'
common_opts = [
# '--verbose=10',
# '--dump',
# 'headers',
'--progress',
'--config',
rclone_config,
]
subprocess.run( subprocess.run(
[ [
@@ -29,10 +39,8 @@ subprocess.run(
base_url, base_url,
f':http:{path}', f':http:{path}',
destination, destination,
'--dump', '--multi-thread-streams=8',
'headers', '--s3-chunk-size=100M',
'-vv', *common_opts,
'--config',
rclone_config,
] ]
) )