Commit 33cb654b authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Simpler election template

parent bae7f456
...@@ -37,12 +37,12 @@ belenios-tool trustee-keygen $group ...@@ -37,12 +37,12 @@ belenios-tool trustee-keygen $group
cat *.pubkey > public_keys.jsons cat *.pubkey > public_keys.jsons
# Generate election parameters # Generate election parameters
belenios-tool mkelection $uuid $group --template $BELENIOS/demo/templates/election.json belenios-tool mkelection $uuid $group --template $BELENIOS/demo/templates/questions.json
header "Simulate votes" header "Simulate votes"
cat private_creds.txt | while read id cred; do cat private_creds.txt | while read id cred; do
belenios-tool vote --privcred <(echo $cred) --ballot <(printf "[[0,0,0,0,0],[0,1,0,1,1,0],[0,0,1]]") belenios-tool vote --privcred <(echo $cred) --ballot <(printf "[[1,0]]")
echo "Voter $id voted" >&2 echo "Voter $id voted" >&2
echo >&2 echo >&2
done > ballots.tmp done > ballots.tmp
{"description":"This is a test election.","name":"Test election","questions":[{"answers":["a","b","c","d","e"],"min":0,"max":1,"question":"Question 1?"},{"answers":["a","b","c","d","e","f"],"min":2,"max":3,"question":"Question 2?"},{"answers":["a","b","c"],"min":1,"max":1,"question":"Question 3?"}],"short_name":"test"}
{"description":"Description of the election.","name":"Name of the election","questions":[{"answers":["Answer 1","Answer 2"],"min":0,"max":1,"question":"Question 1?"}],"short_name":"short_name"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment