An offline CLI tool to search your GitHub Stars.
  • Python 98.1%
  • Shell 1.9%
Find a file
Jürgen Hermann 21f00bf390
README: Make cronjob example silent (#21)
Avoid a daily mail in mail-enabled crontabs, by redirecting stdout to a log file.
2023-10-26 19:53:44 +08:00
ohmystars Do not show scientific format for elapsed time (#15) 2020-06-26 11:22:40 +08:00
.gitignore version 1.3.3 2018-01-19 21:30:55 +08:00
.travis.yml add Python 3.7 build 2018-12-13 19:49:55 +08:00
LICENSE init imports 2014-11-15 12:23:50 +08:00
MANIFEST.in add a dot and a empty line 2014-11-17 22:28:54 +08:00
oh-my-stars-alfred-workflow.png rename to oh-my-stars 2015-07-11 16:34:25 +08:00
oh-my-stars.png update screenshot 2018-03-10 13:01:15 +08:00
ohmystars-filter.sh version 1.4.8 2018-01-20 19:24:42 +08:00
ohmystars-v2.alfredworkflow fix wrong workflow file 2018-01-22 09:54:49 +08:00
ohmystars.alfredworkflow version 1.4.8 2018-01-20 19:24:42 +08:00
Pipfile use twine 2018-01-17 09:48:46 +08:00
Pipfile.lock update requirements 2018-12-13 19:36:09 +08:00
README.md README: Make cronjob example silent (#21) 2023-10-26 19:53:44 +08:00
setup.cfg add a screenshot 2014-11-15 14:45:12 +08:00
setup.py add Python 3.7 build 2018-12-13 19:49:55 +08:00

oh-my-stars

Search your stars locally.

usage: mystars [-h] [-l LANGUAGE [LANGUAGE ...]] [-u] [-r] [-a] [-3] [-i]
                   [-v]
                   [keywords [keywords ...]]

a CLI tool to search your starred Github repositories.

positional arguments:
  keywords              Search by keywords

optional arguments:
  -h, --help            show this help message and exit
  -l LANGUAGE [LANGUAGE ...], --language LANGUAGE [LANGUAGE ...]
                        Filter by language
  -u, --update          Create(first time) or update the local stars index
  -r, --reindex         Re-create the local stars index
  -c WHEN, --color WHEN
                        Colorize the output; WHEN can be 'always' (default if
                        omitted), 'auto', or 'never'
  -a, --alfred          Format search result as Alfred Script Filter output
  -3, --three           Alfred 3 support
  -i, --install         Import Alfred workflow
  -v, --version         show program's version number and exit

oh-my-stars

Works with Alfred Workflow

oh-my-stars-alfred-workflow

Configuration

You can avoid entering your GitHub API credentials every time you update the index, by adding them to the ~/.netrc file as follows:

machine api.github.com
    login GH_USERNAME
    password GH_API_TOKEN

Use an API token as the password you can create one via Settings » Developer settings » Personal access tokens in the GitHub web interface.

Once you have stored credentials, you can also automate the index update by adding a job with crontab -e:

# GitHub stars
0 6 * * *	~/.local/bin/mystars -u >~/.oh-my-stars/update.log

Installation (Mac OSX)

$ pip install oh-my-stars --upgrade --user
$ mystars --help
$ mystars --update
$ mystars angular upload
$ mystars --language python
$ mystars awesome python

if install failed, try following commands

$ pip uninstall distribute
$ pip install setuptools
$ pip install --upgrade setuptools

Integration with Alfred

$ mystars -i -3

For Alfred v2

$ mystars -i

Change logs

v1.5.1

  • Fix error 'IOError: [Errno 32] Broken pipe'
v1.5.0
  • Disable the pagination and add a --color option. Thanks for the suggestions from @jhermann
  • Speed up result display with CachingMiddleware of TinyDB
v1.4.9
  • Fix workflow for Alfred v2
v1.4.8
  • Fix Alfred XML output
  • Rewrite Alfred workflow script
v1.4.5
  • Drop Python 2.6 Support
  • Update docs: using ~/.netrc + cron. @jhermann
v1.3.5
  • Output Alfred 3 JSON ouput with "-a -3" option.
  • Import Alfred Workflow with "-i" (append "-3" for Alfred 3) option.
v1.2.3
  • Get user + password from netrc. @jhermann.
  • Use pipenv to manage project requirements.
v1.1.3
  • Upgrade to TinyDB 3.7.0.
  • Build index when updating.
  • Search result pagination.

Note

  • Uninstall existing version.
  • Rebuild existing index with mystars -r.
v1.0.2
  • Rename to oh-my-stars.
v1.0.1
  • Support Github two-factor authentication. @yanyaoer
v1.0.0
  • Replace kc with TinyDB, no more non-python dependencies.
  • Only update stars since last time.