Packet Generation

A packet can be generated using the basalt CLI. To do so, you must first have a valid basalt server configuration. By default, the CLI uses basalt.toml in the current directory, but a different path may be specified, if necessary.

Generating the Packet

To generate the packet, run the following command.

basalt render [config.toml]

This command will create a PDF with the same name as your config that looks like the one shown below.

The output file may be changed using the -o or --output flag.

Customising the Template

The PDF is generated using Typst with a default template found here. This template may be changed by passing the path to a template file using -t or --template.

Templates are provided with the following values:

NameTypeDescription
titlestrThe title of the competition, as specified in the config
preamblecontent or noneThe rendered markdown from the preamble, if specified in the config, otherwise none
problemsProblem[]List of problems from the config

Problem

A Problem consists of the following fields:

NameTypeDescription
titlestrThe title of the problem, as specified in the config
descriptioncontent or noneThe rendered markdown from the description, if specified in the config, otherwise none
languagesstr[]Languages allowed for this problem
testsTest[]Tests for this problem

Tests

A Test consists of the following fields:

NameTypeDescription
inputstrThe input to the test, as specified in the config
outputstrThe expected output of the test, as specified in the config
visibleboolWhether this test case is marked as visible

Example

Unable to display PDF file. Download instead.