No description
Find a file
2024-08-12 22:57:32 -07:00
.gitignore save anonymized files if not in dry run 2024-08-11 17:05:43 -07:00
aliasparts.csv remove duplicate aliases from list 2024-08-11 17:43:52 -07:00
anonymize_entries.py make data_dir required & save output to {data_dir}/output by default 2024-08-12 16:59:47 -07:00
poetry.lock more implementation work 2024-08-11 16:49:09 -07:00
pyproject.toml more implementation work 2024-08-11 16:49:09 -07:00
README.md clean up example 2024-08-12 22:57:32 -07:00

dimocracy-voucher

Automation tools for running dimocracy

Getting started

Requirements

Installation

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] [-o OUTPUT] [-d | --dry-run | --no-dry-run] [-D | --deanonymized | --no-deanonymized] [-e EMAILS]
                            [-r | --regenerate | --no-regenerate] [-s SEED]
                            data_dir

positional arguments:
  data_dir              working directory - used to find the form responses CSV, file responses directory, and for output

options:
  -h, --help            show this help message and exit
  -c CSV, --csv CSV     override CSV form responses path (defaults to first file matching {data_dir}/*.csv)
  -f FILE_UPLOADS, --file-uploads FILE_UPLOADS
                        override file responses directory path (defaults to first subdirectory matching {data_dir}/*/*.zip)
  -o OUTPUT, --output OUTPUT
                        override output path (defaults to {data_dir}/output)
  -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)
  -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:

  Export your Google Form's CSV & file uploads to any folder:

    path/to/folder:
    ├ form_responses.csv
    └ file_responses/
        ├ Upload A - User 1.zip
        ├ Upload B - User 2.zip
        └ etc.

  Then run the script:

    python ./anonymize_entries.py path/to/folder