{"id":16081978,"url":"https://github.com/l1mey112/v-tmpl","last_synced_at":"2026-03-18T17:51:13.984Z","repository":{"id":113619014,"uuid":"555880438","full_name":"l1mey112/v-tmpl","owner":"l1mey112","description":"Implementation of the compile time V template system for generic runtime use","archived":false,"fork":false,"pushed_at":"2022-10-22T15:05:09.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T22:47:07.613Z","etag":null,"topics":["vlang","vlang-module"],"latest_commit_sha":null,"homepage":"","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l1mey112.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-22T14:53:31.000Z","updated_at":"2022-10-22T21:02:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"50f68a48-1012-41af-90ff-80a6560933d5","html_url":"https://github.com/l1mey112/v-tmpl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1mey112%2Fv-tmpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1mey112%2Fv-tmpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1mey112%2Fv-tmpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1mey112%2Fv-tmpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l1mey112","download_url":"https://codeload.github.com/l1mey112/v-tmpl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332524,"owners_count":20921852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vlang","vlang-module"],"created_at":"2024-10-09T11:24:53.597Z","updated_at":"2026-01-18T01:36:15.574Z","avatar_url":"https://github.com/l1mey112.png","language":"V","funding_links":[],"categories":[],"sub_categories":[],"readme":"# v-tmpl\n\nAn implementation of the compile time template system for generic use. Striving to be compatible with and to extend the existing V `$tmpl()` system.\n\nThis is highly experimental, most features are not properly implemented and there are some edge cases. Be warned.\n\nPRs welcome!\n\n# Basic Usage\n\n```v\nimport tmpl\n\nfn main() {\n\tmut context := map[string]tmpl.Any\n\t\n\tcontext = {\n\t\t'name' : 'Peter'\n\t\t'age' : 25\n\t\t'numbers' : [tmpl.Any(1), 2, 3]\n\t}\n\n\ta := \n\"name: @name\n\nage: @age\n\nnumbers: @numbers\n\n@for number in numbers\n  @number\n@end\n\n@include README.md\"\n\n\tb := tmpl.template_string(a, context) or {\n\t\tpanic(err)\n\t}\n\n\tassert b.split_into_lines()[0] == \"name: Peter\"\n\tassert b.split_into_lines()[2] == \"age: 25\"\n\tassert b.split_into_lines()[4] == \"numbers: [1, 2, 3]\"\n}\n```\n\n```\n(template error) file.tmpl:9:1: value not found in template context\n(template error) file.tmpl:7:1: unhandled template statement\n(template error) file.tmpl:11:1: file to include could not be opened\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl1mey112%2Fv-tmpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl1mey112%2Fv-tmpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl1mey112%2Fv-tmpl/lists"}