volks73 / groom Goto Github PK
View Code? Open in Web Editor NEWA command line utility for processing mustache templates written in rust
Home Page: https://volks73.github.io/groom
License: GNU General Public License v3.0
A command line utility for processing mustache templates written in rust
Home Page: https://volks73.github.io/groom
License: GNU General Public License v3.0
Add support for handlebar templates in addition to mustache templates. The file extension for the input argument would be used to determine the format and which parser/crate is used.
A --template-format
option and associated template_format
method should be added to override the file extension determination of the template format or provide an indicator when the template has no extension or a different one from handlebar
, hbs
, or mustache
.
Multiple data formats should be supported.
If a data file is specified as an argument to the application, then the file extension should be used to determine the format of the data. For example, if the data file is named "data.yml", then the data will be decoded from the YAML format, but if it is "data.msgpack" then it is decoded from the MessagePack format. Any format that has serde support in Rust should be supported.
A --data-format
option and subsequent data_format
method should be added as well. This would override the format determined by the file extension or be used to change the default format from YAML to something else if the data is read from stdin
or the data file has no extension.
A basic HTTP server, like this one, should be integrated with groom to locally serve rendered templates. The majority use-case for Mustache (and Handlebar) templates are websites and HTML. It would be nice during development of templates and testing to "host" the website generated from the templates.
A -s,--serve
flag or a serve
subcommand along with an alternative consuming method to the builder API for the application should be added. This would require renaming the run
method to something like render
or process
and adding serve
method that would consume the Groom struct and run the built-in server.
When the --serve
flag is issued, groom would render the input template with the specified data and then look for a .html
file of the same name as the template to serve. The server would start after rendering and be locally hosted at http://localhost:8080. A -p, --port
option would also be added to change the port at run time.
A -l,--listen
flag or listen
subcommand should be added that "listens" for a file to be modified. When a modification is detected, groom re-renders the template. The data would have to be specified in a file for this to work. This would be useful with the serve
feature from #3 to automatically refresh a web page after modification.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.