/gitega

Keep track of repository statistics

Primary LanguagePython

Contributors Forks Stargazers Issues MIT License


gitega

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

Report Bug · Request Feature

Table of Contents

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
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
git clone https://github.com/b3nj5m1n/gitega.git
  1. Install requirements packages
pip install -r requirements.txt

Usage

Navigate into the directory and add an account:

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:

/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.