From 0198a4bc59ce41712a86b610d10b0b7a93ec2dc7 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Wed, 15 May 2013 13:47:18 +0000 Subject: Add rss feed for donations git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8243 5b7c3c08-40e5-403b-9995-ace06908e4af --- Makefile | 2 +- config_default | 2 ++ mktreasurer | 1 + tmpl/donations.html | 2 +- tmpl/donations.rss | 28 ++++++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 tmpl/donations.rss diff --git a/Makefile b/Makefile index cee0300..eb4678c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION=0.1 PROJECTNAME=mga-treasurer BINFILES=mktreasurer CFGFILES=mga-treasurer.conf -TMPLFILES=tmpl/*.html +TMPLFILES=tmpl/*.html tmpl/*.rss sysconfdir=/etc bindir=/usr/bin diff --git a/config_default b/config_default index f5ee800..3bc615b 100644 --- a/config_default +++ b/config_default @@ -2,5 +2,7 @@ grisbi_file: /var/lib/mga-treasurer/data/mga-accounts.gsb tmpl_dir: /usr/share/mga-treasurer/tmpl output_format: - html + - rss out_dir: /var/www/mga-treasurer sitename: Mageia.Org +siteurl: http://treasurer.mageia.org diff --git a/mktreasurer b/mktreasurer index 786246b..93967a7 100755 --- a/mktreasurer +++ b/mktreasurer @@ -47,6 +47,7 @@ sub donations_list { my @donations = grep { $_->{Ca} == $don_cat } @{$r->{Transaction}}; foreach my $don (@donations) { my %d = ( + nb => $don->{Nb}, amount => $don->{Am}, date => epoch_date($don->{Dt}), who => party_name($r, $don->{Pa}), diff --git a/tmpl/donations.html b/tmpl/donations.html index f50e96f..8eac51c 100644 --- a/tmpl/donations.html +++ b/tmpl/donations.html @@ -9,7 +9,7 @@ [% donations.total_30 %] Euros have been donated to Mageia.org in the last 30 days. [%- l = 10 -%] -

Last [% l %] donations

+

Last [% l %] donations RSS feed