All Projects → fabien0102 → Git2json

fabien0102 / Git2json

Simple tool to get a JSON from your git log.

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
Ferret
Declarative web scraping
Stars: ✭ 4,837 (+26772.22%)
Mutual labels:  cli, tool
Jtc
JSON processing utility
Stars: ✭ 425 (+2261.11%)
Mutual labels:  cli, tool
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+110183.33%)
Mutual labels:  cli, tool
Awesome bot
✅ Validate links in awesome projects
Stars: ✭ 697 (+3772.22%)
Mutual labels:  cli, tool
Jql
A JSON Query Language CLI tool
Stars: ✭ 368 (+1944.44%)
Mutual labels:  cli, tool
Org Formation Cli
Better than landingzones!
Stars: ✭ 471 (+2516.67%)
Mutual labels:  cli, tool
Consola
Elegant Console Logger for Node.js and Browser 🐨
Stars: ✭ 3,461 (+19127.78%)
Mutual labels:  cli, log
Bat
A cat(1) clone with wings.
Stars: ✭ 30,833 (+171194.44%)
Mutual labels:  cli, tool
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
Frankenstein
Correct README Redirects
Stars: ✭ 305 (+1594.44%)
Mutual labels:  cli, tool
Release It
🚀 Automate versioning and package publishing
Stars: ✭ 4,773 (+26416.67%)
Mutual labels:  cli, tool
Circleci Cli
Use CircleCI from the command line
Stars: ✭ 297 (+1550%)
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
Onefetch
Git repository summary on your terminal
Stars: ✭ 3,680 (+20344.44%)
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
Diskus
A minimal, fast alternative to 'du -sh'
Stars: ✭ 674 (+3644.44%)
Mutual labels:  cli, tool
Hover
Hover helps developers to release Flutter applications on desktop.
Stars: ✭ 698 (+3777.78%)
Mutual labels:  cli, tool

git2json

Build Status Code Climate Issue Count Test Coverage npm version

Simple tool to get a JSON from your git log.

CLI usage

  1. Install package globally -> npm i -g @fabien0102/git2json or yarn global add @fabien0102/git2json
  2. Navigate to your local git repository folder
  3. Do git2json > export.json
  4. Voilà!

Lib usage

  1. Add dependency -> npm i -s @fabien0102/git2json or yarn add @fabien0102/git2json
  2. 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].