mirror of
https://github.com/pasky/brmelect.git
synced 2025-06-07 17:44:54 +02:00
Work with names.txt instead of names-sample.txt
This commit is contained in:
parent
8521ed8c6a
commit
c31d035e1a
2 changed files with 9 additions and 3 deletions
10
README.md
10
README.md
|
@ -1,12 +1,18 @@
|
||||||
|
Initialization
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Copy `names-sample.txt` to `names.txt` or create your own `names.txt`.
|
||||||
|
Clobber your `~/votes.txt` file.
|
||||||
|
|
||||||
Generating Ballots
|
Generating Ballots
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
./gen-ballot.pl 15 <names-sample.txt
|
./gen-ballot.pl 15 <names.txt >tokens.txt
|
||||||
|
|
||||||
Web Ballot CGI Script
|
Web Ballot CGI Script
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Put `names-sample.txt` and `tokens.txt` to the same directory as
|
Put `names.txt` and `tokens.txt` to the same directory as
|
||||||
`web-ballot.pl` and make that directory available for CGI script execution.
|
`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
|
If this directory is accessible over web, don't forget to remove read
|
||||||
permissions for all but the owner.
|
permissions for all but the owner.
|
||||||
|
|
|
@ -7,7 +7,7 @@ use v5.10;
|
||||||
use CGI;
|
use CGI;
|
||||||
|
|
||||||
our @names;
|
our @names;
|
||||||
open my $fh, "names-sample.txt" or die "$!";
|
open my $fh, "names.txt" or die "$!";
|
||||||
while (<$fh>) {
|
while (<$fh>) {
|
||||||
chomp;
|
chomp;
|
||||||
push @names, $_;
|
push @names, $_;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue