-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Text output templating engine for XML/Javascript/etc files #11
Comments
I'm not in favor of having splat produce anything that resembles HTML natively. Have it produce other computer readable formats such as JSOM or XML would be far better. Let a separate tool convert the computer-readable output into front end displayable data. |
Having an optional HTML output would be a great feature and improves native usability. It also could serve as a kind of template for new splat web services - all that I knew are offline now. |
Sorry yeah, I misspoke and meant XML where I said HTML. I'll change the issue title. The general problem is the same though. |
@der-stefan When I mentioned HTML I was really thinking of the XML that's generated to make nice KML/KMZ files. For website usage, I'm not sure how much SPLAT! should generate, but I'd be more inclined to have it create JSON files that could be used as a data source for some client-side Javascript processing. |
Right now there's a bunch of different functions where XML is generated by doing sprintfs. Much is redundant and could be combined together. However, it occurs to me that it might be better to incorporate some sort of template engine for that. I'm not talking about sucking in a full-bore templating engine like Jinja or Jade (wrong language anyway), just creating a simple substitution engine where key tags in the text file get replaced with something out of std::unordered_map.
I'll have to analyze the code some, but I don't think we need much more than that.
If we have complex data it'd get complicated, but even then we could suck in something like https://github.com/pantor/inja.
The text was updated successfully, but these errors were encountered: