Coder Social home page Coder Social logo

wayneashleyberry / wunderline Goto Github PK

View Code? Open in Web Editor NEW
310.0 14.0 29.0 2.12 MB

✅️ Command-line client for Wunderlist, the easiest way to get stuff done.

Home Page: https://git.io/vM45l

License: MIT License

JavaScript 100.00%
todo javascript wunderlist gtd node

wunderline's Introduction

Wunderlist has shut down, so unfortunately wunderline no longer serves a purpose.

Wunderline

Wunderlist for your command line!

Build Status npm styled with prettier

Installation

npm install -g wunderline

Authentication

Wunderline requires you to create your own Wunderlist application and store the client id and an access token locally. You can create a new application here.

When creating an application you will be asked for an app url and an auth callback url, you can just use dummy values for these.

Once that's done, click CREATE ACCESS TOKEN as highlighted here:

access-token

Your ACCESS TOKEN will show up above

access-token modal

Now you can run wunderline auth and enter the values.

Usage

$ wunderline --help

Commands:

    auth            Authenticate Wunderline
    add [task]      Add a task to your inbox
    done            Mark a task as done
    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
    lists           List 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

Adding Tasks

Add tasks to your inbox.

$ wunderline add Hello, World!

The add command also supports creating tasks from stdin.

$ cat todo.txt | wunderline add --stdin

You can also add tasks to a list, that list will be created if it doesn't exist.

$ wunderline add Hello, World! --list Greetings

Due dates are now supported using one of the following options.

$ wunderline add Hello, World! --today --tomorrow --due 2015-12-25

You can add subtasks at task creation time.

$ wunderline add 'Run a marathon' --subtask 'Train for the marathon' --subtask 'Register for the marathon'

Completing Tasks

Tasks can be completed using the done subcommand.

$ wunderline done

completing tasks

Viewing Lists

All of Wunderlists smart lists are supported, so there are various ways to see what tasks you have to do.

$ wunderline inbox
$ wunderline starred
$ wunderline today
$ wunderline week
$ wunderline all

Alternatively, you can view any other list by using the list subcommand.

$ wunderline list shopping

Open

Open Wunderlist, defaults to opening the web app.

$ wunderline open

The only other platform currently supported is mac, use the set-platform command to change your settings.

$ wunderline set-platform mac

Export

Exports your data to stdout.

$ wunderline export > export.json

Filtering with jq

The export command will give you all of your data, unfiltered, which can be a lot. If you'd like to search, filter or manipulate your data then check out jq.

Here are some examples, filtering out completed and starred tasks.

wunderline export | jq '.data.lists[].tasks[] | select(.completed == true)'
wunderline export | jq '.data.lists[].tasks[] | select(.starred == true)'

Bonus Points

Ack / Ag

You could search for the word "todo" in a project and pipe the input into wunderline. Each line will be parsed and turned into a task, be careful because this could result in a lot of tasks!

This might be a terrible idea, even useless at best, but hopefully it will get you thinking.

$ ag todo --nocolor --nofilename | wunderline add -s

Debugging

wunderline uses request so if you want to inspect api requests just set the NODE_DEBUG variable.

$ NODE_DEBUG=request wunderline inbox

License

MIT © Wayne Ashley Berry

wunderline's People

Contributors

alexandrebarbaruiva avatar dhaffner avatar dkvdm avatar imbriaco avatar jmcclell avatar marionebl avatar mattdesl avatar mauricioborges avatar psalant726 avatar purinda avatar rnc avatar thor77 avatar tolleiv avatar turusuke avatar wayneashleyberry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wunderline's Issues

Auth errors

Displaying authentication errors would be super useful and prevent issues like #40

wunderline add crashes

Hello,
I'm working with wunderline. It works fine. Except the "add" command crashes with the following error statement. I tried also on a raspberry pi. With the same error.

Output in Windows 7:

