X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=cards%2Fexport_csv.sh;h=6f17d1f404e4cb8e442eea62f5361b6e1e9c3f7f;hp=a1004f7083bd4c84231c65dbcb409fb9ab2ec699;hb=fb30c96d53c0da5ef0c40bf44341d1f9a6ebec0e;hpb=047067c2f45ea5ba54ad972a19d9682b36dfd347;ds=sidebyside diff --git a/cards/export_csv.sh b/cards/export_csv.sh index a1004f7..6f17d1f 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" -a "$ttype" ]; then + printf '%s\n' "$tel" + fi ;; GENDER) gen="$(pdi_value "$card" "$item" "$n" |unescape)"