This commit is contained in:
Zsolt Ero
2025-10-23 11:43:56 +02:00
parent 82458b9db4
commit 4a322a8ddd

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.13"
# dependencies = [
#
# ]
# ///
import subprocess
from pathlib import Path
from urllib.parse import urlparse
rclone_config = Path('../../config/rclone.conf')
url = 'https://download.mapterhorn.com/planet.pmtiles'
# Parse URL properly
parsed = urlparse(url)
base_url = f'{parsed.scheme}://{parsed.netloc}'
path = parsed.path.lstrip('/')
destination = '.'
subprocess.run(
[
'rclone',
'ls',
'--http-url',
base_url,
f':http:{path}',
# destination,
'--dump',
'headers',
'-vv',
'--config',
rclone_config,
]
)