[git] gnupg-doc - branch, master, updated. 971c62e094e2145f5bba47812229246f478edc23

by Werner Koch cvs at cvs.gnupg.org
Thu Oct 16 21:34:16 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  971c62e094e2145f5bba47812229246f478edc23 (commit)
       via  3090737ffb231261c9aa02352756e4b88edee2e2 (commit)
      from  0862f792100b1e7d73466592b6922e12aba0cb28 (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 971c62e094e2145f5bba47812229246f478edc23
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Oct 16 21:34:26 2014 +0200

    swdb: Update libgpg-error to 1.17.

diff --git a/web/swdb.mac b/web/swdb.mac
index 3392047..e441330 100644
--- a/web/swdb.mac
+++ b/web/swdb.mac
@@ -92,9 +92,9 @@
 #
 # LIBGPG-ERROR
 #
-#+macro: libgpg_error_ver  1.16
-#+macro: libgpg_error_size 534k
-#+macro: libgpg_error_sha1 059c40a2b78c3ac2b4cbec0e0481faba5af332fe
+#+macro: libgpg_error_ver  1.17
+#+macro: libgpg_error_size 654k
+#+macro: libgpg_error_sha1 ba5858b2947e7272dd197c87bac9f32caf29b256
 
 
 #

commit 3090737ffb231261c9aa02352756e4b88edee2e2
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Oct 16 21:33:32 2014 +0200

    web: Allow publishing of donation stats.
    
    * tools/append-to-donors.sh: Create donations summaray file.
    * tools/mkkudos.sh: Add new template for this months donations.
    * web/donate/kudos.org: Add a line wit the current donations.
    --
    
    This requires the latest payproc version.

diff --git a/tools/append-to-donors.sh b/tools/append-to-donors.sh
index f1156c5..492ab32 100755
--- a/tools/append-to-donors.sh
+++ b/tools/append-to-donors.sh
@@ -16,6 +16,8 @@ SIGDELIM="-- "
 htdocs="/var/www/www/www.gnupg.org/htdocs"
 
 donors="$htdocs/donate/donors.dat"
+donations="$htdocs/donate/donations.dat"
+
 journal_dir="/var/log/payproc"
 LOCKFILE="$donors.lock"
 
@@ -28,7 +30,7 @@ if ! lockfile -l 7200 -r 2 $LOCKFILE; then
     echo "$pgm: another instance is still running"
     exit 0
 fi
-trap "rm -f $LOCKFILE" 0
+trap "rm -f $LOCKFILE $donors.tmp $donors.stamp" 0
 
 
 # Send a thank you mail
@@ -42,6 +44,7 @@ trap "rm -f $LOCKFILE" 0
 # Used scratch variables:
 #  upcurrency
 #  ineuro
+#  xamount
 #
 # FIXME: Clean message and name and use an appropriate encoding.
 #        The second mail should actually be encrypted.  In fact
@@ -53,8 +56,9 @@ send_thanks () {
     if [ "$upcurrency" = EUR ]; then
         ineuro=
     else
-        ineuro=" (about $euro EUR)"
+        ineuro=" (about $(echo $euro| awk '{print int($0 + 0.5)}') EUR)"
     fi
+    xamount="$(echo $amount| awk '{print int($0 + 0.5)}')"
     ( cat <<EOF
 From: donations at gnupg.org
 To: $xmail
@@ -66,7 +70,7 @@ X-Loop: gnupg-donations-thanks.gnupg.org
 
 Dear ${name:-Anonymous},
 
-we received $amount $upcurrency$ineuro as a donation for the GnuPG project.
+we received $xamount $upcurrency$ineuro as a donation to the GnuPG project.
 Your donation helps us to develop and maintain GnuPG and related software.
 
 Thank you.
@@ -113,6 +117,8 @@ lastline=$(echo $tmp | cut -d: -f2)
 [ -z "$lastdate" ] && lastdate=19700101
 [ -z "$lastline" ] && lastline=0
 
+
+[ -f "$donors".stamp ] && rm "$donors".stamp
 cat "$donors" > "$donors.tmp"
 find $journal_dir -type f -name 'journal-????????.log' -print \
      | sort | while read fname; do
@@ -131,15 +137,31 @@ find $journal_dir -type f -name 'journal-????????.log' -print \
             name=$(echo "$name" | tr \`\$: ...)
             message=$(echo "$message" | tr \`\$ ..)
             xmail=$(echo "$xmail" | tr \`\$ ..)
-            if [ -n "$name" ]; then
-               # Note that we removed colons from $name
-               echo "$jyear:$datestr:$name::$lnr:" >> "$donors.tmp"
-            fi
+            # Note that we removed colons from $name
+            echo "$jyear:$datestr:$name::$lnr:" >> "$donors.tmp"
+            touch "$donors".stamp
             send_thanks
          done
     fi
 done
-if ! mv "$donors.tmp" "$donors"; then
-  echo "$pgm: error updating $donors" >&2
-  exit 1
+
+# If we have any new records update the files.
+if [ -f "$donors".stamp ]; then
+
+  if ! mv "$donors.tmp" "$donors"; then
+    echo "$pgm: error updating $donors" >&2
+    exit 1
+  fi
+
+  if [ -f "$donations" ]; then
+    payproc-stat -u "$donations" -- > "$donations".tmp  \
+      $(find /var/log/payproc -type f -name 'journal-????????.log' -print|sort)
+    if ! mv "$donations".tmp "$donations"; then
+        echo "$pgm: error updating $donations" >&2
+        exit 1
+    fi
+  else
+    payproc-stat -u "$donations" -- > "$donations"  \
+      $(find /var/log/payproc -type f -name 'journal-????????.log' -print|sort)
+  fi
 fi
diff --git a/tools/mkkudos.sh b/tools/mkkudos.sh
index f3625e0..3c42a8a 100755
--- a/tools/mkkudos.sh
+++ b/tools/mkkudos.sh
@@ -6,11 +6,25 @@ htdocs="/var/www/www/www.gnupg.org/htdocs"
 #htdocs="/home/wk/s/gnupg-doc/web"
 
 donors="$htdocs/donate/donors.dat"
+donations="$htdocs/donate/donations.dat"
 
 if [ ! -f "$donors" ]; then
   echo "mkkudos.sh: '$donors' not found" >&2;
   exit 1
 fi
+if [ ! -f "$donations" ]; then
+  echo "mkkudos.sh: '$donations' not found" >&2;
+  exit 1
+fi
+
+tmp=$(head -1 "$donations")
+monyear=$(echo "$tmp" | awk -F: 'BEGIN { m[1] = "January";
+      m[2] = "February"; m[3] = "March"; m[4] = "April"; m[5] = "May";
+      m[6] = "June"; m[7] = "July"; m[8] = "August"; m[9] = "September";
+      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)}')
+
 
 for file in "$htdocs/donate/"kudos-????.html "$htdocs/donate/"kudos.html; do
    [ "$file" -ot "$donors" ] || continue
@@ -22,17 +36,28 @@ for file in "$htdocs/donate/"kudos-????.html "$htdocs/donate/"kudos.html; do
    fi
    echo "processing $file" >&2
    [ -f "$file.tmp" ] && rm "$file.tmp"
-   awk -F: -v year=$year -v donors="$donors" <"$file"  >"$file.tmp" '
+   awk -F: -v year=$year -v donors="$donors" \
+           -v monyear="$monyear" -v euro="$euro" <"$file"  >"$file.tmp" '
      /<!--BEGIN-DONATIONS-->/ {indon=1; print; insert("") }
      /<!--END-DONATIONS-->/ {indon=0}
      /<!--BEGIN-DONATIONS_goteo13-->/ {indon=1; print; insert("goteo13") }
      /<!--END-DONATIONS_goteo13-->/ {indon=0}
+     /<!--INSERT-MONTH-DATE-->/ {
+           printf "<!--INSERT-MONTH-DATE--> %s\n", monyear;
+           next
+     }
+     /<!--INSERT-MONTH-EURO-->/ {
+           printf "<!--INSERT-MONTH-EURO--> %s\n", euro;
+           next
+     }
      !indon { print }
 
      function insert (tag) {
        while (getline < donors) {
          if ( $0 ~ /^(#.*)?$/ )
             continue;
+         if ( $3 == "" )
+            continue;
          if ($1==year && $4==tag) {
            printf "<li>%s</li>\n", $3
          }
diff --git a/web/donate/kudos.org b/web/donate/kudos.org
index e3c4a46..fbee1a5 100644
--- a/web/donate/kudos.org
+++ b/web/donate/kudos.org
@@ -25,6 +25,14 @@
 
 ** 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>
+
+
 | Year |   # |  \EUR | net \EUR |
 |      | <r> |   <r> |      <r> |
 |------+-----+-------+----------|

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

Summary of changes:
 tools/append-to-donors.sh |   42 ++++++++++++++++++++++++++++++++----------
 tools/mkkudos.sh          |   27 ++++++++++++++++++++++++++-
 web/donate/kudos.org      |    8 ++++++++
 web/swdb.mac              |    6 +++---
 4 files changed, 69 insertions(+), 14 deletions(-)


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




More information about the Gnupg-commits mailing list