Simple CLI tool to fetch random starred repositories from a users GitHub profile.
Project description
⭐️ GitHub Random Star ⭐️
If you have starred way too many GitHub repositories and need a way of keeping track of them. This simple CLI tool throws you quasi random starred repos at you to look at and explore.
If you are struggling with selection paralysis; it also allows for selecting random repositories from a GitHub user.
Installation
Install with Pipx or Pip.
pipx install github-random-star
Install with GitHub CLI.
gh extension install ddkasa/gh-random-star
Usage
- Setup GitHub API token as the
GITHUB_TOKEN
environment variable. If this is not setup it will use the public access point with lower rates.
PyPi
- Run the script through
gh-star <command> <account> <flags>
. - Run
gh-star help star
to get help.
GitHub CLI
- Run the script through
gh random-star <command> <account> <flags>
. - Run
gh random-star help star
to get help.
Commands
star
Randomly select from all starred items of a GH user.repo
Randomly select from a GH users repositories.
Arguments
<account>
Username of the GitHub account to retrieve the starred items from. Required
Flags
-t, --total
Total amount of random items you want 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.--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.--max_results
The amount of starred items to retrieve from GitHub. Defaults to all.
Examples
PyPI
gh-star star ddkasa
gh-star repo ddkasa
gh-star star ddkasa -t 5
gh-star star ddkasa -r -t 5
GitHub CLI
gh random-star star ddkasa
gh random-star repo ddkasa
Development
Development is run through Poetry.
Basic Setup
git clone https://github.com/ddkasa/github-random-star
cd github-random-star
poetry shell
poetry install
poetry run gh-star
Testing
- Use
pytest
for all tests. - Use
pytest -m unit
for unit tests. - Use
pytest -m integration
for integration tests.
License
MIT. Look at the LICENSE for details.
Project details
Release history Release notifications | RSS feed
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-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e7b2fff2ef37b0985ce2de7fef72f2e4b91293e7f68e1ae83166e816f399795 |
|
MD5 | 200649d27ce6c5349669bb2ec8d79fdb |
|
BLAKE2b-256 | 88cae1af90712cc7781c0570b4451c28e6f04fd4057d0a09c5aacd7361c2c075 |