Closed patrislav1 closed 5 months ago
It started out as hack but now it feels more serious so is a probably a good idea! 😄 Also thought about setting up action that builds binaries using goreleaser (works fine for fq, ex: https://github.com/wader/fq/releases/tag/v0.9.0), maybe someone even wants to package it for some distributions?
For version number i'm not sure, maybe simplest is to increase manually at good points for now?
I just found ansisvg, and I have to say that this is a really neat idea! Finally a way to create proper small-size screenshots that are diff-friendly and that can be used for unit testing command-line output!
Just for this, I installed Go, but I would have vastly preferred some binary release the way you describe it. So I would be all for releasing this with a proper version number. :)
I just found ansisvg, and I have to say that this is a really neat idea! Finally a way to create proper small-size screenshots that are diff-friendly and that can be used for unit testing command-line output!
Hey, thanks! can't really take credit for the idea, there are a bunch of similar tools, but at least at the time when i needed it none of them really fitted my need or were quite mess to install etc. Also @patrislav1 have helped greatly with adventures into SVG compatibility.
Just for this, I installed Go
😬 as tradeoff i promise to spend more time with rust! actually started looking into adding some stuff to jaq but maybe looking into support "shorthand" object literals 123 as $a | {$a}
and {a:123} | {a}
and destructing was a bit too deep too fast :)
but I would have vastly preferred some binary release the way you describe it. So I would be all for releasing this with a proper version number. :)
Yeap should really fix that. I was about to but got distracted by something. 👍 for reminding me
@01mf02 also a bit curious about unit testing usage, please link once/if there is something public to look at
@01mf02 now releases are built, can you give https://github.com/wader/ansisvg/releases/tag/v0.1.0 a try?
Closing, reopen if something seems fishy
@wader, I just gave 0.1.0 a try, and it works perfectly. Thanks a lot!
Concerning unit testing usage: My idea was to use ansisvg to produce colored output from an executable that can be compared to reference SVG files when unit testing. Some kind of golden tests, but with better visual control. The Typst project does something similar, by using PNGs as reference for unit tests. https://github.com/typst/typst/tree/a2c980715958bc3fd71e1f0a5975fea3f5b63b85/tests/ref But of course, SVGs are much more compact. :)
😬 as tradeoff i promise to spend more time with rust! actually started looking into adding some stuff to jaq but maybe looking into support "shorthand" object literals
123 as $a | {$a}
and{a:123} | {a}
and destructing was a bit too deep too fast :)
Don't worry, I am currently rewriting the parser anyway, so this kind of work would most likely have been obsolete. But I'm happy to hear that you are venturing into Rust. :)
Concerning unit testing usage: My idea was to use ansisvg to produce colored output from an executable that can be compared to reference SVG files when unit testing. Some kind of golden tests, but with better visual control. The Typst project does something similar, by using PNGs as reference for unit tests. https://github.com/typst/typst/tree/a2c980715958bc3fd71e1f0a5975fea3f5b63b85/tests/ref But of course, SVGs are much more compact. :)
I see, makes sense. One word of caution is that SVG renderers sadly behave a bit differently, especially around font rendering. But the default output of ansisvg should work fine in most browsers but there might be issues in inkscape etc.
😬 as tradeoff i promise to spend more time with rust! actually started looking into adding some stuff to jaq but maybe looking into support "shorthand" object literals
123 as $a | {$a}
and{a:123} | {a}
and destructing was a bit too deep too fast :)Don't worry, I am currently rewriting the parser anyway, so this kind of work would most likely have been obsolete. But I'm happy to hear that you are venturing into Rust. :)
Ok, will await parser rewrite 👍
would be nice to have a version number, wouldn't it? :upside_down_face:
I like "git describe"-based versioning that automatically picks up the latest Git tag plus the number of commits after that so ends up with something like "v1.20" for a tagged version or "v1.20-5" for a untagged version 5 commits after that. But not sure how to do that in golang :wink: