philgyford / django-syncr Goto Github PK
View Code? Open in Web Editor NEWThis project forked from danfairs/django-syncr
A fork of danfairs' mirror of the original django-syncr code. 'master' branch: mostly stable. 'dev' branch: in progress
This project forked from danfairs/django-syncr
A fork of danfairs' mirror of the original django-syncr code. 'master' branch: mostly stable. 'dev' branch: in progress
Due to a fairly recent change, we follow a conversation back, using in-reply-to. Should provide an option not to do that (and maybe have that be the default again?).
Need to look at API: https://developer.foursquare.com/
Old issue, due to Twitter API limiting results returned per call: http://code.google.com/p/django-syncr/issues/detail?id=11
Need to do multiple API calls to resolve this.
eg, Flickr photo ID 3536073747 generates this:
time data u'1956-00-01 00:00:00' does not match format '%Y-%m-%d %H:%M:%S'
At the moment YouTube only adds tags for a Video when it's created. We should do a proper one-way sync, so that the local copy matches the remote copy whenever it's synced.
Would be nice to have it as detailed as the Flickr stuff, and there's lots more coming back from the API.
At the moment Delicious only adds tags for a Bookmark when it's created. We should do a proper one-way sync, so that the local copy matches the remote copy whenever it's synced.
Might be a near duplicate of the Delicious syncing, although given that's currently rather rudimentary, it might be worth improving the Delicious syncing first, then adding Pinboard?
Would be good to have some kind of general intro and basic installation instructions.
I assume this data is fetched from Twitter. If so, we should store it.
Could return more: up to 200 in one go, or 3200 with looping.
If we're going to store lat/long (for this and future services) we might as well do it in a more useful way.
eg, doing
f.syncPhoto('5577510939')
generates fatal errors because there's an invalid XML character in the EXIF data.
Also see http://tech.groups.yahoo.com/group/yws-flickr/message/6963
Not sure of the best way to handle this.
Traceback:
File "/Users/phil/.virtualenvs/django-syncr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/phil/Projects/personal/django-syncrproject/syncrproject/../syncrproject/views.py" in sync
34. f.syncPhoto('5577510939')
File "/Users/phil/Projects/personal/django-syncrproject/syncrproject/../syncrproject/syncr/app/flickr.py" in syncPhoto
337. photo = self._syncPhoto(photo_result, refresh=refresh)
File "/Users/phil/Projects/personal/django-syncrproject/syncrproject/../syncrproject/syncr/app/flickr.py" in _syncPhoto
216. exif_data = self.getExifInfo(photo_id)
File "/Users/phil/Projects/personal/django-syncrproject/syncrproject/../syncrproject/syncr/app/flickr.py" in getExifInfo
150. result = self.flickr.photos_getExif(photo_id=photo_id)
File "/Users/phil/.virtualenvs/django-syncr/lib/python2.6/site-packages/flickrapi/__init__.py" in handler
349. parse_format=args['format'], **args)
File "/Users/phil/.virtualenvs/django-syncr/lib/python2.6/site-packages/flickrapi/__init__.py" in __wrap_in_parser
435. return parser(self, data)
File "/Users/phil/.virtualenvs/django-syncr/lib/python2.6/site-packages/flickrapi/__init__.py" in parse_xmlnode
252. rsp = XMLNode.parse(rest_xml, store_xml=True)
File "/Users/phil/.virtualenvs/django-syncr/lib/python2.6/site-packages/flickrapi/xmlnode.py" in parse
96. dom = xml.dom.minidom.parseString(xml_str)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/minidom.py" in parseString
1928. return expatbuilder.parseString(string)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py" in parseString
940. return builder.parseString(string)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py" in parseString
223. parser.Parse(string, True)
Exception Type: ExpatError at /sync/flickr/syncphoto/
Exception Value: not well-formed (invalid token): line 144, column 9
In the admin, viewing the list of PhotoSets, and individual PhotoSets, throws errors about missing views.
One fix is, in your project, to add something like this to your urls.py:
from django.views.generic import DetailView
from syncr.flickr.models import Photo, PhotoSet
...
url(r'^photos/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[\w-]+)/$', DetailView.as_view(model=Photo), name='photo_detail'),
url(r'^photos/sets/(?P<pk>\d+)/$', DetailView.as_view(model=PhotoSet), name='photoset_detail'),
This won't make those URLs function as there are no templates, but it will be enough to make admin screens appear without errors.
It would be good to make this work better out-of-the-box. Not sure how is best.
Original issue at Google Code:
http://code.google.com/p/django-syncr/issues/detail?id=40 "This error occurs because of the permalink decorator on the model."
Could return more: up to 200 in one go, or more with looping.
Flickr tags are allowed to contain spaces and punctuation (eg "Phil Gyford", 't-shirt'). Their URL-ified version removes these ("philgyford", "tshirt").
The Tagging app that django-syncr uses only stores tags in their URLified form. Ideally it should keep the original "pretty" version too.
Haven't checked to see if this is an issue with Delicious etc - can't remember what kind of tags they allow.
When this URL: http://blog.foursquare.com/2011/03/14/1up-the-importance-of-platforms-and-how-we’re-extending-ours/ is a Delicious bookmark and it's synced, the apostrophe in it ends up as a question mark in our database.
The bookmark can currently be accessed at this tag: http://www.delicious.com/philgyford/syncingtest
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.