Giter VIP home page Giter VIP logo

github-contributions's Introduction

GitHub contributions

Get details about all the projects to which you have contributed to on GitHub.

Setup

  1. Clone the repo and cd into it.

  2. Create a Python 3 virtual environment (named venv here):

    virtualenv --python=/usr/bin/python3 venv
  3. Activate the virtual environment:

    source venv/bin/activate
  4. Install the requirements:

    pip install -r requirements.txt

Run

Fetch list of repositories contributed to

Run the script fetch_repos.py along with your GitHub username to get a simple list of repositories you've contributed to:

Usage:
  fetch_repos.py <user> [-r]
  fetch_repos.py -h

Options:
  -r, --reverse-order   Display the list in reverse chronological order.
  -h, --help            Display this help text.

Example

$ ./fetch_repos.py faheel
Leaflet/Leaflet
TycheOrg/Tyche
freeCodeCamp/freeCodeCamp
PowerShell/PowerShell
...

Generate Markdown for contributions

Run the script generate_markdown.py along with your GitHub username to get a Markdown file with either a list or table of repositories you've contributed to:

Usage:
  generate_markdown.py <user> [-o <type>] [-r]
  generate_markdown.py <user> -o table [-c <cols>] [-r]
  generate_markdown.py -h

Options:
  -o <type>, --output-as <type>  Generate Markdown for either a list or a table
                                 [default: list].
  -c <cols>, --columns <cols>    Number of columns for the table [default: 3].
  -r, --reverse-order            Generate output in reverse chronological
                                 order.
  -h, --help                     Display this help text.

The generated Markdown files are saved in a directory named output respective to the directory from where the script was run.

List example

$ ./generate_markdown.py faheel
$ cat output/contribution-list.md
* [Leaflet/**Leaflet**](https://github.com/Leaflet/Leaflet/commits?author=faheel)
* [TycheOrg/**Tyche**](https://github.com/TycheOrg/Tyche/commits?author=faheel)
* [freeCodeCamp/**freeCodeCamp**](https://github.com/freeCodeCamp/freeCodeCamp/commits?author=faheel)
* [PowerShell/**PowerShell**](https://github.com/PowerShell/PowerShell/commits?author=faheel)
...

which would be rendered on GitHub as:

Table example

$ ./generate_markdown.py faheel -o table
$ cat output/contribution-table.md
<table>
<tr>
<td>
  <a href="https://github.com/Leaflet/Leaflet/commits?author=faheel">
    Leaflet/<b>Leaflet</b>
  </a>
</td>
<td>
  <a href="https://github.com/TycheOrg/Tyche/commits?author=faheel">
    TycheOrg/<b>Tyche</b>
  </a>
</td>
...

which would be rendered on GitHub as:

Leaflet/Leaflet TycheOrg/Tyche freeCodeCamp/freeCodeCamp
PowerShell/PowerShell NuGetPackageExplorer/NuGetPackageExplorer DjangoGirls/tutorial-extensions

License

This project is licensed under the terms of the MIT license.

github-contributions's People

Contributors

faheel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

github-contributions's Issues

Reorganise scripts to be packaged and published on PyPI

Have a single runner script that uses functionality from fetch_repos.py and generate_markdown.py based on the argument (fetch / save) passed to it.

Usage examples:

<package_name> fetch faheel
# same as ./fetch_repos.py faheel

<package_name> save faheel
# same as ./generate_markdown.py faheel

<package_name> save faheel --format=table
# same as ./generate_markdown.py faheel -o table

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.