kobito-cli

command module
v0.0.0-...-a670113 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2014 License: MIT Imports: 15 Imported by: 0

README

Kobito cli tools

Kobitoをちょっぴり便利にするCLIツール

インストール

Homebrewで入れる方法
brew tap suin/suin
brew install kobito-cli

Homebrewで入れるとzsh用の補完関数も入ります。

wgetで入れる方法
wget -O /usr/local/bin/kobito https://github.com/suin/kobito-cli/raw/master/bin/kobito
chmod +x /usr/local/bin/kobito

使い方


Usage: 
  kobito [command]

Available Commands: 
  ls                                            List all items
  show [item id]                                Show item
  html [item id]                                Show item as HTML
  print [item id]                               Print out item
  link [markdown file]                          Link markdown file to Kobito
  version                                       Print kobito cli tools version
  pdf [item id] | pdf [item id] [pdf file name] Save item as PDF
  password                                      Show Kobito password
  sticker                                       Do you want Kobito sticker?
  help [command]                                Help about any command

 Available Flags:
      --help=false: help for kobito

Use "kobito help [command]" for more information about that command.
Kobito へ文字列を送信する

パイプやリダイレクトなどで入力を渡すとKobitoのエントリーになります

historyの5件からKobitoのエントリーを作る

history | tail -n 5 | kobito

main.goのソースコードでKobitoのエントリーを作る

kobito < main.go

Ruby - ターミナルから Kobito へ文字列を送信する - Qiita」を参考にしました。

コントリビュート

go1.2をbrewでインストールしておいてください

チェックアウトしたら依存するライブラリを入れます:

go get ./...
デバッグ方法

とりあえず make すれば実行できます

make

サブコマンドの実行は下記のように ARGS で指定できます

make ARGS="show 123"

SQLiteのライブラリをコンパイルするのに時間がかかるため、SQLite非依存の開発は下記のように mem でやることをおすすめします

make mem

make mem ARGS="show 123"
プルリク

便宜的簡易的にリポジトリ内の bin に kobito のビルドを置くようにしていますが、プルリクにはビルドを含めないようお願いします。こちらで、mergeしたあとビルドします。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL