summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakecolumns.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/makecolumns.sh b/makecolumns.sh
index 429d926..2b65307 100755
--- a/makecolumns.sh
+++ b/makecolumns.sh
@@ -112,7 +112,7 @@ handle_format_version_1() {
112 mv 07_unknown 07_Strasse 112 mv 07_unknown 07_Strasse
113 mv 08_unknown 08_Hausnummer 113 mv 08_unknown 08_Hausnummer
114 mv 09_unknown 04_Namenszusatz 114 mv 09_unknown 04_Namenszusatz
115 mv 10_unknown 09_Fax_Verweise 115 mv 10_unknown 09_Verweise
116 mv 11_unknown 12_Vorwahl 116 mv 11_unknown 12_Vorwahl
117 mv 12_unknown 13_Rufnummer 117 mv 12_unknown 13_Rufnummer
118 mv 13_unknown 11_Ort 118 mv 13_unknown 11_Ort
@@ -155,7 +155,7 @@ handle_format_version_2() {
155 mv 12_unknown 06_Ortszusatz 155 mv 12_unknown 06_Ortszusatz
156 mv 08_unknown 07_Strasse 156 mv 08_unknown 07_Strasse
157 mv 10_unknown 08_Hausnummer 157 mv 10_unknown 08_Hausnummer
158 mv 13_unknown 09_Fax_Verweise 158 mv 13_unknown 09_Verweise
159 mv 02_unknown 10_Postleitzahl 159 mv 02_unknown 10_Postleitzahl
160 mv 15_unknown 11_Ort 160 mv 15_unknown 11_Ort
161 mv 09_unknown 11_Ort_Gemeinde 161 mv 09_unknown 11_Ort_Gemeinde
@@ -227,7 +227,7 @@ handle_format_version_3() {
227 cut -c 1 < 01_unknown > 01_Flags 227 cut -c 1 < 01_unknown > 01_Flags
228 cut -c 2- < 01_unknown > 02_Nachname 228 cut -c 2- < 01_unknown > 02_Nachname
229 fi 229 fi
230 #rm 01_unknown 230 rm 01_unknown
231 printf "done.\n" 231 printf "done.\n"
232 232
233 printf "Splitting decompress vname chunks into their columns ... " 233 printf "Splitting decompress vname chunks into their columns ... "
@@ -265,8 +265,12 @@ handle_format_version_3() {
265 mv 11_unknown 11_Ort 265 mv 11_unknown 11_Ort
266 mv 12_unknown 12_Vorwahl 266 mv 12_unknown 12_Vorwahl
267 mv 13_unknown 13_Rufnummer 267 mv 13_unknown 13_Rufnummer
268 [ -f 14_unknown ] && mv 14_unknown 14_Email 268 if [ -f 14_unknown -a -f 15_unknown ]; then
269 [ -f 15_unknown ] && mv 15_unknown 15_Webadresse 269 paste 15_unknown 14_unknown | sed 's/[[:space:]]$//g' > 14_15_Email_Webadresse
270 rm 14_unknown 15_unknown
271 else
272 tr -dC '\n' < 01_Flags > 14_15_Email_Webadresse
273 fi
270 274
271 printf "Normalizing flags ... " 275 printf "Normalizing flags ... "
272 sed -i.bak -e s:^1$:00:g -e s:^3$:01:g -e s:^2$:02:g 01_Flags 276 sed -i.bak -e s:^1$:00:g -e s:^3$:01:g -e s:^2$:02:g 01_Flags
@@ -311,6 +315,8 @@ handle_format_version_3() {
311 rm 90_Geokoordinaten_hnr_raw 315 rm 90_Geokoordinaten_hnr_raw
312 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
313 printf "done.\n" 317 printf "done.\n"
318 else
319 tr -dC '\n' < 01_Flags > 16_Koordinaten
314 fi 320 fi
315 321
316 if [ -f "${braid}" ]; then 322 if [ -f "${braid}" ]; then