Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/faheel/github-contributions

Get details about all the projects to which you have contributed to on GitHub
https://github.com/faheel/github-contributions

cli contributions github github-contributions markdown-generator python python3 utility

Last synced: 8 days ago
JSON representation

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

Awesome Lists containing this project

README

        



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):
```bash
virtualenv --python=/usr/bin/python3 venv
```

3. Activate the virtual environment:
```bash
source venv/bin/activate
```

4. Install the requirements:
```bash
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 [-r]
fetch_repos.py -h

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

#### Example
```bash
$ ./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 [-o ] [-r]
generate_markdown.py -o table [-c ] [-r]
generate_markdown.py -h

Options:
-o , --output-as Generate Markdown for either a list or a table
[default: list].
-c , --columns 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
```bash
$ ./generate_markdown.py faheel
$ cat output/contribution-list.md
```
```markdown
* [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:
* [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)
* [NuGetPackageExplorer/**NuGetPackageExplorer**](https://github.com/NuGetPackageExplorer/NuGetPackageExplorer/commits?author=faheel)
* [DjangoGirls/**tutorial-extensions**](https://github.com/DjangoGirls/tutorial-extensions/commits?author=faheel)

#### Table example
```bash
$ ./generate_markdown.py faheel -o table
$ cat output/contribution-table.md
```
```HTML


Leaflet/Leaflet


TycheOrg/Tyche

...
```
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](LICENSE).