Skip to content
/ ballot Public

SQLite based condo association ballot tallying tool, weighted shares.

Notifications You must be signed in to change notification settings

wexi/ballot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. General
  2. Software License and Legal Disclaimer
  3. Prerequisite
  4. Program initialization

General

vote is a quick paper ballot tallying program that was originally written in 2014 for some troubled high rise community in the North East of the USA. This community votes through weighted shares. Data entry is optimized for numeric-pad PC typing. vote uses the SQLite database library (sqlite3 version) and is written in C. To examine the database file collected ballots use SQLITEbrowser or a similar tool.

vote.exe, the equivalent Microsoft Windows version, is built on Linux using MXE (M cross environment). Here is the latest Windows binary release.

Software License and Legal Disclaimer

The software in this repository is in the public domain following the model set by the SQLite Project. The software is offered “as-is”, without warranty, and disclaiming liability for damages resulting from its use.

Prerequisite

If not provided, create the SQLite data base file condo.db (default Makefile DBNAME) with the following table of shares:

CREATE TABLE "shares" (
	"apt"	INTEGER,
	"share"	INTEGER,
	"code"	INTEGER UNIQUE,
	PRIMARY KEY("apt")
);

Fill the shares table with your community corresponding apt (apartment number) and share value pairs. Ignore the code column, a column with unique random numbers which are necessary for the secret tallying method.

condo.db can also include two tables, "evotes" (those voting electronically) and "arrears" (those not in good standing), with an "apt" column of apartment numbers which are not eligible to vote or can vote electronically only.

Program initialization

Run vote -i <seats>:<candidates>[:x] to initialize condo.db, the database file; this would require you to open a terminal1.

The optional third argument, lower-case :x or upper-case :X, initializes the program for secret (anonymous) Unit# entries rather than real Apt# entries. This separation is needed for sensitive (publicly observed) tallying. NOTE! Only when using the upper case :X argument would actually new secret Unit# numbers be generated. Lower-case :x argument initializes the program to use the preexisting secret numbers. This is convenient when needing to switch between Anon (secret) and Open (real) numbering tally. Apt# refers to the real apartment number, Unit# refers to the secret apartment number.

An "anons" table is created in condo.db to relate the real apartment numbers ("apt") with their secret counterparts ("unit"); example:

sqlite> .mode col
sqlite> .head on
sqlite> .output "anons.txt"   
sqlite> select * from anons order by apt;
apt  unit
---  ----
7    69  
8    468 
9    50  
10   81  
11   256

An empty table of votes would be created or recreated if it already exists. The votes table has the following structure:

CREATE TABLE votes (
      apt INTEGER PRIMARY KEY,
      vtime INTEGER,
      can1 INTEGER DEFAULT 0,
      ...
);

vtime is the "unix time" of entering the apt vote; It is captured for forensic purposes only.

Footnotes

1 To open a Windows Terminal type WIN+R and then the cmd command.

About

SQLite based condo association ballot tallying tool, weighted shares.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published