summaryrefslogtreecommitdiff
path: root/scripts/geojson/fetch_all_points.sh
diff options
context:
space:
mode:
authorMarkus Koch <markus@notsyncing.net>2020-05-02 14:17:49 +0200
committerMarkus Koch <markus@notsyncing.net>2020-05-02 14:17:49 +0200
commit3610b8b610dee65ac318c2a71b18a03f6cd573e5 (patch)
tree6ed2152e17ab7bbe157c19178fb1f4dbcb1de5e8 /scripts/geojson/fetch_all_points.sh
parent806348e67651bbdf5df8b0919fc412d7140a1b43 (diff)
parent3d0afc953ee0db0dc1d950724a0f9cd342e15361 (diff)
downloadlifomapserver-3610b8b610dee65ac318c2a71b18a03f6cd573e5.tar.gz
lifomapserver-3610b8b610dee65ac318c2a71b18a03f6cd573e5.tar.bz2
lifomapserver-3610b8b610dee65ac318c2a71b18a03f6cd573e5.zip
Merge branch 'dev' of git.notsyncing.net:markus/lifomapserver into dev
Diffstat (limited to 'scripts/geojson/fetch_all_points.sh')
-rwxr-xr-xscripts/geojson/fetch_all_points.sh19
1 files changed, 3 insertions, 16 deletions
diff --git a/scripts/geojson/fetch_all_points.sh b/scripts/geojson/fetch_all_points.sh
index 81c46e0..d1ec504 100755
--- a/scripts/geojson/fetch_all_points.sh
+++ b/scripts/geojson/fetch_all_points.sh
@@ -22,22 +22,9 @@ for line in $data; do
fi
if [[ "$title" != "" && "$coords" != "" ]]; then
echo "{\"type\": \"Feature\", \"properties\": {\"name\": \"$title\","
- echo -n "\"categories\": ["
- urltitle=`echo "$title" | sed 's/ /%20/g'`
- cjson=`curl -s "https://wiki.linux-forks.de/mediawiki/api.php?action=query&format=json&titles=$urltitle&prop=categories" | json_reformat -m`
- categories=`echo "$cjson" | sed -n 's/.*\("categories":[^]]\+\).*/\1/p'`;
- IFS='}'
- fc="true";
- for entry in $categories; do
- if [[ "$fc" != "true" ]]; then
- echo -n ",";
- fi
- category=`echo "$entry" | sed -n 's/.*Category:\([^"]\+\).*/\1/p'`
- echo -n "\"$category\"";
- fc="false";
- done;
- IFS=$'\n'
- echo "]},";
+ urltitle=`echo "$title" | sed 's/ /_/g'`
+ ./get_rendered_meta.sh "https://wiki.linux-forks.de/mediawiki/index.php/$urltitle"
+ echo "},";
echo "\"geometry\": {\"type\": \"Point\", \"coordinates\": [$coords]}},";
title="";
coords="";