deuill/grawkit

Unable to run it on Mac

Closed this issue · 10 comments

I got no error messages, but it generates nothing.

Any tips?

I think Mac OS X either bundles older versions of GNU Awk (gawk), or has just plain BSD Awk, and unfortunately we depend on GNU Awk extension at the moment.

If you have brew installed, you should be able to get gawk installed using:

brew install gawk

I'm working on getting an online playground going so you won't have to do this in the future.

Thank you for the quick answer.
I have installed gawk with brew before my first message.

Yeah, having it online would be amazing.

For now, I'll try it with docker.

Ah, apologies. I'll give this a whirl on a Mac OS X machine if I can get my hands on one, but yeah, Docker is probably your best bet at the moment. No idea why this isn't returning an error.

You should be able to either pass input in via standard input, or point grawkit to a file. The simplest example is:

$ printf "git commit" | ./grawkit
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -10 112 120">
<more SVG output>
</svg>

You can then redirect to a file etc. as per usual. The README file explains this in a bit more detail.

Nice, thanks! I'll see about getting this working with POSIX Awk as well.

Grawkit is now POSIX-compatible, and should work with whatever AWK implementation is included in Mac OS X. I'll close this, as the playground is still a ways away, feel free to re-open if you find any additional issues.

This is now available on https://grawkit.deuill.org