Skip to content

bast/gitink

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
img
 
 
 
 
 
 
 
 
 
 
 
 
 
 
https://travis-ci.org/bast/gitink.svg?branch=master

gitink

ASCII to SVG Git log graph visualizer. Useful for teaching Git. Under the hood it uses https://github.com/bast/ascii2graph.

Example

$ cat example.txt

                     [feature]
                      |
                      v
               x1-----x2
              /
c1----c2----m1----c3----c4
  \        /            ^
   b1----b2----b3       |
   ^           ^       [master,HEAD]
   |           |
  [_branch]   [branch]

$ gitink --time-direction=90 --in-file=example.txt | display

This produces (display command requires imagemagick):

Git log graph example

Available options

$ 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).
  --help                    Show this message and exit.

Installation

$ pip install gitink

How do the colors work?

Coloring is done according to the first character of the commit hash. Other suggestions welcome.

I used this code before but the API changed?

You can find the old version on the spaghetti branch.

About

ASCII to SVG Git log graph visualizer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages