https://github.com/bast/gitink
ASCII to SVG Git log graph visualizer.
https://github.com/bast/gitink
git graph svg
Last synced: 7 months ago
JSON representation
ASCII to SVG Git log graph visualizer.
- Host: GitHub
- URL: https://github.com/bast/gitink
- Owner: bast
- License: mpl-2.0
- Created: 2015-05-30T13:49:54.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T13:30:25.000Z (over 1 year ago)
- Last Synced: 2024-04-24T08:29:46.830Z (over 1 year ago)
- Topics: git, graph, svg
- Language: Python
- Homepage:
- Size: 333 KB
- Stars: 31
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/bast/gitink/actions)
[](LICENSE)
[](https://badge.fury.io/py/gitink)
# gitink
ASCII to SVG Git log graph visualizer. Useful for teaching Git.
Under the hood it uses https://github.com/bast/ascii2graph.
## Example
```console
$ cat example.txt
[feature]
|
v
x1-----x2
/
c1----c2----m1----c3----c4
\ / ^
b1----b2----b3 |
^ ^ [main,HEAD]
| |
[_branch] [branch]
```
```bash
$ gitink --in-file=example.txt | display
```
This produces (display command requires
[imagemagick](https://www.imagemagick.org)):

## Available options
```console
$ gitink --help
Usage: gitink [OPTIONS]
Options:
--scale FLOAT Scale sizes by this factor.
--in-file TEXT ASCII file to convert.
--time-direction INTEGER Direction of the time arrow (0, 90, 180, or 270).
Default: 90 (right).
--help Show this message and exit.
```
## Installation
```bash
$ pip install gitink
```
## How do the colors work?
Coloring is done according to the first character of the commit hash. Other
suggestions welcome.
## Other projects that are interesting
- [Asciio](https://nkh.github.io/P5-App-Asciio/): this project has a [Git
mode](https://nkh.github.io/P5-App-Asciio/modes/git.html) and can be
scripted [using the
API](https://nkh.github.io/P5-App-Asciio/for_developers/scripting.html) to
generate graphs.