Giter Site home page Giter Site logo

git_history_visualizer's Introduction

A utility for calculating and visualizing lines of code in a git repository throughout it's history.

Includes the following stats for each commit, by language (i.e. file extension):

  • Number of files
  • Comment lines
  • Blank lines
  • Code lines

Prerequisites

Perl -- the main lines-of-code counting logic is in the cloc Perl script, which is called by linecount.sh for each individual git commit.

Ruby -- used to retrieve the set of Git repositories from a Github instance (e.g. github.com or Github Enterprise).

R -- used for stats visualizations over time. Requires the rbundler R package for dependency management.

Usage

There are several executables for running different high-level or lower-level tasks:

Run stats calculations and image generation for a given git repository:

run.sh GIT_REPOSITORY OUT_PATH

    GIT_REPOSITORY may be any git path or URL
    OUT_PATH is the path to which output (e.g. images, CSV) will be placed.

Run stats calculations or plot generation independently:

linecount.sh GIT_REPOSITORY OUT_PATH

    GIT_REPOSITORY may be any git path or URL
    OUT_PATH is the path to which output (e.g. images, CSV) will be placed.

run_linevis.R OUT_PATH

    OUT_PATH is the path to which output (e.g. images, CSV) will be placed.

Get a JSON representation of a given Github user's repositories:

github_repositories.rb HOST USER

    HOST the Github host from which to retrieve user repositories (e.g. www.github.com).
    USER the Github user for which to retrieve repositories (e.g. your-username).

Run stats calculations and image generation for a set of git repositories based on the output of github_repositories.rb:

run_linevis_for_repositories.rb REPOSITORIES_FILE PATTERN OUT_PATH

    REPOSITORIES_FILE the output of `github_repositories.rb` in JSON format
    PATTERN a Ruby regular expression used to match repositories from REPOSITORIES_FILE (e.g. '^stuff$')
    OUT_PATH is the path to which output (e.g. images, CSV) will be placed.

git_history_visualizer's People

Contributors

yoni avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

git_history_visualizer's Issues

cloc syntax errors, global symbols require explicit package names

Hi,

I'm using r 3.1.0 and perl 5.18.2. When I run run.sh <repo> <outdir>, the stdout is full of:

defined(@array) is deprecated at ../lib/cloc-1.55.pl line 980.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../lib/cloc-1.55.pl line 982.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../lib/cloc-1.55.pl line 1303.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../lib/cloc-1.55.pl line 1434.
        (Maybe you should just omit the defined()?)
syntax error at ../lib/cloc-1.55.pl line 1841, near "$symbol qw( == != + - )"
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1845.
Global symbol "$version" requires explicit package name at ../lib/cloc-1.55.pl line 1845.
Global symbol "$elapsed_sec" requires explicit package name at ../lib/cloc-1.55.pl line 1845.
Global symbol "@results" requires explicit package name at ../lib/cloc-1.55.pl line 1846.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1846.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1849.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1850.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1852.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1853.
Global symbol "$BY_FILE" requires explicit package name at ../lib/cloc-1.55.pl line 1855.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1857.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1858.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1858.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1860.
Global symbol "@results" requires explicit package name at ../lib/cloc-1.55.pl line 1864.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1864.
Global symbol "@results" requires explicit package name at ../lib/cloc-1.55.pl line 1868.
syntax error at ../lib/cloc-1.55.pl line 1869, near "}"
../lib/cloc-1.55.pl has too many errors.

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.