Sfi

Simple File Importer
(06/04/2021)
Repo: https://github.com/bomboclat/sfi

Sfi is a minimal template engine written with very few lines of C code. It was born along with Yass to generate static website content from a minimal and modular structure.

Initially, it was born to import only the files between the double curly braces, but recently I've implemented a functionality: when sfi found the string {{...}}, parses the value from stdin. This functionality moves sfi from a Simple File Importer to a real minimal template engine.

Features

It's able to import files recursively and print them as unique output in the stdout.

It can import files:

{{/path/to/file_to_import}}

It can import multiple values from stdin:

{{...}}

You can mix both and dynamically change the file name to import escaping the {{ of the outer import:

\{{/path/to/{{...}}\}}

after run sfi, the result will be:

{{/path/to/file_from_variable}}

and re-run sfi to import that file.

If you are instrested, check out the repository.

Back to menu