Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Weave data through templates to produce static text content, like configuration files, static web sites and more.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

gunnyworks/gunny-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gunny

GitHub Actions Workflow Status Crates.io Version Crates.io License

Fast, simple text-based content generation from templates.

Usage

Inline templating and variable substitution

# Inline template variable substitution with output to stdout. Useful when
# subtituting either templates or variable values from environment variables.
gunny -t 'Hello {{name}}!' -v name=Michael
# Hello Michael!

# Inline template with multiple variable substitution.
gunny -t 'Hello {{name}}! Today is {{date}}' -v name=Michael -v date="$(date)"
# Hello Michael! Today is 2025-08-04

Supplying templates from a file

echo 'Hello {{name}}!' > ./template.hbs
gunny --template-file template.hbs -v name=Michael
# Hello Michael!

Piping templates through stdin

echo 'Hello {{name}}!' | gunny -v name=Michael --stdin template
# Hello Michael!

Supplying variables from a file

At present only JSON files are supported.

echo '{"name": "Michael"}' ./vars.json
gunny -t 'Hello {{name}}!' --variable-file vars.json

Supplying variables via stdin

At present only JSON-formatted data is supported.

echo '{"name": "Michael"}' | gunny -t 'Hello {{name}}!'

Templates

At present, only the Handlebars template engine is supported. In future, more template engines will be supported.

License

Licensed under either of

at your option.

About

Weave data through templates to produce static text content, like configuration files, static web sites and more.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages