kittv
/
prezgen
Archived
1
0
Fork 0

formatting

master
Dawid J. Kubis 3 years ago
parent 87d354ab15
commit 62b20e4dc9

@ -1,20 +1,27 @@
# prezgen # prezgen
A software for automatic generation of attendance lists for use at school. Our faculty/department uses physical attendance lists for logging every class and all the attendees. A software for automatic generation of attendance lists for use at school.
Our faculty/department uses physical attendance lists for logging every class and all the attendees.
This program is written in Rust in order to run as a single binary. This program is written in Rust in order to run as a single binary.
## Installation ## Installation
Install rust/cargo, clone this repository and run `cargo build --release`. The binary will be saved to `target/build/release`. Install rust/cargo (nightly edition), clone this repository and run `cargo build --release`. The binary will be saved to `target/build/release`.
## Usage ## Usage
In order to generate a full set of lists (PDF files), you need to have a TOML source file and a template written in HTML. The program reads the input file, checks all relevant variables and tries to find them in the template. If a variable is found, it gets filled with data from the source file variable of the same name. In case the variable is not found in the template, it gets ignored and the program continues to the next variable. In order to generate a full set of lists (PDF files), you need to have a TOML source file and a template written in HTML.
The program reads the input file, checks all relevant variables and tries to find them in the template.
If a variable is found, it gets filled with data from the source file variable of the same name.
In case the variable is not found in the template, it gets ignored and the program continues to the next variable.
### Template ### Template
The template has two sides, front and back. Both are static HTML files (with styles) ready for clean printing (`@media print` query). The template should contain variables, which would be later replaced by the generator. The format, in which a variable should be written, is `{{ variable_name }}` anywhere in the HTML document, for example: The template has two sides, front and back.
Both are static HTML files (with styles) ready for clean printing (`@media print` query).
The template should contain variables, which would be later replaced by the generator.
The format, in which a variable should be written, is `{{ variable_name }}` anywhere in the HTML document, for example:
```html ```html
<h2>{{ title }}</h2> <h2>{{ title }}</h2>