Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

CoMaps: change about how maps are stored

CoMaps recently updated and added an interesting feature:

New in version 2026.06.05-11-FDroid

  • OpenStreetMap data as of June 3 and further weekly updates via "Check for updates" button

What that means for a comaps mirror is that you have to store the files in a slightly different directory structure.

Comaps might not have any separate instances of map updates yet. The app tries to fetch /mirror/comaps/meta/maps.json but the CDN doesn't have that. Now I have to run the script with:

CODE="2026.04.05/260603" /mnt/public/Support/Programs/comaps/fetch-latest-usual-maps.sh

The CODE includes a value from https://codeberg.org/bgstack15/comaps/src/branch/feature/trust-user-provided-root-certs/private.h string MAP_SERIES.

files/2026/listings/fetch-latest-usual-maps.sh (Source)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# Startdate: 2026-03-16-2 11:18
# Purpose: Download all the usual maps for CoMaps local mirror
# Documentation: comaps-README.md
#    I rate-limit to be nice, but it is a CDN so it probably doesn't matter.
# Alternatives:
#    rsync? Not sure if allowed

# code will be in YYMMDD format.
code="${CODE:-$( date -d "$( curl https://f-droid.org/en/packages/app.comaps.fdroid/ | grep -o -iE 'openstreetmap data as of \w+ \w+' | awk '{print $(NF-1),$NF}' )" "+%g%m%d" )}"
td="/mnt/mirror/comaps/maps/${code}"
mkdir -p "${td}" ; cd "${td}"
echo "Using path ${td}"
for word in "World" "WorldCoasts" \
    "US_Maryland_Baltimore" \
; # additional maps above
do
    wget --limit-rate=1.1M --continue "https://cdn-fi-1.comaps.app/maps/${code}/${word}.mwm"
done

Comments