C:\Users\aj>wunderline add Hello
C:\Users\aj\AppData\Roaming\npm\node_modules\wunderline\wunderline-add.js:146
stdin().then(data => {
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

C:\Users\aj>

Do you have an idea?

add --stdin has no effect

I just installed wunderline, and I have been experimenting with all the functions. wunderline add --stdin does not work as advertised. Here is a sample session:

$ wunderline list inbox
$ wunderline add One Thing
$ wunderline list inbox
INBOX (1)
One Thing                                                                 ☆
$ cat > todo.txt
Two Thing
Blue Thing
$ cat todo.txt | wunderline add --stdin
$ wunderline list inbox
INBOX (1)
One Thing                                                                 ☆

I am running on Ubuntu Linux with a fresh install of nodejs.

wunderline all: Cannot call method 'toUpperCase' of undefined

If I try to use without make the configuration, I get this error

$ npm install -g wunderline
$ wunderline all

TypeError: Cannot call method 'toUpperCase' of undefined
    at printList (/home/action/.parts/lib/node_modules/wunderline/util/print-list.js:66:30)
    at Array.forEach (native)
    at /home/action/.parts/lib/node_modules/wunderline/wunderline-all.js:14:8
    at /home/action/.parts/lib/node_modules/wunderline/util/get-lists.js:48:5
    at /home/action/.parts/lib/node_modules/wunderline/node_modules/async/lib/async.js:46:16
    at /home/action/.parts/lib/node_modules/wunderline/node_modules/async/lib/async.js:1248:30
    at /home/action/.parts/lib/node_modules/wunderline/util/get-lists.js:38:9
    at /home/action/.parts/lib/node_modules/wunderline/node_modules/async/lib/async.js:46:16
    at replenish (/home/action/.parts/lib/node_modules/wunderline/node_modules/async/lib/async.js:297:28)
    at /home/action/.parts/lib/node_modules/wunderline/node_modules/async/lib/async.js:317:29

ls improvements

  • print inbox as soon as it's received from the api, then wait for all lists to sort and print them.
  • add filters for due dates, maybe --today and --week
  • display due dates as "Today" and "Tomorrow" when they are indeed that.

Fixed column width truncating title

First, I am thanking you for spending time to build this brilliant CLI for the wunderlist! very useful.

I started using wunderline today and found that task title gets truncated when you have tasks title running for more than 60 characters, since most of my tasks are running past this limit, I couldn't pretty much list my daily TODO tasks effectively.

An example:

Current implementation

60_char_limit

What I am proposing

dynamic_column_width_fix

PR for the issue can be found here
#67

Unable to add task, getting an exception

Hello,

I am getting the following exception while executing following command

wunderline add Hello, World!

Exception:

    var lists = body.filter(function (item) {
                     ^
TypeError: undefined is not a function
    at Request._callback (/usr/local/lib/node_modules/wunderline/util/get-inbox.js:27:22)
    at Request.self.callback (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:197:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:1050:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:996:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)```

Mark item as complete?

Is there currently any way to mark an item as complete? If not, do you plan to add this?

Grunt

  • grunt-contrib-csslint
  • grunt-eslint
  • grunt-html

Force ES6 support

I tried to install this under node 0.10.40, which was the version I had installed at the time. Since that version doesn't support ES6 syntax, which apparently is used here, I got this error:

$ wunderline add "Hello, World"

/home/naps62/.nvm/v0.10.40/lib/node_modules/wunderline/wunderline-add.js:146
        stdin().then(data => {
                           ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:935:3

I believe this can be fixed by adding an engine section to package.json?

Website

GitHub pages will be perfect for our needs :)

truncate task titles

❯ wunderlist add kasdjhflaksdjhflkajsdhflkasjhdflkajshdlkfjashdlkfjhasldkfjhalksdjfhlkasjdhflkasjhdflkasjdhflkjasdhlkfjashdlkfjhasdlkfjhadslkfjhalskdjfhlkasdjfhlkasdjhflkasjdhflkasjdhflkasjdhflaksjdfhlkasjdhflkasjdfhlkasjdhflkasjdhflkasjdhflkajsdhflkajsdhflkasjdfhlkasdjhflkasjdhflkajsdhflkjasdhlfkjahsdlkfjhaslkdfjhaslkdjfhalskdjfhlaksjdhflaskdjfhlaksjdhflkasjdhflkasjhdflkajshdflkajshdflkjahsdlfkjahsdf
{ type: 'validation_error',
  translation_key: 'api_error_validation_error',
  message: 'The information you sent could not be processed (validation failure).',
  title: [ 'is too long (maximum is 255 characters)' ] }

Display a given list

Similar to wunderline search [query], a command to show tasks from a given list. Not sure about the command name. Some ideas:

These would find and display tasks from a list whose name is "My Private Tasks"

  • wunderline view private
  • wunderline list private
  • wunderline search --list private

I'd be more than happy to implement this, just curious on your thoughts. Cheers for the nice CLI!

List your lists

It would be great if I could list all my lists.

Something like

$ wunderline lists
- Inbox (16)
- Today (2)
- Project Website (13)
    - Design (2)
    - Backend (7)
    - Frontend (4)

Any thoughts on this?

export command

Add an export command which writes all lists, tasks, sub-tasks and notes to stdout. Optional formatting could be nice, json, markdown etc.

Due date listings don't respect the year

Hi,
I'm using Wunderlist to keep track of todos which are recurring on a yearly or bi-yearly basis. So I've a lot of dates in the far future.
Unfortunately "wunderline list" doesn't show the year of the due date - that's more a minor problem but still not too nice. The second problem is that the "wunderline week" command also lists all todos which are due in 1 year.
Would be great if you could have a look.

Steps to reproduce:

  • Create a task with due date in 365 days, run one of the commands mentioned and you'll see

Besides that thank you for sharing this great tool :)

Cheers

'TypeError: undefined is not a function' when trying to look at the inbox

Hi,

this looks like a great project. I installed it, but there seems to be something wrong.

$ wunderline inbox
/usr/local/lib/node_modules/wunderline/util/get-inbox.js:22
    var lists = body.filter(function (item) {
                     ^
TypeError: undefined is not a function
    at Request._callback (/usr/local/lib/node_modules/wunderline/util/get-inbox.js:22:22)
    at Request.self.callback (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:197:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:1050:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:996:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16

Thanks,
Hans

Any command that pulls back data fails, including Auth

I'm having an issue on multiple machines (Windows 10, Ubuntu 15.04). When I run wunderline auth and enter my apps credentials I get the following (on Windows 10, but I get the same on Ubuntu):

TypeError: Cannot call method 'split' of undefined
    at Request._callback (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\wunderline-auth.js:47:39)
    at Request.self.callback (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\node_modules\request\request.js:198:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\node_modules\request\request.js:1082:10)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\node_modules\request\request.js:1009:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:943:16
    at process._tickCallback (node.js:419:13)

It seems like it authenticates successfully though. Then when I run wunderline inbox I get:

TypeError: Object #<Object> has no method 'filter'
    at Request._callback (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\lib\get-inbox.js:29:22)
    at Request.self.callback (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\node_modules\request\request.js:198:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\node_modules\request\request.js:1082:10)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (C:\Users\acrowder\AppData\Roaming\npm\node_modules\wunderline\node_modules\request\request.js:1009:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:943:16
    at process._tickCallback (node.js:419:13)

If I can get some spare time I'll attempt to fork and fix, but in the meantime I wanted to submit an issue in case you were able to fix it more quickly than I can. Thanks!

Object #<Object> has no method 'filter'

TypeError: Object # has no method 'filter'
at Request._callback (/usr/lib/node_modules/wunderline/util/get-inbox.js:29:22)
at Request.self.callback (/usr/lib/node_modules/wunderline/node_modules/request/request.js:198:22)
at Request.emit (events.js:98:17)
at Request. (/usr/lib/node_modules/wunderline/node_modules/request/request.js:1057:14)
at Request.emit (events.js:117:20)
at IncomingMessage. (/usr/lib/node_modules/wunderline/node_modules/request/request.js:1003:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:448:13)

node -v
v0.10.37

Ubuntu 12.04

uname -a
3.13.0-48-generic #80~precise1-Ubuntu SMP Thu Mar 12 19:30:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Ordering

It appears the order items are returned does not match the order of the clients (e.g. Firefox, Android, Chrome)

Transfer ownership

Wunderline is getting a new home!

Worry not, this will not effect anything - other than getting more maintainers and publicity :)

Display sub-tasks

Given a task has sub-tasks, I want to see them as a list below the main task

TypeError: Cannot read property 'filter' of undefined

After installing the tool via npm, I've got the following problem. It comes every time I use wunderline with any option for example "inbox"

 $ wunderline inbox
/usr/local/lib/node_modules/wunderline/util/get-inbox.js:27
    var lists = body.filter(function (item) {
                     ^
TypeError: undefined is not a function
    at Request._callback (/usr/local/lib/node_modules/wunderline/util/get-inbox.js:27:22)
    at Request.self.callback (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:197:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:1050:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:996:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

Add is broken

Fix for #61 seems to have broken add feature- both individual task as well as piped from stdin

Direct add

$ wunderline add test
/usr/local/lib/node_modules/wunderline/wunderline-add.js:146
        stdin().then(data => {
                          ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Piped stdin

cat myfile.txt | wunderline add --stdin
/usr/local/lib/node_modules/wunderline/wunderline-add.js:146
        stdin().then(data => {
                          ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Multilined note

is it possible to add a multilined note?

$ wunderline add "Lines" --note "Line 1\nLine 2\nLine 3"

I've tried \n but didnt have any luck and I was wondering if there is a different command I should try.

Thanks

Case sensitivity

If I have a list with e.g. Current and current listing on Current should not return current

auth doesn't work

Auth doesn't work for me:

$ 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 XXXXXXXX
? ACCESS TOKEN aaaasdasadsdasdjasodjasoijdoaisjdaijsodjasodijasodjasodijaodij
/usr/local/lib/node_modules/wunderline/wunderline-auth.js:47
    console.log('Thanks ' + body.name.split(' ')[0] + ', Wunderline has been a
                                     ^
TypeError: Cannot read property 'split' of undefined
    at Request._callback (/usr/local/lib/node_modules/wunderline/wunderline-auth.js:47:38)
    at Request.self.callback (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:198:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:1063:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:1009:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

The CLIENT ID and ACCESS TOKEN are repasted from the website.

Then for login:

wunderline inbox
/usr/local/lib/node_modules/wunderline/lib/get-inbox.js:29
    var lists = body.filter(function (item) {
                     ^
TypeError: undefined is not a function
    at Request._callback (/usr/local/lib/node_modules/wunderline/lib/get-inbox.js:29:22)
    at Request.self.callback (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:198:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:1063:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/wunderline/node_modules/request/request.js:1009:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

Wunderline cannot push or see items from the website

I am using Wunderline on a linux system. wunderline whoami does work and shows my account information. But tasks that are created are not pushed to the website. I also cannot see website tasks on the commandline. I am using version 3.3.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.