Running `grawkit` locally can be a hassle for one-off tasks, and can be hard to iterate against
when plotting graphs based on complex command-line descriptions. Given recent fixes for POSIX
compatibility, this commit implements a basic web-based "playground"-style application that allows
for entering command-line descriptions in an HTML textarea, and seeing the results (or errors)
instantly.
The playground application itself is built in Go (Awk itself would be insufficient for the
throughput required, but may be investigated in the future), with the excellent GoAwk library
providing parsing and execution duties, therefore making for a pure-Go implementation (other than
Grawkit itself).
Additional support for setting custom styling and an online deployment with Docker are forthcoming.
This commit removes `gawk`-specific extensions in Grawkit, making it work for any POSIX-compatible
AWK, with `gawk`, `nawk`, `busybox awk`, and `goawk` passing the test suite successfully.
The largest changes are related to removing `match` extensions for capturing groups; these were used
for parsing command-lines, and have now being handled in the `parse_command` function in a more robust
way.
Other small changes have been made to the included `Makefile` for allowing tests to run against
different AWK implementations.
This commit fixes handling for fatal errors, printing these to standard error and returning a
non-zero error code by checking for these in the `END` section, as required by Awk.
This is orthogonal to behaviour for rendering paths from the beginning of time for branches created
before the first commit, and helps frame the history in a better way.
This further simplifies handling of merges, which was made correct in commit 675e79c. We now
correctly set both source and destination commit references, where an empty source reference means
the base of the branch being merged into.
This commit contains a few minor fixes to documentation and function names, for clarity, and adds a
`textLength` attribute to `<text>` elements in labels, thereby ensuring that the text is contained
within the label.
Fixes#1
The primary branch (`master` or whichever other branch is the primary) has now
an automatic merge path that leads to the beginning of time, much like branches
that have been created before the first commit.
The font pitch is also fixed to half the height, as is usually the case with
monospace fonts.
Graphs are now drawn vertically, from top-to-bottom, which simplifies
the drawing algorithm in the case where commit titles, branch names and
tags have to be drawn.
This version has support for adding commits on a single branch using
`git commit`, and enough scaffolding for adding additional commands and
accompanying tests easily.