{"id":16881594,"url":"https://github.com/benbjohnson/tmpl","last_synced_at":"2025-03-17T06:31:31.311Z","repository":{"id":50594923,"uuid":"48185761","full_name":"benbjohnson/tmpl","owner":"benbjohnson","description":"Command line interface to Go's text/template library.","archived":false,"fork":false,"pushed_at":"2021-03-31T17:41:24.000Z","size":24,"stargazers_count":84,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T23:56:17.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/benbjohnson.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}},"created_at":"2015-12-17T16:32:52.000Z","updated_at":"2024-10-08T06:14:26.000Z","dependencies_parsed_at":"2022-09-26T21:21:53.565Z","dependency_job_id":null,"html_url":"https://github.com/benbjohnson/tmpl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Ftmpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Ftmpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Ftmpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Ftmpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbjohnson","download_url":"https://codeload.github.com/benbjohnson/tmpl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847062,"owners_count":20357317,"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":[],"created_at":"2024-10-13T16:04:06.612Z","updated_at":"2025-03-17T06:31:30.975Z","avatar_url":"https://github.com/benbjohnson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tmpl\n\nThis program is a command line interface to Go's `text/template` library. It\ncan be used by passing in a set of JSON-encoded data and a list of template\npaths ending in a `.tmpl` extension. The templates are processed and their\nresults are saved to the filename with the `.tmpl` extension removed.\n\n\n## Getting Started\n\nTo install `tmpl`, simply run:\n\n```sh\n$ go get github.com/benbjohnson/tmpl\n```\n\nThen run `tmpl` against your desired templates:\n\n```sh\n$ tmpl -data '[\"foo\",\"bar\",\"baz\"]' a.go.tmpl b.go.tmpl\n```\n\nYou will now have templates generated at `a.go` and `b.go`.\n\n\n### Template data files\n\nOnce your data set gets larger, it may be useful to move it to its own file\ninstead of specifying it on the command line. To use a data file instead\nof raw JSON on the command line, use the `-data` argument but prefix your\npath with an `@` symbol.\n\n```sh\n$ echo '[\"foo\",\"bar\",\"baz\"]' \u003e tmpldata\n$ tmpl -data=@tmpldata my.tmpl\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Ftmpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbjohnson%2Ftmpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Ftmpl/lists"}