# HG changeset patch # User Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com> # Date 1300732214 -3600 # Node ID 4a759c70e40f1dc19b97caa9a9ad254e87dbdf87 # Parent 210dc265c70f532c6a4a5422d27a7ffe79c90573 add profile_picture_url to the ldt element diff -r 210dc265c70f -r 4a759c70e40f script/lib/iri_tweet/export_twitter_alchemy.py --- a/script/lib/iri_tweet/export_twitter_alchemy.py Fri Mar 18 15:45:49 2011 +0100 +++ b/script/lib/iri_tweet/export_twitter_alchemy.py Mon Mar 21 19:30:14 2011 +0100 @@ -273,11 +273,14 @@ tweet_ts = int(time.mktime(tweet_ts_dt.timetuple())) tweet_ts_rel = (tweet_ts-ts) * 1000 username = None + profile_url = "" if tw.user is not None: username = tw.user.name + profile_url = tw.user.profile_image_url if not username: username = "anon." - element = etree.SubElement(elements, u"element" , {u"id":unicode(uuid.uuid4())+u"-"+unicode(tw.id), u"color":unicode(options.color), u"author":unicode(username), u"date":unicode(tweet_ts_dt.strftime("%Y/%m/%d")), u"begin": unicode(tweet_ts_rel), u"dur":u"0", u"src":u""}) + + element = etree.SubElement(elements, u"element" , {u"id":unicode(uuid.uuid4())+u"-"+unicode(tw.id), u"color":unicode(options.color), u"author":unicode(username), u"date":unicode(tweet_ts_dt.strftime("%Y/%m/%d")), u"begin": unicode(tweet_ts_rel), u"dur":u"0", u"src":unicode(profile_url)}) etree.SubElement(element, u"title").text = unicode(username) + u": " + unicode(tw.text) etree.SubElement(element, u"abstract").text = unicode(tw.text)