notepad-calculator icon indicating copy to clipboard operation
notepad-calculator copied to clipboard

String template support

Open davidfraser opened this issue 1 year ago • 3 comments

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)

davidfraser avatar Oct 27 '23 12:10 davidfraser

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.

SteveRidout avatar Oct 30 '23 09:10 SteveRidout

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

davidfraser avatar Nov 01 '23 07:11 davidfraser

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!

SteveRidout avatar Nov 01 '23 09:11 SteveRidout