Code Monkey home page Code Monkey logo

ghstats's Introduction

GitHub Download Stats

Build Status Code Quality Coverage Version Support License

Description

  • Python script to obtain GitHub Release download count and other statistics.
  • Can be used as both a standalone script and a Python module.
  • Supports both Python 2 and 3 out of the box.

Installation

You can get ghstats using one of the following methods:

Usage

ghstats [user] [repo] [tag] [options]
ghstats [user/repo] [tag] [options]
  • Arguments:
Argument Description
user Repository owner. If not present, user will be prompted for input.
repo Repository title. If not present, user will be prompted for input.
tag Release tag name. If not present, prints the total number of downloads.
  • Options:
Option Description
-d, --detail Print detailed statistics for release(s).
-q, --quiet Print only resulting numbers and errors. Overrides -d option.
-l, --latest Get stats for the latest release. Tag argument will be ignored.
-h, --help Show help on script usage.
  • Environment Variables:
Environment Variable Description
GITHUB_TOKEN GitHub OAuth token. Use to increase API request limit.

Examples

Examples for atom/atom repository:

ghstats atom atom            # Fetch download count for all releases.
ghstats atom/atom            # Fetch download count for all releases (alt. syntax).
ghstats atom atom -q         # Quiet mode (print only numerical result).
ghstats atom atom -d         # Detailed description for every release.
ghstats atom atom -l         # Fetch download count for the latest release.
ghstats atom atom -l -d      # Detailed description for the latest release.
ghstats atom atom -l -q      # Quiet mode for the latest release.
ghstats atom atom v1.0.0     # Fetch download count for "v1.0.0" release.
ghstats atom atom v1.0.0 -d  # Detailed description for "v1.0.0" release.
ghstats atom atom v1.0.0 -q  # Quiet mode for "v1.0.0" release.
ghstats                      # Get input for username and repository from user.
ghstats -h                   # Print help.

Changelog

v1.2.0

  • Fix error on empty release title (issue #5).

v1.1.1

v1.1.0

  • Fix error on Unicode titles (issue #1).
  • Fix error on draft release (issue #4).

v1.0.1

v1.0.0

  • Initial release.

License

MIT License

You are free to use, modify, distribute (including commercial purposes) as long as you credit the original author and include the license text.

License text: MIT License

ghstats's People

Contributors

kefir500 avatar

Watchers

James Cloos 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.