This directory contains all logic to generate passwords for ICPC contests.
These scripts require Python 3, as well as the following Python packages:
pyyamljinja2pdfkitxkcdpass
It also requires the wkhtmltopdf binary.
To install, run:
./install.shThis tool should be run from the folder where you want to store the generated passwords.
Normally this is a passwork folder in the contest specific repository.
First, you need to copy config.yaml.example and cds-config.yaml.example from this repository to the folder you want
to run the tool from.
Make sure to drop the .example postfix from the files after copying.
Modify both files to your needs. Both contain comments to get you started.
Now you can run this tool, by running:
[folder of this repo]/genpwfilesfrom the folder with your two YAML files. It will then ask you what you want to do. There are shorthands for all subcommands, use
[folder of this repo]/genpwfiles -hto get more information about this.
Note: take care in running the force mode. This will get rid of any accounts/password that already existed, so
only run it if you really want this.
The following files are generated:
This file follows the CCS spec format. More information can be found in the example and the official specification on the CCS specs website.
This is an older format still in use by some CCSes. The format is described here.
This file is a YAML file to create Linux accounts. The root key is users and below it there is a dictionary where keys
are usernames and values are the passwords of the users.
These are the master password sheets, where all usernames and passwords are printed in one big table.
The templates in templates/*-master.html are used to generate these PDFs.
These are the user password sheets, where one page is generated per created account.
These should be handed out to the end users.
The templates in templates/*-sheets.html are used to generate these PDFs.