The Awksome Git Graph Generator
Go to file
Alex Palaistras 24d63cd8a9 Implement initial version of Grawkit Web Playground
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.
2019-08-25 16:30:34 +01:00
play Implement initial version of Grawkit Web Playground 2019-08-25 16:30:34 +01:00
tests Render paths to end of time for branches with no final merges 2019-08-06 12:51:57 +01:00
.editorconfig First version of Grawkit, with simple single-branch test 2016-10-30 23:17:54 +00:00
LICENSE Implement initial version of Grawkit Web Playground 2019-08-25 16:30:34 +01:00
Makefile Make Grawkit POSIX-compatible, remove `gawk`-specific extensions 2019-08-11 11:29:03 +01:00
README.md Make Grawkit POSIX-compatible, remove `gawk`-specific extensions 2019-08-11 11:29:03 +01:00
grawkit Make Grawkit POSIX-compatible, remove `gawk`-specific extensions 2019-08-11 11:29:03 +01:00

README.md

Grawkit - The Awksome Git Graph Generator MIT License

Grawkit is a tool that helps build SVG graphs from git command-line descriptions, and is built in Awk.

This tool was created in support of the "Orthogonal Git Workflow" post. Yes, this took way longer to write than the post itself.

Testing & Documentation

A Makefile is provided for running tests and producing documentation for Grawkit. Run make help in the project root for more information.

A full test-suite is provided (depending only on make and awk), which should serve as a good example of the existing feature-set. Run it with make test.

Installation

Copy the included grawkit AWK script into your local search path (most commonly $HOME/.local/bin), or just use it directly in this folder. Grawkit should work with most POSIX-compatible AWK implementations, and has been tested against gawk, nawk, busybox awk, and goawk.

Status & Usage

Grawkit has basic support for common git commands such as git branch, git tag and git merge, allowing for fairly complex graphs. The integrated test-suite serves as an example, check the tests folder for more.

In order to use this tool, either run the grawkit executable against a file containing supported git commands (any command not recognized will be silently ignored), or pass these in standard input. For instance, given the following file test.txt:

git commit -m "Commit on master"
git commit -m "More stuff"

git branch test-stuff
git checkout test-stuff

git commit -m 'Testing stuff'
git commit

git checkout master
git commit

You can execute either:

cat test.txt | grawkit
# or
grawkit test.txt

Which will produce SVG markup to standard output, rendered as:

License

All code in this repository is covered by the terms of the MIT License, the full text of which can be found in the LICENSE file.