BASE_URL='http://dl3.osmand.net/download.php?standard=yes&file='
STOR=/mnt/vol1/algemeen/OsmAnd/maps
COUNTRIES="Italy Germany Austria Netherlands Switzerland Us_new-york
Us_south-carolina"
curl http://download.osmand.net/list.php | sed -e 's/<tr>/<tr>\'$'\n/g'
> osm_maps.html
for COUNTRY in ${COUNTRIES}; do
grep ${COUNTRY} osm_maps.html |sed -e 's/^.*file=//' | sed -e
's/">.*$//' |
while read MAP; do
echo "${MAP}"
( curl ${BASE_URL}${MAP} > ${STOR}/${MAP} 2>/dev/null )
if [[ ${MAP} =~ .zip$ ]]; then
unzip -o -d ${STOR} ${STOR}/${MAP} && rm ${STOR}/${MAP}
fi;
done
done
Have fun!
CP
Op 11-03-18 om 18:01 schreef We Ka:
Hello,
I am using Osmand+ (paid version) on several devices and I think it's
highly inefficient to download each map on each device, unnecessary
increasing data usage. Therefore, I'd like to download updated maps to
my pc and copy them onto the sdcards afterwards. I know I can do "wget
http://download.osmand.net/download.php?standard=yes&file=Germany_baden-wuerttemberg_europe_2.obf.zip"
to get one map, but there are two problems with that:
1. Automatic file name completion doesn't work, so I can't use a
command like "wget
http://download.osmand.net/download.php?standard=yes&file=Germany_*.zip",
I have to use a wget for each single file I want to download.
2. After downloading, the files are stored as
"download.php?standard=yes&file=Germany_bremen_europe_2.obf.zip" to
the local hard disk, and I have to remove the part in front of "Germany".
How can I solve these two problems? Is there any other way of limiting
the download to a minimum and still get the maps onto every device?
--
You received this message because you are subscribed to the Google
Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.