]> git.plutz.net Git - lobster/commitdiff
list lobster relevant info
authorPaul Hänsch <paul@plutz.net>
Mon, 15 Feb 2021 13:39:06 +0000 (14:39 +0100)
committerPaul Hänsch <paul@plutz.net>
Mon, 15 Feb 2021 13:39:06 +0000 (14:39 +0100)
cards/export_csv.sh

index dd1d6e75ab2b58aaaf680430b9146ca45adc2bb2..d6185c8a1c24c04aa23506ee329f79e4a04c2da0 100755 (executable)
@@ -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;&shy\;;;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