terry is a Google-Code-Jam-like programming contest environment designed for the territorial phase of the Italian Olympiad in Informatics (OII, Olimpiadi Italiane di Informatica).
- Rust (latest stable)
- Node.js and yarn
- SQLite
git clone https://github.com/olimpiadi-informatica/terry
cd terrycd frontend
yarn install
yarn compile
yarn build
cd ..cd backend
SQLX_OFFLINE=true cargo build --releaseEdit the config.toml file in the backend directory to configure your contest settings (name, duration, start time, JWT secrets, etc.).
Set the DATABASE_URL environment variable and create the database:
touch terry.db
export DATABASE_URL="sqlite:terry.db"The server will automatically run migrations on startup.
The terry binary (found in backend/target/release/terry) provides several subcommands:
terry serve --config config.toml --listen 127.0.0.1:9000Tasks must follow the terry format specification.
terry import-task /path/to/task-folder 1terry import-user --token "user-secret-token" --name "John" --surname "Doe"To import an admin:
terry import-user --token "admin-secret-token" --name "Admin" --surname "User" --role adminTo import multiple users from CSV:
terry import-user --csv users.csvThe CSV file must include token,name,surname headers and may optionally include a role
column. If the role column is omitted or empty, the command uses --role as the default:
token,name,surname,role
alice,Alice,Smith,Contestant
bob,Bob,Jones,Admin
charlie,Charlie,Brown,Exports a ranking CSV and all submissions (including source, input, and output files).
terry export /path/to/export-dirTo skip exporting submissions whose score is 0 or lower:
terry export /path/to/export-dir --filter-zero-scoreTo export submissions without their input files:
terry export /path/to/export-dir --skip-inputsYou can find the specification of the format accepted by terry here.
