summaryrefslogtreecommitdiff
path: root/scripts/geojson/fetch_shops.sh
blob: 84a9f3f04bc1675a84796daf4988f26b6f8b3b50 (plain)
1
2
3
4
5
6
7
8
9
10
#!/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 "{}]"