X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=cards%2Fexport_csv.sh;h=9ba8993372a239b197f50419d8ecfae61406ca98;hp=a1004f7083bd4c84231c65dbcb409fb9ab2ec699;hb=5b8d1b752ede7a6dc4250620ca58971447570a76;hpb=047067c2f45ea5ba54ad972a19d9682b36dfd347 diff --git a/cards/export_csv.sh b/cards/export_csv.sh index a1004f7..9ba8993 100755 --- a/cards/export_csv.sh +++ b/cards/export_csv.sh @@ -26,7 +26,12 @@ list_item() { seq 1 $cnt |while read n; do case $item in TEL) tel="$(pdi_value "$card" "$item" "$n" |unescape)" - [ "$tel" ] && printf '%s: %s\n' "$(l10n "TYPE=$(pdi_attrib "$card" "$item" "$n" TYPE)")" "$tel" + ttype="$(pdi_attrib "$card" "$item" "$n" TYPE)" + if [ "$tel" -a "$ttype" ]; then + printf '%s: %s\n' "$(l10n "TYPE=$ttype")" "$tel" + elif [ "$tel" ]; then + printf '%s\n' "$tel" + fi ;; GENDER) gen="$(pdi_value "$card" "$item" "$n" |unescape)"