Giter Site home page Giter Site logo

github_clones_badge's Introduction

alt text PyPI version Build Status

github_clones_badge

Script to auto-create a badge of number of clones for your github repositories. Since GitHub's API only tracks the past 2 weeks of traffic, this tool saves all clone statistics into a dictionary and sums total number of clones starting 14 days before first run.

Installing:

pip install github_clones_badge

Running for one repo (That you own), once:

>>> from github_clones_badge import get_github_clones as ghc
>>> help(ghc)

>>> bc=ghc.badge_creator(repo='GRID_LRT')
7 Number of new entries
>>> bc.download_badge('/var/www/example.com/public_html/where_you_store_your_badges/') 
# These have to be stored on your server of course

Running for a repo that you are a collaborator of but don't own, once

In this case, the repouser's name is appended to the beginning of the badge name. This means one reponame for multiple users can be 'tracked'.

>>> from github_clones_badge import get_github_clones as ghc
>>> help(ghc)

>>> bc=ghc.badge_creator(repo='DDFacet', repouser='cyriltasse')
7 Number of new entries
>>> bc.download_badge('/var/www/example.com/public_html/where_you_store_your_badges/')
# These have to be stored on your server of course

github_clones_badge's People

Contributors

apmechev avatar

Watchers

 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.