Code Monkey home page Code Monkey logo

git-stats-importer's Introduction

$ git-stats-importer

PayPal AMA Version Downloads Get help on Codementor

Imports your commits from a repository into git-stats history.

This tool imports commits into the git-stats commit history. If you like to import all your commits from BitBucket and GitHub, check out the Repository Downloader project.

☁️ Installation

You can install the package globally and use it as command line tool:

$ npm i -g git-stats-importer

Then, run git-stats-importer --help and see what the CLI tool can do.

$ git-stats-importer --help
Usage: git-stats-importer [options]

Options:
  -f, --find-repos <path>  If this option is provided, the importer will
                           search for repositories in the provided path
                           (recursively).
  -d, --delete             Delete the commits from selected repositories.
  -e, --emails <emails>    Comma separated emails you want to include in the
                           import process. By default it's the
                           $GIT_AUTHOR_EMAIL value.
  -h, --help               Displays this help.
  -v, --version            Displays version information.

Examples:
  git-stats-importer # imports the commits from the current repository
  git-stats-importer --delete # deletes the commits from the current repo
  git-stats-importer --find-repos ~/github # searches for repositories in the ~/github dir
  git-stats-importer --delete --find-repos ~/github # deletes the commits from the ~/github dir

Documentation can be found at https://github.com/IonicaBizau/git-stats-importer

πŸ“‹ Example

Here is an example how to use this package as library. To install it locally, as library, you can do that using npm:

$ npm i --save git-stats-importer
// Dependencies
var GitStatsImporter = require("git-stats-importer");

// Start importing
var importer = GitStatsImporter({
    // If true, it will delete these commits
    delete: false

    // The path to the project/projects directory
  , path: "~/some-project"

    // If true, it will import all the repositories found
    // in the provided path
  , recursive: false

    // A list with the emails
  , emails: [
        "[email protected]"
      , "[email protected]"
    ]
});

// Output for git folders
importer.on("gitFolder", function (dir) {
    /* do something when a git folder is found */
});

// Listen for import
importer.on("import", function (data) {
    /* do something when a commit is imported */
});

// Listen for import
importer.on("error", function (err, data) {
    /* do something when errors occur */
});

// Listen for delete
importer.on("delete", function (data) {
    /* do something on delete */
});

// Listen for finish
importer.on("finish", function (data) {
    /* do something on finish */
});

πŸ“ Documentation

For full API reference, see the DOCUMENTATION.md file.

πŸ˜‹ How to contribute

Have an idea? Found a bug? See how to contribute.

πŸ“œ License

MIT © Ionică Bizău

git-stats-importer's People

Contributors

ionicabizau avatar jc1arke avatar linquize avatar revolter avatar furkanmustafa avatar ainthek avatar

Watchers

James Cloos avatar Anirudh Ramesh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.