Simple CLI tool to fetch random starred items 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.
Installation
Preferred
Install with Pipx.
$ pipx install github-random-star
Other
Install from PyPi/GitHub with pip or clone this repository and install with pip/pipx locally.
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 Poetry$ poetry 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 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.-h --help
Show this help message inside the terminal.
Examples
$ gh-star -a ddkasa
$ gh-star -a ddkasa -t 5
$ gh-star -a ddkasa -r -t 5
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
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
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.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdbf7edf21223e534f63912517e6818c172791a0ea0deddcdd937aabb23a4708 |
|
MD5 | a379be00c89fd729dc2afeaf15a0a944 |
|
BLAKE2b-256 | 2fc017619167b7dcdd4167a1aa2561f355adcc6c8569610ff43c47a3b4253540 |