Giter Site home page Giter Site logo

rahul-jha98 / github-stats-transparent Goto Github PK

View Code? Open in Web Editor NEW
333.0 4.0 609.0 585 KB

Automatically generate summary GitHub statistics images for your profile using Actions, no server required

License: GNU General Public License v3.0

Python 100.00%
github github-api profile statistics github-stats

github-stats-transparent's Introduction

GitHub Stats Visualizations : Transparent

Generate visualizations of GitHub user and repository statistics using GitHub Actions.

NOTE: This repository is my extension of the repo jstrieb/github-stats. This repo was meant to serve as a detached fork of his project. If you like this repository make sure you also star his repository to show appreciation for his work.

⚠️ Disclaimer

The project uses access token that has read access to private repositories and if there is any exception while reading data from any repository it throws Exception which is printed in the workflow logs. This exception will be viewable in the Actions tab of the repository fork, and anyone may be able to see the name of one or more private repositories.

⚙️ Installation

  1. Create a personal access token (not the default GitHub Actions token) using the instructions here. Personal access token must have permissions: read:user and repo. Copy the access token when it is generated – if you lose it, you will have to regenerate the token.

  2. Click here to create a fork of this repository

  3. If this is the README of your fork, click this link to go to the "Secrets" page. Otherwise, go to the "Settings" tab of the newly-created repository and go to the "Secrets" page (bottom left).

  4. Create a new secret with the name ACCESS_TOKEN and paste the copied personal access token as the value.

  5. If you want to ignore certain repos, add them (separated by commas) to a new secret—created as before—called EXCLUDED.

  6. If you want to ignore certain languages, add them (separated by commas) to a new secret called EXCLUDED_LANGS.

  7. By default the languages, stars, forks and repository views do not consider stats from public repositories that you have forked and contributed to. But if you want to count stats from forked repositories also you can do so by creating a new secret called COUNT_STATS_FROM_FORKS. For the value you can put any random value because the action only checks if the secret is set or not.

  8. Go to the Actions Page and press "Run Workflow" on the right side of the screen to generate images for the first time. The images will be periodically generated every hour, but they can be manually regenerated by manually running the workflow.

  9. Check out the images that have been created in the generated folder in output branch.

  10. Link back to this repository so that others can generate their own statistics images.

  11. Star this repo if you like it!



🤔 Why Transparent ??

With the introduction of dark mode in Github it has become difficult to set an image background that looks consistent with the background in both dark and light mode.

To solve this the most obvious solution was to make the background transparent. All that was left was to choose colors for text that makes it legible in light as well as dark background.

After wasting a day playing with different color values finally settled on one. Hope you like it.

Related Projects

github-stats-transparent's People

Contributors

rahul-jha98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

github-stats-transparent's Issues

Border

Please remove border of stats

Updates to readme

There are some little updates that can be made to the readme.

Information about the actions and tokens are not up-to-date.

I added the information but apparently PRs are not enabled.

# GitHub Stats Visualizations : Transparent
> Generate visualizations of GitHub user and repository statistics using GitHub
Actions.

<a href="https://github.com/rahul-jha98/github-stats-transparent">

![](https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/output/generated/overview.svg)
![](https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/output/generated/languages.svg)

</a>

> NOTE: This repository is my extension of the repo [jstrieb/github-stats](https://github.com/jstrieb/github-stats). This repo was meant to serve as a detached fork of his project. If you like this repository make sure you also star his repository to show appreciation for his work. 

## ⚠️ Disclaimer

The project uses access token that has read access to private repositories and if there is any
exception while reading data from any repository it throws Exception which is printed in the workflow logs. 
This exception will be viewable in the Actions tab of the repository fork, and
anyone may be able to see the name of one or more private repositories.

## ⚙️ Installation

<!-- TODO: Add details and screenshots -->

1. Create a personal access token (not the default GitHub Actions token) using
   the instructions
   [here](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).
   There are two types of personal access token, select the **"Tokens (classic)"** one, it must have permissions: `read:user` and `repo`. Copy
   the access token when it is generated – if you lose it, you will have to
   regenerate the token.

2. Click [here](https://github.com/rahul-jha98/github-stats-transparent/fork) to create a
   fork of this repository

3. If this is the README of your fork, click [this
   link](../../settings/secrets/actions) to go to the "Secrets" page.
   Otherwise, go to the "Settings" tab of the newly-created repository and go
   to the "Secrets" page (bottom left).
   
   ![](https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/main/readme_images/Actions.png)
   
4. Create a new secret with the name `ACCESS_TOKEN` and paste the copied
   personal access token as the value.

   <img src='https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/main/readme_images/Token.png' height='250px'/>

5. If you want to ignore certain repos, add them (separated by commas) to a new
   secret—created as before—called `EXCLUDED`. 

   <img src='https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/main/readme_images/Exclude.png' height='250px'/>

6. If you want to ignore certain languages, add them (separated by commas) to a new secret called 
   `EXCLUDED_LANGS`.

7. By default the languages, stars, forks and repository views do not consider stats from 
   public repositories that you have forked and contributed to. But if you want to count stats from
   forked repositories also you can do so by creating a new secret called `COUNT_STATS_FROM_FORKS`. 
   For the value you can put any random value because the action only checks if the secret is set or not.

   <img src='https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/main/readme_images/Forks.png' height='250px'/>

8. Go to [Actions Settings Page](../../github-stats-transparent/settings/actions) and on "Workflow permission" give "Read and write
   permissions", this will enable image creation for imports.


9. Go to the [Actions Page](../../actions?query=workflow%3A"Generate+Stats+Images") and press "Run
   Workflow" on the right side of the screen to generate images for the first
   time. The images will be periodically generated every hour, but they can be
   manually regenerated by manually running the workflow.

10. Check out the images that have been created in the [`generated`](../output/generated)
   folder in `output` branch.

11. Link back to this repository so that others can generate their own
   statistics images.

12. Star this repo if you like it!


<br>
<br>

## 🤔 Why Transparent ??
With the introduction of dark mode in Github it has become difficult to set an image background that looks consistent with the background in both dark and light mode. 

To solve this the most obvious solution was to make the background transparent. All that was left was to choose colors for text that makes it legible in light as well as dark background.

After wasting a day playing with different color values finally settled on one. Hope you like it. 

![](https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/main/readme_images/light.png)

![](https://raw.githubusercontent.com/rahul-jha98/github-stats-transparent/main/readme_images/dark.png)


## Related Projects

- Extension of a detached fork of [jstrieb/github-stats](https://github.com/jstrieb/github-stats)
- Inspired by a desire to improve upon
  [anuraghazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats)
- Makes use of [GitHub Octicons](https://primer.style/octicons/) to precisely
  match the GitHub UI

Layout Bug

Tried everything, but been experiencing this bug. This worked fine the first time I ran the workflow, but next time onwards, here's how the generated files look: the format is all messy, there is no animation, no font.

image

Possible to change name displayed

I just forked the repo and had it generate svg's for my profile but the name it displayed was my real IRL name, not my Github profile name. Would there be any way to change this?

Edit: Fixed by changing the name setting on my profile to what I want it to display, but my question still stands if it's possible to have it pull GitHub account name (used in URLs) and not the profile name which can be 2 different values (like I had)

Request for node16 update due to interruption of node12 support of Github Action

After creating new ACCESS_TOKEN with permission repo and read:useron, I pressed Run Workflow button.
But the error occured and it says below.

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

I think this is because Github Actions stopped to provide node12 after Summer 2023.

I think you need to update your actions to run on Node 16 instead of Node 12.
(Actions configuration settings)

here is the reference site from Github Blog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.