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

https://github.com/b3nj5m1n/gitega

Keep track of repository statistics
https://github.com/b3nj5m1n/gitega

github

Last synced: 2 months ago
JSON representation

Keep track of repository statistics

Awesome Lists containing this project

README

          

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]




gitega


Keep a local copy of the stats of all your public github repos.




Report Bug
·
Request Feature

## Table of Contents

* [About the Project](#about-the-project)
* [Getting Started](#getting-started)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Usage](#usage)
* [Contributing](#contributing)
* [License](#license)

## About The Project

Regularly execute a python script to keep a local copy of the stats of all your public github repos.

## Getting Started

### Prerequisites

* python3.7
```sh
sudo apt install python3.7
sudo pacman install python3.7
```
* Github personal access token (Settings -> Developer Settings -> Personal Access Tokens -> Generate new token) with all repo permissions.

### Installation

1. Clone the repo
```sh
git clone https://github.com/b3nj5m1n/gitega.git
```
2. Install requirements packages
```sh
pip install -r requirements.txt
```

## Usage

Navigate into the directory and add an account:
```sh
python addAccount.py --name YourUserName --token YourAccessToken
```

Use update.sh to automatically update all your accounts and send a report to you via email. Call the script with the path to your .gitega directory and your email (Will be used to send & receive, requires you to have msmtp set up) Put something like this (This one will run at 17:00 every day) in your crontab file (Using crontab -e): `0 17 * * * bash /home/YourUserName/Documents/Github/gitega/update.sh "/home/YourUserName/.gitega" "YourEmailAdress"`

Regularly run update.py to update all traffic data for all repository of an account. python update.py --name YourUserName

This will also parse the data and store it in an SQL lite database.

You can create a graph with all the data for a specific repository like this:
```bash
/home/YourUserName/Documents/Github/gitega/export.sh "/home/YourUserName/.gitega" "YourUserName" "RespositoryName" "/home/YourUserName/.gitega/YourUserName-github"
```
This will create two files, `data.csv` holding all the data for that repository in a csv file, and `graph.png`, which requires gnuplot to be installed.

## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the GNU General Public License v3.0. See `LICENSE` for more information.

[contributors-shield]: https://img.shields.io/github/contributors/b3nj5m1n/gitega?style=flat-square
[contributors-url]: https://github.com/b3nj5m1n/b3nj5m1n/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/b3nj5m1n/gitega.svg?style=flat-square
[forks-url]: https://github.com/b3nj5m1n/gitega/network/members
[stars-shield]: https://img.shields.io/github/stars/b3nj5m1n/gitega.svg?style=flat-square
[stars-url]: https://github.com/b3nj5m1n/gitega/stargazers
[issues-shield]: https://img.shields.io/github/issues/b3nj5m1n/gitega.svg?style=flat-square
[issues-url]: https://github.com/b3nj5m1n/gitega/issues
[license-shield]: https://img.shields.io/github/license/b3nj5m1n/gitega.svg?style=flat-square
[license-url]: https://github.com/b3nj5m1n/gitega/blob/master/LICENSE.txt
[product-screenshot]: https://socialify.git.ci/b3nj5m1n/gitega/image?font=Inter&language=1&owner=1&pattern=Circuit%20Board&theme=Light