My script takes in text which has two parts. First a part describing the candidates, then a list of votes. Here is an example:
--- !condorcet/^vote candidates: - id : Alice name : Alice random : Likes Cats - id : Bob - id : Charlie votes: - voter : Alice 1 : Alice 2 : Bob 3 : Charlie - voter : Bob 1 : Bob 2 : Alice 3 : Charlie - voter : Charlie 1 : Charlie 2 : Alice 3 : Bob
First, one has a line like
--- !condorcet/^vote, which simply starts the data. The key is the 3 dashes-- the rest is optional.
Then, one has a line saying
candidates:which is followed by sections for each candidate. Each candidates section starts with a indented line with a dash, followed by "id" then ":" and then some (preferably short) identifier for the candidate. There can be any number of lines after that describing the candidate which do not start with a dash but follow the form "key : value" after that, for your own use.
After that one finally describes all the votes, starting with a line that says
votes:. Each vote starts with an indented line that starts with a dash, then has "voter" then a ":" then the voter's name, and then has a list of their preferences of the form "1" : <Candidate Identifier> (for first choice) using the identifiers given to the candidates in the candidates section.