X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=templates%2Fedit_attendee.sh;h=e5050128db36e54f40301eb46e1a16d4e409c15d;hb=63e4f339c5eb99b4aed9a2f201c2547c06703b5c;hp=13b550a407ee446482203f9668b3050ca3d31a7a;hpb=8b887633d34fe136ffba19a29290ec095c310331;p=lobster
diff --git a/templates/edit_attendee.sh b/templates/edit_attendee.sh
index 13b550a..e505012 100755
--- a/templates/edit_attendee.sh
+++ b/templates/edit_attendee.sh
@@ -1,116 +1,142 @@
-edit_card() {
- n_last="$(echo "$values[N]" |sed -r 's:^([^;]*;){0} *([^;]*);.*$:\2:')"
- n_first="$(echo "$values[N]" |sed -r 's:^([^;]*;){1} *([^;]*);.*$:\2:')"
- n_middle="$(echo "$values[N]" |sed -r 's:^([^;]*;){2} *([^;]*);.*$:\2:')"
- n_pre="$(echo "$values[N]" |sed -r 's:^([^;]*;){3} *([^;]*);.*$:\2:')"
- n_post="$(echo "$values[N]" |sed -r 's:^([^;]*;){4} *([^;]*);*$:\2:')"
+# Copyright 2014 Paul Hänsch
+#
+# This file is part of Confetti.
+#
+# Confetti is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Confetti is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with Confetti. If not, see .
-
- echo '
'
- declare -A tags
- declare -A values
- vcf_parse "$cardfile" |while read -r line; do
- declare -A tag
- case "$line" in
- value*) eval "$line";;
- tag*) eval "$line";;
- key*)
- if [ -z "$key" ]; then
- eval "$line"
- else
- values[$key]="$value"
- for t in ${(k)tag}; do
- tags[${key}_$t]="$tag[$t]"
- done
- eval "$line"
- if [ -n "$values[$key]" ]; then
- n=0
- while [ -n "$values[$key$n]" ]; do n=$(($n + 1)); done
- key=$key$n
- fi
- unset value
- unset tag
- fi
- ;;
- esac
- done
- edit_card
-}