summaryrefslogtreecommitdiff
path: root/scripts/geojson/fetch_all_points.sh
diff options
context:
space:
mode:
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="";