rankserver
A portable webserver for ranking files via binary manual comparisons, powered by Python’s flask library.
Spins up a flask webserver (on the specified port) whose purpose is to help a user rank files in the chosen data-dir directory via manual binary comparisons. The ranking is done via an incremental “RESTful” sorting strategy implemented within the pysorting library. State is created and maintained within the data-dir directory so that the ranking exercise can pick back up where it left off between different spawnings of the server. At this point, only the ranking of .txt, .png, and .mp4 files is possible; other file types in data-dir will be ignored.
A rankables directory may optionally “watch” a stampserver directory via rank_config.json (configured in the UI): files carrying a chosen stamp tag are mirrored in as symlinks, removals are absorbed with minimal lost comparison work, and newly stamped files are placed into an existing ranking via binary insertion.
Usage
usage: rankserver [-h] [--port PORT] [--subdomain SUBDOMAIN]
[--data-dir DATA_DIR] --secrets-file SECRETS_FILE
options:
-h, --help show this help message and exit
--port PORT Port to run the server on
--subdomain SUBDOMAIN
Subdomain for a reverse proxy
--data-dir DATA_DIR Directory containing the rankable elements
--secrets-file SECRETS_FILE
Path to JSON file with secret_key and password_hash