https://github.com/jrieke/year-on-github
π Share your Github stats for 2020 on Twitter
https://github.com/jrieke/year-on-github
2020 developer git github github-api github2020 streamlit streamlit-webapp twitter year
Last synced: 7 months ago
JSON representation
π Share your Github stats for 2020 on Twitter
- Host: GitHub
- URL: https://github.com/jrieke/year-on-github
- Owner: jrieke
- License: mit
- Created: 2020-12-20T16:18:16.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-01-05T22:25:39.000Z (almost 4 years ago)
- Last Synced: 2025-04-10T09:04:53.018Z (7 months ago)
- Topics: 2020, developer, git, github, github-api, github2020, streamlit, streamlit-webapp, twitter, year
- Language: Python
- Homepage: http://gh2020.jrieke.com
- Size: 4.31 MB
- Stars: 133
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - year-on-github
README
# Year on Github π
[](http://gh2020.jrieke.com)
**Share your Github stats for last year on Twitter.**
This project contains a small web app that let's you share stats about your Github
activity from last year. It's like Spotify's "year in review" but for Github. The app
is built with [Streamlit](https://www.streamlit.io/), queries Github's API via
[ghapi](https://ghapi.fast.ai/), and let's you share the generated stats directly on
[Twitter](https://twitter.com/).
---
π Try it out: gh.jrieke.com π
---
*For updates [follow me on Twitter](https://twitter.com/jrieke) and if you like this project, please [consider sponsoring](https://github.com/sponsors/jrieke) βΊοΈ*
---
**Note: The steps below are only required if you want to work on the app. If you just want to use it, go [here](http://gh2020.jrieke.com/).**
## Installation
```bash
git clone https://github.com/jrieke/my-year-on-github.git
cd my-year-on-github
pip install -r requirements.txt
```
**Known issues**
- **Doesn't work with Python 3.8 and 3.9!** Both versions throw an error related to
ghapi/multiprocessing that I couldn't resolve yet
(`RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase`
and subsequently an `EOFError`). Please use Python 3.7 for now.
- [ghapi](https://ghapi.fast.ai/) has (as of 26 December 2020) a small bug in the
`paged` method (see [here](https://github.com/fastai/ghapi/issues/24)), which may
cause problems, therefore the commands above will install it from
[my fork](https://github.com/jrieke/ghapi) (you can also install it manually from
there with `pip install -U git+https://github.com/jrieke/ghapi`).
## Running locally
```bash
streamlit run app/main.py
```
Make sure to run always from the `my-year-on-github` dir (not from the `app `dir),
otherwise the app will not be able to find the css file.
## Deploying to Heroku
First, [install heroku and login](https://devcenter.heroku.com/articles/getting-started-with-python#set-up).
To create a new deployment, run inside `my-year-on-github`:
```
heroku create
git push heroku main
heroku open
```
To update the deployed app, commit your changes and run:
```
git push heroku main
```
## TODO
PRs are welcome! Please open an issue before you start working to coordinate.
- [ ] New stars for repos >40k stars are not properly calculated because the Github
API only returns the first 40k stars. Improve this by using the current
stargazers_count to calculate/estimate the number of new stars.
- [ ] Maybe: Use stargazers_count in `query_repo` so it's not required to read the last
page of stargazers. This requires to disable hashing for stargazers_count in
streamlit's cache function.
- [ ] Right now, new stars for 2021 are also counted. Fix this.
