Jump to content

If you are a Remember The Milk fan


Recommended Posts

Posted (edited)

I live on Remember The Milk.  Here is a workflow for task adding, traversal, and some task management.  It leverages the command line milkmaid (http://rubygems.org/gems/milkmaid).  You must have milkmaid installed and authorized to use the workflow.

 

Anyways, here you go:  http://bit.ly/135QRHs

GitHub: https://github.com/MystykRiver/alfred2-rtm

 

 

Enjoy!

 

Edit: Change link to download from github.  Added github repository.

Edited by MystykRiver
Posted

Hi,

 

Please help ?;-)

How do I Install Milkmaid?

 

Thanks/Dany.

 

Here are the commands to install milkmaid.  All commands should be run in Terminal.

 

 

sudo gem install milkmaid
 

once that is done

 

 

milkmaid auth start
 

copy the link that is generated and open in a browser, that will authorize the app.  You may need to log into RTM.  Once that is done

 

 

milkmaid auth finish
 
Posted

Thanks for sharing this workflow. I have installed milkmaid and authorized the app. However, when I type RTM in Alfred, it only shows fetching data. How should I solve this problem? Thanks. 

Posted

Thanks for sharing this workflow. I have installed milkmaid and authorized the app. However, when I type RTM in Alfred, it only shows fetching data. How should I solve this problem? Thanks. 

 

It means the script is receiving either nothing at all or something unexpected from the milkmaid callout.  Try running milkmaid from the command line to make sure it is working.  Try this in Terminal:

 

 

 

milkmaid list
 

and make sure it outputs your Remember The Milk lists.

Posted

It means the script is receiving either nothing at all or something unexpected from the milkmaid callout.  Try running milkmaid from the command line to make sure it is working.  Try this in Terminal:

 

 

 

milkmaid list
 

and make sure it outputs your Remember The Milk lists.

 

I tried the command "milkmaid list" in the terminal. It did show my lists. But, Alfred still showed "fetching data...." 

Posted

I tried the command "milkmaid list" in the terminal. It did show my lists. But, Alfred still showed "fetching data...." 

 

Hmmm.  Not sure what is going on.  Here is the controller.py from the workflow that does the talking to milkmaid.  

 

https://www.dropbox.com/s/wyxp1nj5z6du03d/controller.py

 

Can you download it and then, from the directory where you downloaded it to, run:

 

 

 

python controller.py
 

 

and let me know what it outputs?

 

It should output your lists in an xml format but maybe you are getting a python error?

 

Here is a sample output

 

 

 

<?xml version="1.0"?>
<items>
<item uid="1363791460.03" arg="" valid="no" autocomplete="add ">
    <title>Add A Task...</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363791460.03" arg="" valid="no" autocomplete="list:1">
    <title>1: Inbox</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363791461.03" arg="" valid="no" autocomplete="list:2">
    <title>2: Sent</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
 .
 .
 .
</items>
Posted

Hmmm.  Not sure what is going on.  Here is the controller.py from the workflow that does the talking to milkmaid.  

 

https://www.dropbox.com/s/wyxp1nj5z6du03d/controller.py

 

Can you download it and then, from the directory where you downloaded it to, run:

 

 

 

python controller.py
 

 

and let me know what it outputs?

 

It should output your lists in an xml format but maybe you are getting a python error?

 

Here is a sample output

 

 

 

<?xml version="1.0"?>
<items>
<item uid="1363791460.03" arg="" valid="no" autocomplete="add ">
    <title>Add A Task...</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363791460.03" arg="" valid="no" autocomplete="list:1">
    <title>1: Inbox</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363791461.03" arg="" valid="no" autocomplete="list:2">
    <title>2: Sent</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
 .
 .
 .
</items>

 

I canceled my auth in RTM and tried to follow the instruction again. The situation is getting worse. Now I can not get auth URL. The below is the error message:

 

