#投票 #命令行界面 #redbrick

app good_stv

使用单一可转让票评价选举的工具

1 个不稳定版本

使用旧的 Rust 2015

0.1.0 2017年12月3日

#35#投票

GPL-3.0 许可证

19KB
344

good_stv

使用单一可转让票评价单一可转让票的工具。

Build Status

用法

good_stv 预期接收 CSV 格式的数据,可以是标准输入或文件。唯一的必需参数是一个正整数,表示选举中要填补的席位数。示例调用如下

$ good_stv -f test.csv 3
$ good_stv 3 < test.csv

CSV 格式

输入数据应采用以下格式

一个(1)标题行,列出了要选举的候选人,顺序不限。接着是任意数量的正文行,每行包含一个候选人列表,按照从高到低的优先级顺序排列,代表一张选票。正文行中列出的任何候选人都必须也在标题行中,否则将被忽略。每张选票不需要包含每个候选人,尽管列出零(0)候选人的选票将被忽略。

示例

alice,bob,charlie
alice,bob
bob,charlie,alice
bob

许可证

good_stv - a good single transferable vote utility.
Copyright (C) 2017 Terry Bolt

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

依赖关系

~6.5MB
~107K SLoC