faheel / GitHub-contributions

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

License:MIT License


Languages

Language:Python 100.0%