Amanogawa
Listing GitHub repositories which you starred.
Installation
Add this line to your application's Gemfile:
gem 'amanogawa'
And then execute:
$ bundle
Or install it yourself as:
$ gem install amanogawa
Usage
Sync
First, sync your starred repositories.
$ amanogawa --sync -t <your auth token>
# or
$ amanogawa --sync -u <your github username> -p <your github password>
# or
$ amanogawa --sync # use .netrc (cf. https://github.com/octokit/octokit.rb)
# => Write to ~/.cache/amanogawa.dump
Simple Listing
$ amanogawa
jquense/react-widgets - set of stateless ui widgets for React
geraintluff/uri-templates - JavaScript utility for RFC 6570: URI Templates
ismasan/oat - Adapters-based API serializers with Hypermedia support for Ruby apps.
k0kubun/activerecord-precount - N+1 count query killer for ActiveRecord
ko1/pretty_backtrace - Pretty your exception backtrace.
jhudson8/react-backbone - backbone-aware mixins for react
# ...
Fetch current starred and Listing
$ amanogawa --fetch -t <your auth token>
Use Format
$ amanogawa -f "%f - %u"
jquense/react-widgets - https://api.github.com/repos/jquense/react-widgets
geraintluff/uri-templates - https://api.github.com/repos/geraintluff/uri-templates
ismasan/oat - https://api.github.com/repos/ismasan/oat
k0kubun/activerecord-precount - https://api.github.com/repos/k0kubun/activerecord-precount
ko1/pretty_backtrace - https://api.github.com/repos/ko1/pretty_backtrace
jhudson8/react-backbone - https://api.github.com/repos/jhudson8/react-backbone
Format table
FORMAT_TABLE = {
"%i" => "id",
"%n" => "name",
"%f" => "full_name",
"%d" => "description",
"%u" => "url",
"%s" => "ssh_url",
"%g" => "git_url",
"%h" => "homepage",
"%C" => "created_at",
"%P" => "pushed_at",
"%U" => "updated_at",
}
And, convert %t
to Tab.
Sample Use Case
# .zshrc
alias -g ST="amanogawa -f '%f%t%d' | column -t -s ' ' | peco | awk '{print \$1}'"
$ ST | xargs hub browse # Select repository by peco and open GitHub page it
$ ST | xargs hub clone # Select repository by peco and clone it
Contributing
- Fork it ( https://github.com/joker1007/amanogawa/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request