Skip to main content

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

  1. 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.
  2. 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 or GITHUB_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 refetch all starred items.
  • -m, --max-history The amount of historic choices to cache. Defaults to 100.

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

github_random_star-0.0.3.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

github_random_star-0.0.3-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page