Templo Engine

Template engine of Templo tool for insert and modify variables inside of text files.

# example

The input text can have some placeholders represented by "{> arg <}". These placeholders will be used to insert the variables passed to compile function. The engine provides some native functions to manipulate the variable value.

input.py ```py class {> upperfirst(classname) <}: def init(self): self.name = '{> class_name <}'

obj = {> upperfirst(classname) <}()

print(f'The class name is {obj.name}')

```

## execution

``` rust // Getting the input text let inputtext = std::fs::readto_string("./input.py").unwrap();

// The variables let variables: Vec = vec![temploengine::Input { key: "classname".tostring(), value: "dog".tostring(), valuetype: temploengine::InputValueType::String, }];

// Compiling the text let text = temploengine::insert(inputtext, &variables);

// writing the output file std::fs::write("./output.py", text.unwrap()).unwrap(); ```

output.py ```py class Dog: def init(self): self.name = 'dog'

obj = Dog()

print(f'The class name is {obj.name}') ```