Justine Pelletreau 5bde8b5535
All checks were successful
continuous-integration/drone Build is passing
Made analyze_string public
2023-01-13 13:26:16 +01:00
2023-01-13 13:26:16 +01:00
2023-01-11 18:10:06 +01:00
2023-01-11 18:10:06 +01:00
2023-01-11 18:23:35 +01:00
2023-01-11 17:36:06 +01:00
2023-01-11 17:36:06 +01:00
2023-01-11 17:36:06 +01:00
2023-01-12 10:28:36 +01:00

Flair

An extra simplified version of Jinja, written as a Rust lib.

TODO

  • Add a function that reads from a string
  • Add a sanitize function that removes %%words%% from a string, which could be useful to avoid user-side injection

Features

  • Reads templates
  • Dynamically generate content based on variables or bash commands

Why ?

I'm learning Rust and try to create simple, usable tools for myself. This is by no means meant to end up in production anywhere.

Templates ?

Templates are defined as .ft files.

They may contain any text. Special words are defined between percentage signs:

Hello %%name%%
Today is the %%cmd: date%%

Try

An example website is included, that uses a template for its index.html.

To see it, clone this repo, then:

cargo run

Next, go to http://localhost:8080

Use

Add this to your Cargo.toml

flair = { git = "https://gitea.squi.fr/Rust/flair.git" }

Doc

Clone this repo, then compile and open the doc:

cargo doc --open

Author

Justine Pelletreau

➤ License

Distributed as is.

Description
Flair is a dumbed-down, very very basic version of jinja as a Rust lib.
Readme 88 KiB
Languages
Rust 75.4%
CSS 13.9%
HTML 10.7%