-
Notifications
You must be signed in to change notification settings - Fork 5
C library for a Lua templating system
License
jajm/libio
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
libio is a C library that provides a Lua templating system. This means it can parse template files with embedded Lua code. For example, say you have a file hello.tpl: Hello, {{ string.lower(name) }} In order to parse this file and produce the wanted output, you have to write this little C program: #include <libio/io_template.h> #include <embody/embody.h> #include <sds.h> int main() { io_template_t *T = io_template_new(NULL); io_template_set_template_file("hello.tpl"); io_template_param(T, "name", emb_new("sds", sdsnew("WORLD"))); puts(io_template_render(T)); io_template_free(T); return 0; } That will produce the following output: Hello, world Requirements ============ libio requires the following libraries: * libgends (>= 2) * sds * embody
About
C library for a Lua templating system
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published