WunderlistのCLIであると見かけたWunderline。
準備します。自分メモ残します。anyenv導入済み前提です。
環境
- OSX El Capitan Version 10.11.1
インストール
$ anyenv update
$ ndenv install v5.0.0
$ ndenv global v5.0.0
$ npm install -g wunderline
CLIENT ID/access tokenの取得
ここで下記を入力してCREATE ACCESS TOKEN
ボタンをクリックしてCLIENT IDとaccess tokenを取得。
1. NAME
2. APP URL
3. AUTH CALLBACK URL
なお、2と3に関しては、validation通すためにも適当なURLが必須なようです。
CLIENT ID/ACCESS TOKENを配置
$ vim ~/.wunderline
$ wunderline auth
Please create a Wunderlist Application before you proceed, you can do so over
here: https://developer.wunderlist.com/apps/new, once that is done please enter
your access token and client id below.
? CLIENT ID xxxxxxxxxxxxxxxxxxxx
? ACCESS TOKEN xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks maosanhioro, Wunderline has been authenticated.
サブコマンドauth
を実行するとCLIENT IDとACCESS TOKENを聞いてくれるので先ほど得られたIDなりTOKENなりを入力します。
これの実体は~/.wunderline
にあります。
使う
$ wunderline -h
Usage: wunderline [options] [command]
Commands:
auth Authenticate Wunderline
add [task] Add a task to your inbox
inbox View your inbox
starred View starred tasks
today View tasks due today
week View tasks due this week
all View all of your tasks
overdue View overdue tasks
search [query] Search your tasks
list [query] Search your lists
open Open Wunderlist
export Export your data
whoami Display effective user
gc Delete completed tasks
set-platform Set your preferred application platform
flush Flush the application cache
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number
$ wunderline add -h
Usage: wunderline-add [task]
Add a task to your inbox
Options:
-h, --help output usage information
-l, --list [name] Specify a list other than your inbox
--today Set the due date to today
--tomorrow Set the due date to tomorrow
--due [date] Set a specific due date
--note [note] Attach a note to the new task
-o, --open Open Wunderlist on completion
-s, --stdin Create tasks from stdin
$ wunderline add 新規タスク --today
$ wunderline today
INBOX (1)
新規タスク Today ☆
期日を今日にして登録してすぐ表示した、という確認。よさそう。
感想
wunderline
コマンド実行してから認証経由してAPI叩くまでの時間が少しかかる模様。
しかし登録と表示はこれで十分そうなので他の便利用途を見つけていきたい。