Skip to content

Files

Latest commit

Oct 2, 2021
d3f55a9 · Oct 2, 2021

History

History
40 lines (22 loc) · 997 Bytes

README.md

File metadata and controls

40 lines (22 loc) · 997 Bytes

Save Github traffic stats

Rationale

See the blog post https://zonca.dev/2021/10/monitor-github-traffic.html

Requirements

Setup

Rename tok-sample.sh to tok.sh and fill it in with a:

Run

Test it with:

bash collect_data.sh repository_name

This should create a folder with the name of your repository, download the stats and commit them to the repository.

Example output

See the pysm folder for example output

Automate

Then create an entry in a user crontab with crontab -e with the content of crontab.sh

Specify as argument to collect_data.sh the repository name.

Merge the CSVs

Use the merge_csv.sh script from https://github.com/nchah/github-traffic-stats/blob/master/bash/merge-csv.sh