summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakecolumns.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/makecolumns.sh b/makecolumns.sh
index 2b65307..e10165d 100755
--- a/makecolumns.sh
+++ b/makecolumns.sh
@@ -316,7 +316,7 @@ handle_format_version_3() {
316 paste 10_Postleitzahl 11_Ort 07_Strasse 08_Hausnummer | map_coords 90_Geokoordinaten_hnr | convert_coords > 16_Koordinaten 316 paste 10_Postleitzahl 11_Ort 07_Strasse 08_Hausnummer | map_coords 90_Geokoordinaten_hnr | convert_coords > 16_Koordinaten
317 printf "done.\n" 317 printf "done.\n"
318 else 318 else
319 tr -dC '\n' < 01_Flags > 16_Koordinaten 319 sed $'s:.*:\t' 01_Flags > 16_Koordinaten
320 fi 320 fi
321 321
322 if [ -f "${braid}" ]; then 322 if [ -f "${braid}" ]; then
@@ -413,6 +413,8 @@ handle_format_version_4() {
413 printf "Looking up geo coordinates for each phonebook entry ... " 413 printf "Looking up geo coordinates for each phonebook entry ... "
414 paste 10_Postleitzahl 07_Strasse | map_coords 91_Geokoordinaten_str | convert_coords > 16_Koordinaten 414 paste 10_Postleitzahl 07_Strasse | map_coords 91_Geokoordinaten_str | convert_coords > 16_Koordinaten
415 printf "done.\n" 415 printf "done.\n"
416 else
417 sed $'s:.*:\t' 01_Flags > 16_Koordinaten
416 fi 418 fi
417 rm file_* 419 rm file_*
418 420
@@ -432,10 +434,14 @@ handle_format_version_4() {
432tidy_streetnames () { 434tidy_streetnames () {
433 streets="$1" 435 streets="$1"
434 436
437 printf "Tyding up streetnames ... "
438
435 # Replace any dots at end of line by a single one 439 # Replace any dots at end of line by a single one
436 # finish any str abbreviation without a period with a period 440 # finish any str abbreviation without a period with a period
437 sed -E -i.bak 's/\.+/./g;s/(S|s)tr( |:)?$/\1tr./' ${streets} 441 sed -E -i.bak 's/\.+/./g;s/(S|s)tr( |:)?$/\1tr./;s/ -$/ Str./;s/-$/str./' ${streets}
438 rm "${streets}".bak 442 rm "${streets}".bak
443
444 printf "done.\n"
439} 445}
440 446
441# JOT <format> <begin> <end> <step> 447# JOT <format> <begin> <end> <step>