fabien0102 / Git2json
Simple tool to get a JSON from your git log.
Stars: ✭ 18
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Git2json
Phpinsights
🔰 Instant PHP quality checks from your console
Stars: ✭ 4,442 (+24577.78%)
Mutual labels: cli, tool
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+110183.33%)
Mutual labels: cli, tool
Consola
Elegant Console Logger for Node.js and Browser 🐨
Stars: ✭ 3,461 (+19127.78%)
Mutual labels: cli, log
Legit
Git for Humans, Inspired by GitHub for Mac™.
Stars: ✭ 5,682 (+31466.67%)
Mutual labels: cli, tool
Pastel
A command-line tool to generate, analyze, convert and manipulate colors
Stars: ✭ 3,742 (+20688.89%)
Mutual labels: cli, tool
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (+4244.44%)
Mutual labels: cli, tool
Release It
🚀 Automate versioning and package publishing
Stars: ✭ 4,773 (+26416.67%)
Mutual labels: cli, tool
Npkill
List any node_modules directories in your system, as well as the space they take up. You can then select which ones you want to erase to free up space.
Stars: ✭ 5,325 (+29483.33%)
Mutual labels: cli, tool
Teip
Select partial standard input and replace with the result of another command efficiently
Stars: ✭ 280 (+1455.56%)
Mutual labels: cli, tool
Hover
Hover helps developers to release Flutter applications on desktop.
Stars: ✭ 698 (+3777.78%)
Mutual labels: cli, tool
git2json
Simple tool to get a JSON from your git log.
CLI usage
- Install package globally ->
npm i -g @fabien0102/git2json
oryarn global add @fabien0102/git2json
- Navigate to your local git repository folder
- Do
git2json > export.json
- Voilà!
Lib usage
- Add dependency ->
npm i -s @fabien0102/git2json
oryarn add @fabien0102/git2json
- Use it!
const git2json = require('@fabien0102/git2json');
git2json
.run()
.then(myGitLogJSON => console.log(myGitLogJSON));
Advanced usage
If needed, you have access to parsers
and defaultFields
for easy overriding.
Example:
const git2json = require('@fabien0102/git2json');
const exportedFields = {
author: git2json.defaultFields['author.name'],
commit: git2json.defaultFields.commit,
shortTree: { value: '%T', parser: a => a.slice(0, 5)}
};
git2json
.run({fields: exportedFields})
.then(json => console.log(json));
You can also specify a path, or paths, for the git repository. Just like the above options, doing so is optional with sane defaults. Multiple paths results in a flattened combined log output.
Example specifying path
:
const git2json = require('@fabien0102/git2json');
const path = '~/src/hack/git2json';
git2json
.run({ path })
.then(console.log);
Example specifying paths
:
const git2json = require('@fabien0102/git2json');
const paths = ['~/etc', '~/src/hack/git2json'];
git2json
.run({ paths })
.then(console.log);
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].