From: Paul Hänsch Date: Mon, 15 Feb 2021 13:39:06 +0000 (+0100) Subject: list lobster relevant info X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=09e4f829f7f805e1a32fca983d160ef1c7324d9a;p=lobster list lobster relevant info --- diff --git a/cards/export_csv.sh b/cards/export_csv.sh index dd1d6e7..d6185c8 100755 --- a/cards/export_csv.sh +++ b/cards/export_csv.sh @@ -45,13 +45,13 @@ list_item() { printf '%s\r\n' \ 'Content-Type: text/csv; charset=utf-8' \ - 'Content-Disposition: inline; filename="confetti_export_'$(date +%F_%T)'.csv"' \ + 'Content-Disposition: inline; filename="lobster_export_'$(date +%F_%T)'.csv"' \ '' printf '"%s";"%s";"%s";"%s";"%s";"%s";"%s";"%s";"%s"\n' \ "$(l10n FN)" "$(l10n GENDER)" "$(l10n BDAY)" \ "$(l10n TEL)" "$(l10n EMAIL)" "$(l10n ADR)" \ - "$(l10n NOTE)" "$(l10n courses)" "$(l10n CATEGORIES)" \ + "$(l10n NOTE)" "$(l10n hi_company)" "$(l10n hi_number)" \ | sed -E 's;­\;;;g;' @@ -59,8 +59,12 @@ filter_cards \ | order_cards \ | while read cardfile; do card="$(pdi_load "$cardfile")" + IFS=';' read -r h_comp h_num h_stat <<-EOF + $(pdi_value "$card" X-HEALTH-INSURANCE |sed -E 's;";\\";g;') + EOF + printf '"%s";"%s";"%s";"%s";"%s";"%s";"%s";"%s";"%s"\n' \ "$(list_item FN)" "$(list_item GENDER)" "$(list_item BDAY)" \ "$(list_item TEL)" "$(list_item EMAIL)" "$(list_item ADR)" \ - "$(list_item NOTE)" "$(list_attendance)" "$(list_item CATEGORIES)" + "$(list_item NOTE)" "$(pdi_unescape "$h_comp")" "$(pdi_unescape "$h_num")" done