Displays a Commit Table for every of your github-years. This is practically a copy of githubs commitGraph functionality. But with the extra feature of showing commits older than a year and from different sources.
See it live in action here
How to use:
There are 3 primary methods to call on the
update(): Query commit data from the respective git server APIs
updateCache(): Create the HTML code and cache it
loadFromCache(): Load the html code from cache and return it
A typical use case is to call
updateCache() eg once a day and call
loadFromCache() every time you want to display the graph.
The commit data is cached in an sqlite database and the html code is cached in single html files.
ExtendedGitGraph2 constructor wants a configuration array object.
For an example look at the file
A few important configurations are:
- The output methods (where the log is written to (stdout, session, file, ...))
- The directory for the cache files
- The identities (only commits from these email adresses are counted)
- The remote sources
In the config array you have to supply one or more sources for commit data.
Currently two types are supported:
github and (self-hosted)
Additionally you can supply an array of excluded repositories.
Also (for most remotes) you have to set some way of authentication (oauth, basic auth, etc)
Live status output
For a more interactive
update() experience (it can take a few minutes depending how many repositories you have) you can set output_session to true and the output will be written to a session variable.
Then you can repeatedly query the session to get the current stdout.
For a (quick and dirty) written example see
You need to include the supplied script.js and style.css (script.js only if you want to have the tooltip).
Also you can change the theme by editing the style.css and uncommenting the theme definitions.
There are a few predefined themes included: