X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=templates%2Fview_attendee.sh;h=bdfdc6a621ebe2fe5ebfb0335f072d353d5c3352;hb=32be1b8e73becaf528205136995261c3f03bae30;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=a8c6f8b510bb4747798c4f576162733d982bae75;p=lobster
diff --git a/templates/view_attendee.sh b/templates/view_attendee.sh
index e69de29..bdfdc6a 100755
--- a/templates/view_attendee.sh
+++ b/templates/view_attendee.sh
@@ -0,0 +1,86 @@
+# Copyright 2014, 2015 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 .
+
+n=$(printf %s "$values[N]" \
+ | sed -rn 's:^([^;]*)(\;[^;]*)(\;[^;]*)?(\;[^;]*)?(\;[^;]*)?$:\4 \2 \3 \1 \5:gp' \
+ | sed -r 's:,: :;s:\;: :g;s: +: :g;s:^ $::;'
+ )
+fullname="${n:-${values[FN]:-${values[NICKNAME]}}}"
+
+cat <
+