diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2019-02-05 17:04:13 +0100 | 
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2019-02-05 17:04:13 +0100 | 
| commit | 380b982004e35e14f6b2ad5c5d82f33c6a3c2b4e (patch) | |
| tree | 0e8284aff8165a04f89b9f7a5ce72642b0a36701 | |
| parent | 001acb04b78393acbd69d02a9a4d70f878d921d4 (diff) | |
Add proper tabs in empty koordinaten files
| -rwxr-xr-x | makecolumns.sh | 10 | 
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() { | |||
| 432 | tidy_streetnames () { | 434 | tidy_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> | 
