From: Neszt Tibor Date: Wed, 6 May 2020 14:59:58 +0000 (+0200) Subject: update.sh.sample added X-Git-Url: http://git.neszt.hu/?a=commitdiff_plain;h=a72dd99519151632b09a7e3b8a00bccfdd86e4e8;p=osm_address.git update.sh.sample added --- diff --git a/update.sh.sample b/update.sh.sample new file mode 100755 index 0000000..ee62800 --- /dev/null +++ b/update.sh.sample @@ -0,0 +1,30 @@ +#!/bin/bash + +echo -n "Started " +date + +rm -rf hungary-latest* + +wget http://download.geofabrik.de/europe/hungary-latest.osm.bz2 + +echo -n "Wget finished " +date + +bunzip2 hungary-latest.osm.bz2 + +echo -n "Bunzip finished " +date + +osmfilter hungary-latest.osm --keep="addr:postcode= and addr:city= and addr:street= addr:housenumber" > hungary-latest-filtered.osm + +echo -n "Osmfilter finished " +date + +osmconvert hungary-latest-filtered.osm --all-to-nodes --csv="addr:postcode addr:city addr:street addr:housenumber" --csv-headline --csv-separator=, | (LC_ALL=hu_HU.utf8 sort -t, -k1,1d -k2,2d -k3,3d -k4,4n) | uniq > hungary-latest-filtered.csv + +echo -n "Osmconvert finished " +date + +git add hungary-latest-filtered.csv +GIT_AUTHOR_EMAIL='example@example.com' GIT_COMMITTER_EMAIL='example@example.com' git commit -m 'hungary-latest-filtered.csv daily update' +git push