# ⭐️ 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=""><img src="https://img.shields.io/github/actions/workflow/status/ddkasa/github-random-star/pypi-publish.yml?style=for-the-badge"/></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)
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](https://github.com/pypa/pipx).
`$ pipx install github-random-star`
### Other
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 with pip/pipx locally.
## 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 `GH_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](https://github.com/python-poetry/poetry).
### Basic Setup
1. `$ git clone https://github.com/ddkasa/github-random-star`
2. `$ cd github-random-star`
3. `$ poetry shell`
4. `$ 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](LICENSE.md) for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "github-random-star",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "python, python3, cli, github, git",
"author": "David Kasakaitis",
"author_email": "davidkasakaitis@proton.me",
"download_url": "https://files.pythonhosted.org/packages/b0/8e/195e16b676a9ab0655ed61dccd5f428dba8c15bacd6cebc7f4c77ab17eb4/github_random_star-0.1.1.tar.gz",
"platform": null,
"description": "# \u2b50\ufe0f GitHub Random Star \u2b50\ufe0f\n\n<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>\n<a href=\"\"><img src=\"https://img.shields.io/github/actions/workflow/status/ddkasa/github-random-star/pypi-publish.yml?style=for-the-badge\"/></a>\n<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>\n\n![](docs/example_image.png?raw=true)\n\nIf 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.\n\n## Installation\n\n### Preferred\n\nInstall with [Pipx](https://github.com/pypa/pipx).\n\n`$ pipx install github-random-star`\n\n### Other\n\nInstall 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 with pip/pipx locally.\n\n## Usage\n\n1. 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._\n2. Run the script through `$ gh-star <flags>`, `$ python github_random_star/main.py <flags>` or if using Poetry `$ poetry run gh-star <flags>`\n\n### Flags\n\n- `-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.\n- `-t, --total` Total amount of random items you want to pick from. Defaults to 3.\n- `-r, --refresh` Whether to fetch new cached data or not. Will re fetch all starred items instead of using cache.\n- `--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.\n- `-i, --ignore` If to use a list of repositories to ignore. Defaults to true.\n- `--max_results` The amount of starred items to retrieve from GitHub. Defaults to all.\n- `-h --help` Show this help message inside the terminal.\n\n### Examples\n\n- `$ gh-star -a ddkasa`\n- `$ gh-star -a ddkasa -t 5`\n- `$ gh-star -a ddkasa -r -t 5`\n\n## Development\n\nDevelopment is run through [Poetry](https://github.com/python-poetry/poetry).\n\n### Basic Setup\n1. `$ git clone https://github.com/ddkasa/github-random-star`\n2. `$ cd github-random-star`\n3. `$ poetry shell`\n4. `$ poetry install`\n\n### Testing\n- Use `$ pytest` for all tests.\n- Use `$ pytest -m unit` for unit tests.\n- Use `$ pytest -m integration` for integration tests.\n\n## License\nMIT. Look at the [LICENSE](LICENSE.md) for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simple CLI tool to fetch random starred items from a users GitHub profile.",
"version": "0.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/ddkasa/github-random-star/issues",
"Homepage": "https://github.com/ddkasa/github-random-star",
"Source": "https://github.com/ddkasa/github-random-star"
},
"split_keywords": [
"python",
" python3",
" cli",
" github",
" git"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2fc017619167b7dcdd4167a1aa2561f355adcc6c8569610ff43c47a3b4253540",
"md5": "a379be00c89fd729dc2afeaf15a0a944",
"sha256": "fdbf7edf21223e534f63912517e6818c172791a0ea0deddcdd937aabb23a4708"
},
"downloads": -1,
"filename": "github_random_star-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a379be00c89fd729dc2afeaf15a0a944",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 8866,
"upload_time": "2024-04-28T12:20:39",
"upload_time_iso_8601": "2024-04-28T12:20:39.862751Z",
"url": "https://files.pythonhosted.org/packages/2f/c0/17619167b7dcdd4167a1aa2561f355adcc6c8569610ff43c47a3b4253540/github_random_star-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b08e195e16b676a9ab0655ed61dccd5f428dba8c15bacd6cebc7f4c77ab17eb4",
"md5": "5384e2ea4436e43a858405eb80c81848",
"sha256": "99309c2f5ede76b1fe41dbfd490d4c1947e3528eb7f75ae1e9834d7eda3e1dd8"
},
"downloads": -1,
"filename": "github_random_star-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "5384e2ea4436e43a858405eb80c81848",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 7246,
"upload_time": "2024-04-28T12:20:42",
"upload_time_iso_8601": "2024-04-28T12:20:42.246467Z",
"url": "https://files.pythonhosted.org/packages/b0/8e/195e16b676a9ab0655ed61dccd5f428dba8c15bacd6cebc7f4c77ab17eb4/github_random_star-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-28 12:20:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ddkasa",
"github_project": "github-random-star",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "github-random-star"
}