This tool is used to generate secure tokens for voter verification in elections.
The tool requires python and uses the Poetry package manager.
git clone https://github.com/socrse/election-tokens.git
cd election-tokens
poetry installGenerating the election tokens is a two-step process. The following steps have been tested on Windows.
First, export the membership list from WildApricot.
- Go to
Members -> Summary -> Export All. - Make sure the First Name, Last Name, Email and Membership status fields are selected.
- Click Export
This will generate and download an XLS file with all the members' details in it.
- Open the XLS file in Excel and save it as a CSV file.
- Make sure to export it as
CSV UTF-8 (Comma delimited)format.
- Make sure to export it as
- Copy the CSV file into the
datafolder. - Rename it to something like
members.csvfor simplicity
Next, run the following command to filter the results:
poetry run election-tokens filter-wildapricot --people data/members.csv -o data/subs.csvThis will output a CSV file into data/subs.csv containing the list of full names and email addresses for all valid members who are eligible to vote. This data is then used by the next step to generate tokens and send out the emails.
Then copy and fill in the example settings.ini file.
The missing values are the email address and name of the sender, and an email password.
To generate an email password, see the Google documentation on
Using the Gmail SMTP server.
cp example-settings.ini settings.ini
nano settings.iniFinally, when you've tested everything and are ready to hit go, use the following command to generate and send tokens for each address in the membership list:
poetry run election-tokens generate -i data/subs.csv -o data/tokens.txtAll of the tokens generated during this process are saved in data/tokens.txt. Keep this file,
as you will need to send it to the scrutineers to verify the votes.
A checkpoint.txt file will be created to track progress.
-
The process will probably fail at some point, but
checkpoint.txtwill track progress. Run thegeneratecommand again, and it will continue from where it left off. -
If you send out a test email and want to test again, but nothing happens, remember to delete
checkpoint.txtand try again.
MIT © Society of Research Software Engineering