[Collab-qa-commits] r1526 - udd/scripts
Stefano Zacchiroli
zack at alioth.debian.org
Mon Jul 20 15:33:39 UTC 2009
Author: zack
Date: 2009-07-20 15:33:38 +0000 (Mon, 20 Jul 2009)
New Revision: 1526
Added:
udd/scripts/fetch_votes.sh
Log:
script to fetch vote.d.o info
Added: udd/scripts/fetch_votes.sh
===================================================================
--- udd/scripts/fetch_votes.sh (rev 0)
+++ udd/scripts/fetch_votes.sh 2009-07-20 15:33:38 UTC (rev 1526)
@@ -0,0 +1,19 @@
+#!/bin/sh
+TARGETDIR="/org/udd.debian.org/mirrors/votes"
+BASEURL="http://www.debian.org/vote"
+WGET="wget --timestamping -q"
+
+mkdir -p $TARGETDIR
+rm -rf $TARGETDIR/*
+
+start_year="2006" # before that, URL scheme was different
+this_year=`date +%Y`
+for year in `seq $start_year $this_year` ; do
+ for i in `seq -w 1 999` ; do
+ $WGET -O "$TARGETDIR/${year}_vote_${i}_voters.txt" "$BASEURL/$year/vote_${i}_voters.txt" || break
+ $WGET -O "$TARGETDIR/${year}_vote_${i}_tally.txt" "$BASEURL/$year/vote_${i}_tally.txt" || break
+ done
+done
+for f in $TARGETDIR/* ; do # wget's timestamping leaves around empty files
+ test -s $f || rm -f $f
+done
Property changes on: udd/scripts/fetch_votes.sh
___________________________________________________________________
Added: svn:executable
+ *
More information about the Collab-qa-commits
mailing list