Project

amanogawa

0.01
No commit activity in last 3 years
No release in over 3 years
Listing GitHub repositories which you starred.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
>= 0

Runtime

>= 0
~> 3.0
~> 4.0
 Project Readme

Amanogawa

Gem Version

Listing GitHub repositories which you starred.

amanogawa

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

  1. Fork it ( https://github.com/joker1007/amanogawa/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request