update.sh.sample added
authorNeszt Tibor <neszt.tibor@euronetrt.hu>
Wed, 6 May 2020 14:59:58 +0000 (16:59 +0200)
committerNeszt Tibor <neszt.tibor@euronetrt.hu>
Wed, 6 May 2020 14:59:58 +0000 (16:59 +0200)
update.sh.sample [new file with mode: 0755]

diff --git a/update.sh.sample b/update.sh.sample
new file mode 100755 (executable)
index 0000000..ee62800
--- /dev/null
@@ -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