Add support for election labels

This commit is contained in:
Petr Baudis 2014-10-13 23:52:35 +02:00
parent d4e238a86f
commit dbff2fe1b0
3 changed files with 15 additions and 7 deletions

View file

@ -1,13 +1,18 @@
Initialization
--------------
Decide on label of the election. We will refer to that as `$label`;
this label is to be passed as a parameter to `gen-ballot.pl` and
updated near the top of `web-ballot.pl`. The generated `votes.txt`
file contains this in its filename.
Copy `names-sample.txt` to `names.txt` or create your own `names.txt`.
Clobber your `~/votes.txt` file.
Clobber your `~/votes $label.txt` file.
Generating Ballots
------------------
./gen-ballot.pl 15 <names.txt >tokens.txt
./gen-ballot.pl 15 "testovaci komise" <names.txt >tokens.txt
Web Ballot CGI Script
---------------------
@ -25,4 +30,4 @@ Counting Votes
This script will show just the final vote for each token:
perl -nle 'chomp; @b = split/,/; $a{$b[0]} = [@b]; END { for (values %a) { print join(",", @$_); } }' ~/votes.txt
perl -nle 'chomp; @b = split/,/; $a{$b[0]} = [@b]; END { for (values %a) { print join(",", @$_); } }' ~/'votes testovaci komise'.txt