{"repo":"docwhat/temple","free":true,"listed":false,"github":"https://github.com/docwhat/temple","clone":"git clone https://github.com/docwhat/temple.git","description":"Sick of sed? Prosaic about perl? Use temple to substitute your variables!","language":"Go","stars":14,"topics":["substitute","template","golang","go"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Temple Sick of sed ? Peaked about perl ? Use temple to substitute your variables! Installation Binaries I have pre-built binaries for several platform already. They are available on the releases page. Source If you have go v1.6 installed, then you can build the binary with the following command: Usage Usage: temple A simple templating engine Arguments: The template file to use ($TEMPLE TEMPLATE FILE) Flags: -h, --help Show context-sensitive help. --version Show version information -d, --data=DATA-FILE A YAML or JSON file to use via the {{data. }} interface ($TEMPLE DATA FILE) -H, --html Use HTML templating instead of text templating ($TEMPLE USE HTML) Note that the DATA file must have an object at the top level. You cannot use a bare string or an array. JSON Example: YAML Example: Template Syntax For complete documentation, read go's text/template and html/template. Sprig Functions Temple supports the complete list of Sprig functions. Data Sources - {{hostname}} -- The systems fully qualified domain name. - {{uid}} -- UID of the user running temple . - {{gid}} -- GID of the user running temple . - {{euid}} -- Effective UID of the user running temple . - {{egid}} -- Effective GID of the user running temple . - {{pwd}} -- The current working directory. - {{json}} -- Access to your JSON data. Use dot notation to get access to items. e.g. {{json.authors.greenwood.first name}} Functions - {{index 99}} -- The 99th item of the array . - {{ js}} -- escaped/quoted for JavaScript & JSO","default_branch":null,"files":null,"tree":[],"storefront":"/r/docwhat","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/docwhat/temple/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}