Skip to content

Commit

Permalink
docs: updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ddkasa committed Apr 25, 2024
1 parent 2d585fe commit f3eaf8b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
# ⭐️ GitHub Random Star ⭐️

<a href="https://pypi.org/project/github-random-star"><img src="https://img.shields.io/pypi/v/github_random_star?style=for-the-badge&logo=pypi" /></a>
<a href="https://pypi.org/project/github-random-star"><img src="https://img.shields.io/pypi/dm/github-random-star?style=for-the-badge" /></a>

![](docs/example_image.png?raw=true)

# Idea
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 to look at and explore.

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

# Installation
### Preferred

## Preferred

Install through [Pipx](https://github.com/pypa/pipx) from PyPi.
Install with [Pipx](https://github.com/pypa/pipx).

`pipx install github-random-star`

## Other
### 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.
Install from [PyPi](https://pypi.org/project/github-random-star)/[GitHub](https://github.com/ddkasa/github-random-star) with `pip` or clone this repository and install requirements through [Poetry](pyproject.toml) or the provided [requirements](requirements.txt) file.

<details>
<summary>If using poetry.</summary>
<code>$ git clone https://github.com/gh-star/github_random_star</code><br>
<code>$ cd github_random_star</code><br>
<code>$ git clone https://github.com/ddkasa/github-random-star</code><br>
<code>$ cd github-random-star</code><br>
<code>$ poetry shell</code><br>
<code>$ poetry install</code>
</details>
<details>
<summary> If using requirements.txt.</summary>
<code>$ git clone https://github.com/gh-star/github_random_star</code><br>
<code>$ cd github_random_star</code><br>
<summary>If using requirements.txt.</summary>
<code>$ git clone https://github.com/ddkasa/github-random-star</code><br>
<code>$ cd github-random-star</code><br>
<code>$ virtualenv -p python3.12 .venv</code><br>
<code>$ source .venv/bin/activate</code><br>
<code>$ pip install -r requirements.txt</code>
</details>

# Usage
## 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
### Flags

- `-a, --account` Username of the GitHub account to retrieve the starred items from. `--account` is required or `GH_STAR_ACCOUNT` environment variable needs to be set.
- `-t, --total` Total amount of random items to pick from. Defaults to 3.
- `-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.
- `-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.
- `-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
### Examples

- `gh-star -a ddkasa`
- `gh-star -a ddkasa -t 5`
- `gh-star -a ddkasa -r -t 5`

# License
## License

MIT. Look at the [LICENSE](LICENSE.md) for details.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "github-random-star"
version = "0.0.5"
description = "Simple CLI tool to fetch a random starred items from a users GitHub profile."
description = "Simple CLI tool to fetch random starred items from a users GitHub profile."
authors = ["David Kasakaitis <davidkasakaitis@proton.me>"]
readme = "README.md"
license = "MIT"
Expand Down

0 comments on commit f3eaf8b

Please sign in to comment.