Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tarmstrong/git2json
Convert git logs to JSON for easy analysis
https://github.com/tarmstrong/git2json
Last synced: 8 days ago
JSON representation
Convert git logs to JSON for easy analysis
- Host: GitHub
- URL: https://github.com/tarmstrong/git2json
- Owner: tarmstrong
- License: bsd-3-clause
- Created: 2013-09-24T03:07:29.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-08-05T12:11:00.000Z (over 2 years ago)
- Last Synced: 2024-11-29T04:51:46.542Z (13 days ago)
- Language: Python
- Size: 56.6 KB
- Stars: 74
- Watchers: 7
- Forks: 22
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - git2json - Convert git logs to JSON for easy analysis (Python)
README
===============================
Git2JSON
===============================.. image:: https://badge.fury.io/py/git2json.png
:target: http://badge.fury.io/py/git2json
.. image:: https://travis-ci.org/tarmstrong/git2json.png?branch=master
:target: https://travis-ci.org/tarmstrong/git2json.. image:: https://pypip.in/d/git2json/badge.png
:target: https://crate.io/packages/git2json?version=latestConvert git logs to JSON for easier analysis.
* Free software: BSD license
* Documentation: http://git2json.rtfd.org.Installation
------------The easiest way to install ``git2json`` is through pip:
::
pip install git2json
If you want the most up-to-date version (at a greater risk of encountering
bugs) you can clone this repository and install it manually:::
git clone https://github.com/tarmstrong/git2json.git
cd git2json
python setup.py installUsage
-----::
usage: git2json [-h] [--git-dir GIT_DIR] [--since SINCE]
optional arguments:
-h, --help show this help message and exit
--git-dir GIT_DIR Path to the .git/ directory of the repository you are
targeting
--since SINCE Show commits more recent than a specific date. If
present, this argument is passed through to "git log"
unchecked.
--args SRCS Pass additional arguments to git logusage: git2json [-h] [--git-dir GIT_DIR]
The resulting JSON log is printed to standard output.
Example JSON
------------The following shows the structure of the JSON emitted by the tool.
::
[{
"committer": {
"date": 1379903278,
"timezone": "-0400",
"name": "Tavish Armstrong",
"email": "[email protected]"
},
"parents": ["e307663594031738c932877c8589552d5aafc953"],
"author": {
"date": 1379903278,
"timezone": "-0400",
"name": "Tavish Armstrong",
"email": "[email protected]"
},
"tree": "bd03127651335e3a51241f507f3bf194d8336485",
"commit": "d06454c160218b4a782afad2429abda1add54df0",
"message": "Allow user to specify git-dir on the command line.",
"changes": [
[23, 3, "git2json/__init__.py"]
]
},
// ... More commits
]Usage Examples
==============* `How Long Does It Take To Review an IPython Pull Request? `_ by Tavish Armstrong (git2json author)
If you are using ``git2json`` in interesting ways, please share and I will
add your notebooks/blog posts/code to this list.