📝 Update README

This commit is contained in:
Brian Wiborg 2023-04-03 13:44:06 +02:00
parent 9b745cabc7
commit 94cb80c627
No known key found for this signature in database
GPG Key ID: BE53FA9286B719D6

View File

@ -2,6 +2,14 @@
A Python 3.11 module for votings on the c-base space-station. A Python 3.11 module for votings on the c-base space-station.
## Getting Started
```
git clone https://code.c-base.org/baccenfutter/python-voting
cd python-voting
poetry install
```
## Usage ## Usage
```python ```python
@ -26,3 +34,26 @@ voting.vote('alice', Vote.YES)
res = Result(voting) res = Result(voting)
print(res.result()) print(res.result())
``` ```
## Command-line Interface
```
$> voting --help
Usage: voting [OPTIONS] COMMAND [ARGS]...
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the │
│ installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────╮
│ ls List all votings. │
│ new Create a new voting. │
│ rm Delete a voting. │
│ show Display the results of a voting. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────╯
$> voting new EXAMPLE_TITLE --quorum A:5 --voters a,b,c,d,e,f,g,h,i,j
```