⭐Create a searchable view of your github stars. Runs daily with github actions.
python3 github_stars.py
python3 github_stars.py --help
usage: github_stars.py [-h] [-v] [-f FILENAME] [-j] [-jf JSON_FILENAME] username
Create markdown file showcasing a user's github stars.
positional arguments:
username User to extract stars from.
optional arguments:
-h, --help show this help message and exit
-v, --verbose
-f FILENAME, --filename FILENAME
Output markdown filename.
-j, --json Write json file with starred repo data.
-jf JSON_FILENAME, --json-filename JSON_FILENAME
Output json filename.
To override default output behavior, you can supply an overrides.json
file. See overrides.json
for an example. overrides.template.json
is supplied as an empty template.
Attributes in overrides.json
:
hidden_languages
: A list of programming languages to exclude from output.hidden_repos
: A list of repos to exclude from output. Format is<user>/<repo>
.overrides
: Key value pairs of repo in<user>/<repo>
format to object. The object contains key value pairs that override theRepo
class ingithub_stars.py
.
This repo was created for personal use. As such, external usage is slightly convoluted. Feel free to raise a github issue if you would like to use this code, and I will make the github action more generic. Otherwise I recommend:
- Fork this repo in the top right corner of the webpage
git clone [email protected]:<your_user_name>/github-stars.git
cd github-stars
cp overrides.template.json overrides.json
- Update
overrides.json
with any overrides git add .
git commit -m "personal github-stars"
git push
- On your fork, go to repository settings > Security > Secrets > Actions
- Add the repository secret
GIT_TOKEN
The value of GIT_TOKEN
should be set to a personal access token. I recommend creating a new one just for this app. The access token will have to be updated each time it expires. To create a personal access token:
- Click your user icon in the top right > Settings
- Click Developer settings
- Click Personal access tokens
- Click Generate new token
python3 -m venv venv
. venv/bin/activate
python3 -m pip install -r requirements.txt
python3 github_stars.py --help
. venv/bin/activate
python3 -m pip install pip-tools
pip-compile -o requirements.txt pyproject.toml
pip-compile --extra dev -o dev-requirements.txt pyproject.toml
👤 Will Lamason
Give a ⭐️ if this project helped you!
Copyright © 2022 Will Lamason.
This project is Apache--2.0 licensed.
This README was generated with ❤️ by readme-md-generator