chiark / gitweb /
stv: produce votelog
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Aug 2016 13:25:51 +0000 (14:25 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Aug 2016 13:25:51 +0000 (14:25 +0100)
stv

diff --git a/stv b/stv
index 68940f452683825259efcecc5fdc2fffbb7c3a38..ebd99ffbb97a60bbe700b42346589eac30777168 100755 (executable)
--- a/stv
+++ b/stv
@@ -398,4 +398,14 @@ for (;;) {
     push @unsorted, @$votes;
 }
 
+open VL, ">.stv.votes" or die $!;
+foreach my $vote (@allvotes) {
+    print VL "----------------------------------------\n";
+    print VL "voter $vote->{Voter}\n";
+    print VL "prefs ". (join " ", @{ $vote->{Prefs} }). "\n";
+    print VL $_, "\n" foreach @{ $vote->{Log} };
+}
+print VL "========================================\n";
+close VL;
+
 print "done.\n";