Metadata-Version: 2.1
Name: github-random-star
Version: 0.0.2
Summary: Simple CLI tool to fetch a random starred items from a users GitHub profile.
License: MIT
Keywords: python,python3,cli,github,git
Author: David Kasakaitis
Author-email: davidkasakaitis@proton.me
Requires-Python: >=3.12,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Dist: fire (>=0.5.0,<0.6.0)
Requires-Dist: httpx (>=0.26.0,<0.27.0)
Project-URL: Bug Tracker, https://github.com/ddkasa/github-random-star/issues
Project-URL: Homepage, https://github.com/ddkasa/github-random-star
Project-URL: Source, https://github.com/ddkasa/github-random-star
Description-Content-Type: text/markdown

# 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](https://github.com/pypa/pipx) from PyPi.

`pipx install github-random-star`

## Other

Either install from [pypi](https://pypi.org/project/github-random-star) with `pip` or clone this repository and install requirements through [poetry](pyproject.toml) or the provided [requirements](requirements.txt) file.

```
# If using poetry.
$ poetry shell
$ poetry install
```

```
# If using requirements
$ 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](LICENSE.md) for details.

