Skip to content

Instantly share code, notes, and snippets.

@cdent
Created May 8, 2013 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdent/5540918 to your computer and use it in GitHub Desktop.
Save cdent/5540918 to your computer and use it in GitHub Desktop.
A simple python tool to get a group of tiddlers as json and output the text, example usage: ./tiddlers.py 'http://cdent.tiddlyspace.com/bags/cdent_public/tiddlers.json?fat=1;sort=-modified;limit=10'
#!/usr/bin/env python
import sys
import json
from urllib2 import urlopen
def getstuff(from_uri):
print 'getting', from_uri
response = urlopen(from_uri)
content = response.read()
info = json.loads(content)
for tiddler in info:
print tiddler['title']
print tiddler['text']
print '#' * 80
if __name__ == '__main__':
getstuff(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment