Skip to content
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

String template support #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

davidfraser
Copy link

This adds the ability to use string templates to generate text incorporating variables and calculations
The string templates are quoted - either singly on an individual line, or with triple quotes over multiple lines
The mustache template syntax is used (basically just {{expression}}; the more advanced functions like sections aren't relevant)
mathjs expressions are supported within the template expressions.

Not sure if this would be of interest, or if you think this syntax the best
I've found it useful with calculating things and then generating messages explaining them
(I also adjusted the styling to be able to produce wider output)

@SteveRidout
Copy link
Owner

Thanks! I like the idea!

I'm not working on this repo at the moment, so I won't merge it right now. But will leave it here for others to see and in case I return to it in future.

@davidfraser
Copy link
Author

Sadly notepadcalculator.com is giving a 502 Bad Gateway this morning ... not sure where to report this?

@SteveRidout
Copy link
Owner

Very sorry about that. It's up and running again now!

I'm not sure what the root cause of this was, so if you notice this happening again please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants