Coder Social home page Coder Social logo

raspi / github-stats Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 86 KB

Generate GitHub traffic statistics charts

License: GNU General Public License v2.0

Rust 96.56% Shell 3.44%
command-line github github-api rust statistics svg chart clones traffic views

github-stats's Introduction

github-stats

GitHub All Releases GitHub release (latest by date) GitHub tag (latest by date)

Generate GitHub traffic statistics SVG charts.

Traffic statistics for views and clones are downloaded from GitHub API to a local SQLite database.

GitHub keeps these statistics only for 14 days. With this program you can keep infinite days in local database and update the statistics once per day.

Example for this project:

SVG: views

SVG: clones

Usage

% github-stats --help
Generate project traffic statistics charts from GitHub API

Usage: github-stats [OPTIONS] <COMMAND>

Commands:
  fetch       Fetch traffic statistics from Github to a local database
  list-repos  List repositories found in local database
  stats       Generate statistics for repo from local database
  generate    Generate all statistics from local database
  help        Print this message or the help of the given subcommand(s)

Options:
  -v, --verbose          Be verbose?
  -c, --config <CONFIG>  Config file [default: config.toml]
  -h, --help             Print help
  -V, --version          Print version

Setting up

First copy config.example.toml to config.toml and edit the config with your favorite editor. Generate new API key or use existing one.

Example:

Fetch latest statistics from GitHub to local database:

github-stats fetch

Note: data from GitHub API is cached for one hour in cache directory.

Generate SVG chart for a repository named heksa:

github-stats stats heksa

The generated chart is saved to stats directory. Stats for last 30 days is displayed.

Now you can for example copy the result to your web page and for example display the chart in your project's README.md.

Generate all statistics charts at once:

github-stats generate

See example directory for how to automate updates with systemd.

Internals

Is it any good?

Yes.

github-stats's People

Contributors

raspi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.