twolfson / reverse-mustache

Reverse templating library for mustache, generating variables from a template's output
The Unlicense
30 stars 6 forks source link

Greedy variables win over lists #9

Open RobinKnipe opened 4 years ago

RobinKnipe commented 4 years ago

I have been trying to use reverseMustache to extract the information in artillery.js logs here. I've proofed the templates with some tests - writing a JSON object to a log file with Mustache - but the reverse tests using the same parts don't work. It seems variables (which should be small strings or numbers) are gobbling up multiple lines, that should instead resolve to lists. I will try and boil this down to a more simple example, but for the moment the project tests show what's going on.

twolfson commented 4 years ago

Thanks for reaching out! I'm no longer maintaining this project (will archive now)

I did document in the README that this is a quick and dirty (read as proof of concept) implementation. I think I too have run into a similar issue

Your use case seems simple enough that you might be able to get away with using multiple levels of extract-values instead

https://github.com/laktek/extract-values

Going to leave this issue open with a help wanted marker