[git] gnupg-doc - branch, master, updated. b31bfbd2a4cd81b95f69d2b246777a5fb078c05c

by Werner Koch cvs at cvs.gnupg.org
Tue Feb 11 19:41:13 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".

The branch, master has been updated
       via  b31bfbd2a4cd81b95f69d2b246777a5fb078c05c (commit)
      from  6aed9631236dde0a490075993f35487ec583d029 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b31bfbd2a4cd81b95f69d2b246777a5fb078c05c
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Feb 11 19:40:32 2014 +0100

    accounts: Add M and XXL t-shirt sizes

diff --git a/misc/accounts.gnupg.net/htbin/goteo-collect.cgi b/misc/accounts.gnupg.net/htbin/goteo-collect.cgi
index 5a37b00..bc497a5 100755
--- a/misc/accounts.gnupg.net/htbin/goteo-collect.cgi
+++ b/misc/accounts.gnupg.net/htbin/goteo-collect.cgi
@@ -44,7 +44,8 @@
 #     tail -n+2 FILE \
 #       ./addrutil -FGoteo-ID -FUser -FName -FMail -FAmount -FProblem \
 #                  -FAnon -FReward -FAddress -FDate --readcsv   \
-#       | sed '/^Address:/ s/ , , ,//' | sed '/^Address:/ s/,/\n/g' > data
+#       | sed '/^Address:/ s/ , , ,//' | sed '/^Address:/ s/,/\n/g' \
+#  | awk '/^Date:/{split($2,a,"/");print $1" "a[3]"-"a[2]"-"a[1];next};{print}'
 #
 #    Now we have the data in an easy to read format.  The tool addrutil is
 #    available at 'http://git.gnupg.org/cgi-bin/gitweb.cgi\
@@ -57,16 +58,17 @@
 #       | sed 's/^Reward: .*tshirt.*/Reward: t/'  \
 #       | sed 's/^Reward: .*Listed.*/Reward: l/' > newdata
 #
-#   cat data | sed 's/^Reward: An @GnuPG.*/Reward: m/' | sed 's/^Reward: .*sticker.*/Reward: s/'| sed 's/^Reward: .*tshirt.*/Reward: t/'  | sed 's/^Reward: .*Listed.*/Reward: l/'
-#
 #  - To add a unique ID use this command
 #
-#    awk '/^Goteo-ID:/ {cmd="gpg -a --gen-random 0 15 | tr +/ 42"; cmd | getline foo; print "Id: " foo; close(cmd); }; {print}' data >newdata
+#    awk '/^Goteo-ID:/ {cmd="gpg -a --gen-random 0 15
+#         | tr +/ 42"; cmd | getline foo; print "Id: " foo; close(cmd); };
+#        {print}' data >newdata
 #
 #  - To finally create the input data
 #    fields="-FId -FUser -FName -FReward -FMail -FAddress"
 #     ( ./addrutil -SReward=t $fields data \
-#      && ./addrutil -SReward=m $fields data) > goteo-collect.input
+#      && ./addrutil -SReward=m $fields data \
+#      && ./addrutil -SReward=s $fields data ) > goteo-collect.input
 #
 
 
@@ -153,7 +155,7 @@ sub write_template {
     local $fname = shift;
     local $indel = 0;
     local $fulladdress;
-
+    local $tsizehuman;
 
     if ( "$address" =~ /^$name/ ) {
         $fulladdress = $address;
@@ -161,6 +163,15 @@ sub write_template {
         $fulladdress = "$name\n$address";
     }
 
+    if ( "$tsize" eq 'X' ) {
+        $tsizehuman = "XL";
+    } elsif ( "$tsize" eq 'Z' ) {
+        $tsizehuman = "XXL";
+    }
+    else {
+        $tsizehuman = $tsize;
+    }
+
     open TEMPLATE, $htdocs . $fname;
     while (<TEMPLATE>) {
         if ($indel) {
@@ -188,7 +199,7 @@ sub write_template {
         || s/\x40MAIL\x40/$mail/g
         || s/\x40REWARD\x40/$reward/g
         || s/\x40TXID\x40/$txid/g
-        || s/\x40TSIZE\x40/$tsize/g
+        || s/\x40TSIZE\x40/$tsizehuman/g
         || s/\x40MAILBOX\x40/$mailbox/g
         || s/\x40MAILBOX2\x40/$mailbox2/g
         || s/\x40ERRORSTR\x40/$errorstr/g;
@@ -248,10 +259,10 @@ elsif (not &find_item()) {
     print $q->end_html;
 }
 elsif ($mode eq 'response') {
-    if ($q->param('mail') !~ /[a-zA-Z0-9]+@[a-zA-Z]+/ ) {
+    if ($q->param('mail') !~ /[a-zA-Z0-9.-_]+@[a-zA-Z0-9]+/ ) {
         write_error_page('Invalid mail address given!');
     }
-    elsif ($reward eq 't' and $q->param('tsize') !~ /^[SLX]$/ ) {
+    elsif ($reward eq 't' and $q->param('tsize') !~ /^[SMLXZ]$/ ) {
         write_error_page('Size of t-shirt not given!');
     }
     else {
diff --git a/misc/accounts.gnupg.net/htdocs/goteo-collect.html.in b/misc/accounts.gnupg.net/htdocs/goteo-collect.html.in
index fbfa4c4..6b6e444 100644
--- a/misc/accounts.gnupg.net/htdocs/goteo-collect.html.in
+++ b/misc/accounts.gnupg.net/htdocs/goteo-collect.html.in
@@ -98,8 +98,10 @@
 <p>Please select the size for the t-shirt:</p>
 <p>
   <input type="radio" name="tsize" value="S">Size S</input><br/>
+  <input type="radio" name="tsize" value="M">Size M</input><br/>
   <input type="radio" name="tsize" value="L">Size L</input><br/>
   <input type="radio" name="tsize" value="X">Size XL</input><br/>
+  <input type="radio" name="tsize" value="Z">Size XXL</input><br/>
 </p>
 
 <p>Please double check the shipping address (e.g. name and country

-----------------------------------------------------------------------

Summary of changes:
 misc/accounts.gnupg.net/htbin/goteo-collect.cgi    |   29 ++++++++++++++------
 .../htdocs/goteo-collect.html.in                   |    2 ++
 2 files changed, 22 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list