Simple CLI tool to fetch a random starred items from a users GitHub profile.
Project description
⭐️ GitHub Random Star ⭐️
Idea
I generally have starred way too many repository. I wanted to create a simple CLI tool that throws me one random repo I have starred once a day, so I can go back to these repos and explore them more in detail.
Installation
Preferred
Install through Pipx from PyPi.
pipx install github-random-star
Other
Either install from pypi with pip
or clone this repository and install requirements through poetry or the provided requirements file.
If using poetry.
$ poetry shell
$ poetry install
If using requirements.txt.
$ virtualenv -p python3.12 .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
Usage
- Setup GitHub API token as the
GITHUB_ACCESS_TOKEN
environment variable. If this is not setup it will use the public access point with lower rates. - Run the script through
gh-star <flags>
,python github_random_star/main.py <flags>
or if using poetrypoetry run gh-star <flags>
Flags
-a, --account
Username of the GitHub account to retrieve the starred items from.--account
is required orGH_STAR_ACCOUNT
environment variable needs to be set.-t, --total
Total amount of random items to pick from. Defaults to 3.-r, --refresh
Whether to fetch new cached data or not. Will re fetch all starred items instead of using cache.-m, --max-history
The amount of historic choices to cache. Defaults to 100. Set to -1 to keep history unlimited.GH_STAR_MAX_HISTORY
environment variable can be used to override this value.-i, --ignore
If to use a list of repositories to ignore. Defaults to true.
Examples
gh-star -a ddkasa
gh-star -a ddkasa -t 5
gh-star -a ddkasa -r -t 5
License
MIT. Look at the LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for github_random_star-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6373ee94efe9de152ee6c051283a919db263b927b0a2e7d855e613e27b250837 |
|
MD5 | b8fb300a9f57e5f24e09f04c841ff731 |
|
BLAKE2b-256 | e411755484a0c8999929bbb7ccbffb22ee38c3af670899666370fd488f9a9817 |