Template Code Generator

Generate template code for competitive programming.

Lightweight Rust based command line utility to automate the creation of problem files for competitive programming or practice. It generates problem files based on customs templates.

Prerequisites

Usage

The program expects the following command-line arguments:

tcg <name> -t <template>

Optionally provide an input output file

tcg <name> -t <template> -i <input> -o <output>

Example

To generate problem files for a problem named "example" with the language extension "py", an input file named "example.in", and an output file named "example.out", you would run the following command:

tcg example -t io.py -i %.in -o %.out

This command will create a directory named "example" and generate the necessary problem files inside it.

Templates

List of the default template files. All of these are customizable. Use %input% and %output% as placeholders for input and output files.

Python
io.py

```python with open("%input%","r") as f: case = f.read()

with open("%output%","w") as f: f.write(case) ```

cli.py

```python case = input()

print(case) ```

License

This program is licensed under the MIT License.