mirror of
https://github.com/pasky/brmelect.git
synced 2025-06-08 18:13:59 +02:00
22 lines
716 B
Markdown
22 lines
716 B
Markdown
Generating Ballots
|
|
------------------
|
|
|
|
./gen-ballot.pl 15 <names-sample.txt
|
|
|
|
Web Ballot CGI Script
|
|
---------------------
|
|
|
|
Put `names-sample.txt` and `tokens.txt` to the same directory as
|
|
`web-ballot.pl` and make that directory available for CGI script execution.
|
|
If this directory is accessible over web, don't forget to remove read
|
|
permissions for all but the owner.
|
|
|
|
It should just work; you may need to adjust the `votes.txt` path currently
|
|
hardcoded in `web-ballot.pl`, where the cast votes are recorded.
|
|
|
|
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
|