LoginSignup
0
0

More than 5 years have passed since last update.

Mac(El Capitan)でNode.js 5.0.0を使ってサクッとWunderline導入

Last updated at Posted at 2015-11-07

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叩くまでの時間が少しかかる模様。

しかし登録と表示はこれで十分そうなので他の便利用途を見つけていきたい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0