From 09e4f829f7f805e1a32fca983d160ef1c7324d9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 15 Feb 2021 14:39:06 +0100 Subject: [PATCH] list lobster relevant info --- cards/export_csv.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.39.2