#!/bin/bash

set -e
cd `dirname $0`

python rooms-statistics.py > published-data/rooms-by-date.txt
python rooms-statistics2.py > published-data/rooms-by-date-2.txt
python talks-statistics.py > published-data/talks-data.txt
python registration-statistics.py > published-data/registration-data.txt
python food-statistics.py > published-data/food-by-date.txt
python payment-statistics.py > published-data/payment-data.txt

# For all conferences:
for info in \
    "dc10-	4	conference_id=4" \
    "dc09-	3	conference_id=3" \
    "dc08-	2	conference_id=2" \
    "dc07-	1	conference_id=1" ; do
    prefix=`echo "$info" | cut -f 1`
    export CONFERENCE_ID=`echo "$info" | cut -f 2`
    export WHERE=`echo "$info" | cut -f 3`
    
    python talks-statistics.py > published-data/${prefix}talks-data.txt
done

rsync -raiv published-data/ lefschetz:www/http/debconf/

# this contains hidden filenames
test -e publish-private-dat.sh && sh publish-private-dat.sh



