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

by Werner Koch cvs at cvs.gnupg.org
Fri Oct 17 13:12:06 CEST 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  f5e7a838cc7d6b84e818f014e7132d84a12927d9 (commit)
      from  971c62e094e2145f5bba47812229246f478edc23 (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 f5e7a838cc7d6b84e818f014e7132d84a12927d9
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Oct 17 13:12:16 2014 +0200

    tools: Add yearly stats to mkkudos.sh.

diff --git a/tools/mkkudos.sh b/tools/mkkudos.sh
index 3c42a8a..8e5ed96 100755
--- a/tools/mkkudos.sh
+++ b/tools/mkkudos.sh
@@ -8,6 +8,45 @@ htdocs="/var/www/www/www.gnupg.org/htdocs"
 donors="$htdocs/donate/donors.dat"
 donations="$htdocs/donate/donations.dat"
 
+
+usage()
+{
+    cat <<EOF
+Usage: $0 [OPTIONS]
+Options:
+	--force    Force re-creation of files.
+EOF
+    exit $1
+}
+
+
+force=no
+while [ $# -gt 0 ]; do
+    case "$1" in
+	# Set up `optarg'.
+	--*=*)
+	    optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
+	    ;;
+	*)
+	    optarg=""
+	    ;;
+    esac
+
+    case $1 in
+	--force)
+	    force=yes
+	    ;;
+        --help)
+            usage 0
+            ;;
+	*)
+	    usage 1 1>&2
+	    ;;
+    esac
+    shift
+done
+
+
 if [ ! -f "$donors" ]; then
   echo "mkkudos.sh: '$donors' not found" >&2;
   exit 1
@@ -24,10 +63,14 @@ monyear=$(echo "$tmp" | awk -F: 'BEGIN { m[1] = "January";
       m[10] = "October"; m[11] = "November"; m[12] = "December"; }
       {printf "%s %d", m[$2] , $1}')
 euro=$(echo "$tmp" | awk -F: '{printf "%d Euro", int($8 + 0.5)}')
-
+euroyr=$(echo "$tmp" | awk -F: '{printf "%d Euro", int($10 + 0.5)}')
+n=$(echo "$tmp" | awk -F: '{printf "%d", $7}')
+nyr=$(echo "$tmp" | awk -F: '{printf "%d", $9}')
 
 for file in "$htdocs/donate/"kudos-????.html "$htdocs/donate/"kudos.html; do
-   [ "$file" -ot "$donors" ] || continue
+   if [ $force = no ]; then
+     [ "$file" -ot "$donors" ] || continue
+   fi
    if [ "$file" = "$htdocs/donate/"kudos.html ]; then
      year=$(date +%Y)
    else
@@ -37,7 +80,9 @@ for file in "$htdocs/donate/"kudos-????.html "$htdocs/donate/"kudos.html; do
    echo "processing $file" >&2
    [ -f "$file.tmp" ] && rm "$file.tmp"
    awk -F: -v year=$year -v donors="$donors" \
-           -v monyear="$monyear" -v euro="$euro" <"$file"  >"$file.tmp" '
+           -v monyear="$monyear" -v euro="$euro" -v euroyr="$euroyr" \
+           -v n="$n" -v nyr="$nyr" \
+            <"$file"  >"$file.tmp" '
      /<!--BEGIN-DONATIONS-->/ {indon=1; print; insert("") }
      /<!--END-DONATIONS-->/ {indon=0}
      /<!--BEGIN-DONATIONS_goteo13-->/ {indon=1; print; insert("goteo13") }
@@ -50,6 +95,18 @@ for file in "$htdocs/donate/"kudos-????.html "$htdocs/donate/"kudos.html; do
            printf "<!--INSERT-MONTH-EURO--> %s\n", euro;
            next
      }
+     /<!--INSERT-MONTH-N-->/ {
+           printf "<!--INSERT-MONTH-N--> %s\n", n;
+           next
+     }
+     /<!--INSERT-YEAR-EURO-->/ {
+           printf "<!--INSERT-YEAR-EURO--> %s\n", euroyr;
+           next
+     }
+     /<!--INSERT-YEAR-N-->/ {
+           printf "<!--INSERT-YEAR-N--> %s\n", nyr;
+           next
+     }
      !indon { print }
 
      function insert (tag) {
diff --git a/web/donate/kudos.org b/web/donate/kudos.org
index fbee1a5..2e6e151 100644
--- a/web/donate/kudos.org
+++ b/web/donate/kudos.org
@@ -25,12 +25,20 @@
 
 ** Donation summary
 
-#+HTML: <p>In
-#+HTML: <!--INSERT-MONTH-DATE-->
-#+HTML: we received
-#+HTML: <!--INSERT-MONTH-EURO-->
-#+HTML: of donations by credit card plus some more donations via Paypal.
-#+HTML: </p>
+#+HTML:<p>In
+#+HTML:<!--INSERT-MONTH-DATE--> October 2014
+#+HTML:we received
+#+HTML:<!--INSERT-MONTH-N--> 2
+#+HTML:donations of
+#+HTML:<!--INSERT-MONTH-EURO--> 28 Euro
+#+HTML:.  For the entire year we
+#+HTML:received a total of
+#+HTML:<!--INSERT-YEAR-EURO--> 52 Euro
+#+HTML:from
+#+HTML:<!--INSERT-YEAR-N--> 28
+#+HTML:donations.  Note that these numbers are only for donations via Stripe
+#+HTML:(credit card) and do not yet account for those received via Paypal.
+#+HTML:</p>
 
 
 | Year |   # |  \EUR | net \EUR |

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

Summary of changes:
 tools/mkkudos.sh     |   63 +++++++++++++++++++++++++++++++++++++++++++++++---
 web/donate/kudos.org |   20 +++++++++++-----
 2 files changed, 74 insertions(+), 9 deletions(-)


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




More information about the Gnupg-commits mailing list