Creating Todoist items with voice using reQall
Todoist is an awesome, minimalistic task management service. The voice-to-web service reQall, which is a free alternative to Jott, also does a fairly good job at task management. However, I wanted to stick to Todoist and bring voice input capabilities to it. I used reQall’s e-mail forwarding along with Todoist’s HTTP API and my awesome hosting provider’s powerful features to create a quick mashup.
First, I created a new project (category) called “reQall” at Todoist. This is the default project where new items that I create through voice will land. I discovered the unique ID of this project through the following Todoist API request:
http://todoist.com/API/getProjects?token=my_secret_token
I configured an e-mail alias on WebFaction to pipe received messages to a Python script. The script parses the e-mail, extracts the subject (which contains the transcribed text) and posts a new task to Todoist, under the “reQall” category, with priority 1 and today as the due date (so that it grabs my attention and I triage the task as soon as possible.) Here’s the Python script:
#!/usr/local/bin/python2.4
import sys, email, urllib
print 'reQall Router invoked'
msg = email.message_from_file(sys.stdin)
content = msg['subject'].split(': ', 1)[1]
print 'Adding: ' + content
query = urllib.urlencode({
'token': 'my_secret_token',
'project_id': 579713,
'priority': 1,
'date_string': 'today',
'content': content
})
res = urllib.urlopen('http://todoist.com/API/addItem?' + query)
print 'Response: ' + res.read()
For the time being, this setup works quite well for me. When I think of something while driving, I pick up my cell phone (very responsibly!), use voice dialing to call into reQall, utter a sentence and hang up. The transcribed text (sometimes with funny interpretations) lands as a new task under the “reQall” category on my Todoist account.