From 5ab9b99b739d9e471cb06847f27f86614fda652c Mon Sep 17 00:00:00 2001 From: Ash Garcia Date: Sun, 11 Aug 2024 23:13:33 -0700 Subject: [PATCH] add readme --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8583ac --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# dimocracy-voucher + +Automation tools for running dimocracy + +## Getting started + +### Requirements + +- [Python](https://python.org/) > 3.11 +- [Poetry](https://python-poetry.org/) + +### Installation + +```sh +cd dimocracy-voucher +poetry install +poetry shell +python ./anonymize_entries.py path/to/folder +``` + +### Help contents + +``` +usage: anonymize_entries.py [-h] [-c CSV] [-f FILE_UPLOADS] [-d | --dry-run | --no-dry-run] [-D | --deanonymized | --no-deanonymized] [-e EMAILS] [-o OUTPUT] + [-r | --regenerate | --no-regenerate] [-s SEED] + [data_dir] + +positional arguments: + data_dir directory containing both the CSV form data and the file responses (uploads) + +options: + -h, --help show this help message and exit + -c CSV, --csv CSV override path to the CSV file of form responses + -f FILE_UPLOADS, --file-uploads FILE_UPLOADS + override path to the directory of file responses (uploads) + -d, --dry-run, --no-dry-run + do not create or modify any files + -D, --deanonymized, --no-deanonymized + skip anonymization of files, simply package them as-is + -e EMAILS, --emails EMAILS + limit output to files from the specified emails (comma-separated) + -o OUTPUT, --output OUTPUT + output directory + -r, --regenerate, --no-regenerate + force-update generated CSV columns + -s SEED, --seed SEED specify random seed for alias generation (treat this like a password & change it for each round) + +example: + + path/to/folder: + ├ form_responses.csv + └ file_responses/ + ├ Upload A - User 1.zip + ├ Upload B - User 2.zip + └ etc. + + python ./anonymize_entries.py path/to/folder + + OR + + python ./anonymize_entries.py -c path/to/folder/form_responses.csv -f path/to/folder/file_responses +```