F, [2013-03-21T02:39:43.035575 #7058] FATAL -- : ERROR: Code: 98, Message: Login failed / Invalid auth token (RTM::VerificationException)
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/moocow-1.1.0/lib/moocow/endpoint.rb:111:in `verify'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/moocow-1.1.0/lib/moocow/endpoint.rb:76:in `call_method'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/moocow-1.1.0/lib/moocow/moocow.rb:129:in `method_missing'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/lib/milkmaid.rb:12:in `initialize'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:10:in `new'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:10:in `milkmaid'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:150:in `run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/program/class_methods.rb:155:in `block in run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/program/class_methods.rb:144:in `catch'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/program/class_methods.rb:144:in `run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/factories.rb:18:in `run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/factories.rb:25:in `Main'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:29:in `<top (required)>'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/milkmaid:19:in `load'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/milkmaid:19:in `<main>'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'

 

I am not sure what is going on. Sorry to bring more problems.

Posted

I canceled my auth in RTM and tried to follow the instruction again. The situation is getting worse. Now I can not get auth URL. The below is the error message:

 

F, [2013-03-21T02:39:43.035575 #7058] FATAL -- : ERROR: Code: 98, Message: Login failed / Invalid auth token (RTM::VerificationException)
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/moocow-1.1.0/lib/moocow/endpoint.rb:111:in `verify'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/moocow-1.1.0/lib/moocow/endpoint.rb:76:in `call_method'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/moocow-1.1.0/lib/moocow/moocow.rb:129:in `method_missing'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/lib/milkmaid.rb:12:in `initialize'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:10:in `new'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:10:in `milkmaid'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:150:in `run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/program/class_methods.rb:155:in `block in run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/program/class_methods.rb:144:in `catch'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/program/class_methods.rb:144:in `run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/factories.rb:18:in `run'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/main-4.7.7/lib/main/factories.rb:25:in `Main'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/gems/milkmaid-0.3.0/bin/milkmaid:29:in `<top (required)>'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/milkmaid:19:in `load'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/milkmaid:19:in `<main>'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'

 

I am not sure what is going on. Sorry to bring more problems.

 

Unfortunately I did not write milkmaid and haven't had the issues you are having.  Did you get the above error when you tried to generate the auth link again with milkmaid auth start?

Posted

Unfortunately I did not write milkmaid and haven't had the issues you are having.  Did you get the above error when you tried to generate the auth link again with milkmaid auth start?

 

Yes, I did. :(

Posted

This is pretty cool. One suggestion would be to allow different actions on the listed results using modifier keys (eg. option to mark as complete, ctrl to postpone, etc.)

 

Thanks for this though, I've been wanting an RTM workflow for a while. :)

Posted

Try removing the .milkmaid config file and the doing the auth again

 

 

from Terminal:

rm ~/.milkmaid
 

 

It can generate URL again. Thanks. The below is the out of running the command "python controller.py":

 

[Stephen@stephenmbp.local~/test]$ python controller.py
Traceback (most recent call last):
  File "controller.py", line 50, in <module>
    logger.debug("Query String: "+str(sys.argv).translate(None, "'"))
TypeError: expected a character buffer object
Posted

It can generate URL again. Thanks. The below is the out of running the command "python controller.py":

 

[Stephen@stephenmbp.local~/test]$ python controller.py
Traceback (most recent call last):
  File "controller.py", line 50, in <module>
    logger.debug("Query String: "+str(sys.argv).translate(None, "'"))
TypeError: expected a character buffer object

 

Okay, I didn't test the script on older versions of python.  I believe that was the issue.  I have made some changes.  Download the workflow again from the link in the first post and install it.  It will overwrite the one installed.  Let me know if that works for you.

Posted

Okay, I didn't test the script on older versions of python.  I believe that was the issue.  I have made some changes.  Download the workflow again from the link in the first post and install it.  It will overwrite the one installed.  Let me know if that works for you.

 

Thanks for updating the workflow. However, It still shows "fetching data.. ."

Posted

Thanks for updating the workflow. However, It still shows "fetching data.. ."

 

What version of python do you have?  I tested it on 2.5-2.7 so far.  

 

type at the Terminal

 

 

python --version
 
Posted

Download the latest controller.py again and run it and see what it gives you now.

 

https://www.dropbox.com/s/wyxp1nj5z6du03d/controller.py

 

in Terminal

 

 

 

python controller.py
 

 

It seems it can get the output now. But why can't the workflow work? It is very odd.

 

[Stephen@stephenmbp.local~/test]$ python controller.py
<?xml version="1.0"?>
<items>
<item uid="1363998554.35" arg="" valid="no" autocomplete="add ">
    <title>Add A Task...</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998554.35" arg="" valid="no" autocomplete="list:1">
    <title>1: Inbox</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998555.35" arg="" valid="no" autocomplete="list:2">
    <title>2: Personal</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998556.35" arg="" valid="no" autocomplete="list:3">
    <title>3: dminorstudio</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998557.35" arg="" valid="no" autocomplete="list:4">
    <title>4: Sent</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998558.35" arg="" valid="no" autocomplete="list:5">
    <title>5: All Tasks</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998559.35" arg="" valid="no" autocomplete="list:6">
    <title>6: Lilian Gem</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998560.35" arg="" valid="no" autocomplete="list:7">
    <title>7: Today</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
<item uid="1363998561.35" arg="" valid="no" autocomplete="list:8">
    <title>8: To-do</title>
    <subtitle></subtitle>
    <icon>rtm_icon.png</icon>
  </item>
</items>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...