From 3af49d258e027c681b0fffc3a8a180fcca9620ba Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sun, 19 Apr 2020 17:28:41 +0200 Subject: scripts:streets: Add support for multiple tables --- scripts/geojson/fetch_streets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geojson/fetch_streets.sh b/scripts/geojson/fetch_streets.sh index 74a58aa..345c32d 100755 --- a/scripts/geojson/fetch_streets.sh +++ b/scripts/geojson/fetch_streets.sh @@ -3,7 +3,7 @@ # WARNING: This script is not yet production ready. The slightest error in the wikipage can throw it off. Handle with care. json=`curl 'https://wiki.linux-forks.de/mediawiki/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Maps:Streets'` -data=`echo $json | json_reformat | sed -e 's/\\\\n//g' -n -e 's/.*begin:mapdata\([^}]\+\).*/\1/p' | sed -e "s/|-|/}/g"` +data=`echo $json | json_reformat | sed -e 's/\\\\n//g' -n -e 's/begin:mapdata\([^}]\+\)/\1/gp' | sed -e "s/|-|/}/g"` echo "[" export IFS="}" -- cgit v1.2.3