Skip to content
/ jt Public

jt (JSON Templating), a simple templating tool to process JSON with go text/template

Notifications You must be signed in to change notification settings

orirawlings/jt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

jt (JSON Templating)

A simple templating tool that takes json data on standard in and renders it through a golang text/template.

Example usage:

$ curl -s 'https://api.github.com/users/orirawlings/repos' | jt repos.tmpl  # render JSON data with repos.tmpl template
Repositories:

orirawlings/alexa-sites
	Fork?: false
	Language: Python
	Description: Simple script to scrape top site names from alexa.com

orirawlings/git
	Fork?: true
	Language: C
	Description: Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.

orirawlings/gopl.io
	Fork?: true
	Language: Go
	Description: Example programs from "The Go Programming Language"

orirawlings/parens
	Fork?: false
	Language: Python
	Description: Parsing paired parentheses

orirawlings/webcrawler
	Fork?: false
	Language: Go
	Description: A non-trivial Go program which crawls the world wide web to help me learn/teach golang

$ cat repos.tmpl  # the template file
Repositories:
{{range .}}
{{.full_name}}
	Fork?: {{.fork}}
	{{with .language -}}
	Language: {{.}}
	{{end -}}
	{{with .description -}}
	Description: {{.}}
	{{end -}}
{{- end}}

About

jt (JSON Templating), a simple templating tool to process JSON with go text/template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages