lifo-dijkstraserv/scripts/geojson/fetch_shops.sh

11 lines
353 B
Bash
Raw Normal View History

#!/bin/bash
json=`curl 'https://wiki.linux-forks.de/mediawiki/api.php?action=query&format=json&list=categorymembers&cmtitle=Category:Shops&cmlimit=1000' 2>/dev/null`
cities=`echo "$json" | json_reformat | sed -n 's/.*"title":\s*"\([^"]*\).*/\1/p' | tr ' ' '_' | tr '\n' ' '`
echo "["
for city in $cities; do
./fetch_single.sh "$city"
done
echo "{}]"