diff options
author | ywang <yw05@forksworld.de> | 2020-04-15 19:14:03 +0200 |
---|---|---|
committer | Gabriel PĂ©rez-Cerezo <gabriel@gpcf.eu> | 2020-04-15 19:23:52 +0200 |
commit | 2678fe55057401854743a29b6c0a795d81a0f3a0 (patch) | |
tree | d0a1800e0b9b82295ab9da53c95d86ee423bf6e7 /scripts/geojson/fetch_single.sh | |
parent | 88feb87009bdc301a9998f9c9952b4c847fd2ea1 (diff) | |
download | lifomapserver-2678fe55057401854743a29b6c0a795d81a0f3a0.tar.gz lifomapserver-2678fe55057401854743a29b6c0a795d81a0f3a0.tar.bz2 lifomapserver-2678fe55057401854743a29b6c0a795d81a0f3a0.zip |
Fetch formatted wiki text instead of raw wiki markup
Diffstat (limited to 'scripts/geojson/fetch_single.sh')
-rwxr-xr-x | scripts/geojson/fetch_single.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/geojson/fetch_single.sh b/scripts/geojson/fetch_single.sh index e669f68..0b3442e 100755 --- a/scripts/geojson/fetch_single.sh +++ b/scripts/geojson/fetch_single.sh @@ -11,8 +11,8 @@ coords=`echo "$json" | sed -n "s/.*coordinates = {{Co|\([^}]*\).*/\1/p"` coord_x=`echo "$coords" | sed -n "s/\([^|]\+\).*/\1/p"` coord_y=`echo "$coords" | sed -n "s/.*|\([^|]\+\).*/\1/p"` -description=`echo $json | sed -n "s/.*coordinates.*[^']*'''\([^']*\)'''\([^\.]*\).*/\1\2./p" -` +description=`curl "https://wiki.linux-forks.de/mediawiki/api.php?action=parse&page=$1§ion=0&prop=text&format=json" 2>/dev/null | sed -z -n "s/<\/p><p>//g;s/.*<p>\(.*\)<\/p>.*/\1/p"` + if [[ "$coord_x" != "" && "$coord_y" != "" ]]; then echo "{\ |