Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
pull a list from rtm and dump it in org
import rtm
token = '' # get this somewhere else
# this is the token and secret from the rtm-cli app so I assume putting it here is ok
milk = rtm.createRTM('cbc76268b901ccb8d9fc5f3aebc4ee1f',
tasks = milk.tasks.getList(filter='list:books status:incomplete')
tasks = tasks.tasks.list[0].taskseries
for task in sorted(tasks, key=lambda x:'The','').strip()):
if hasattr(task.tags, 'tag'):
tags = task.tags.tag
if isinstance(tags, list):
tags = ':{0}:'.format(':'.join(tags))
tags = ':{0}:'.format(tags)
tags = ''
url = task.url or None
title ='[','{').replace(']','}')
if url:
print('* [[{0}][{1}]] {2}'.format(url, title, tags))
print('* {0} {1}'.format(title, tags))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment