Mercurial > pumpbridge
diff src/sync.coffee @ 30:3e3fa35e3ce2
twitter sync likes, recommend mongodb
configure pump2twitter, twitter2pump in webui
author | Mathias Gebbe <mgebbe@intevation.de> |
---|---|
date | Thu, 28 Aug 2014 18:40:39 +0200 |
parents | 34cfa565f565 |
children | 8238d312e281 |
line wrap: on
line diff
--- a/src/sync.coffee Tue Jul 29 16:06:05 2014 +0200 +++ b/src/sync.coffee Thu Aug 28 18:40:39 2014 +0200 @@ -112,6 +112,7 @@ if network is 'twitter' post.text = post.text.replace(/(http[s]?:\/\/[^ ]+)/ig,'<a href="$1">$1<\/a>') + parsed = "<img src='" + post.user.profile_image_url + "'></img> <a href='https://twitter.com/account/redirect_by_id/" + post.user.id + "'>" + post.user.name + "</a> <a href='https://twitter.com/" + post.user.screen_name + "/status/" + post.id_str + "'> writes </a> via " + network + " at " + post.created_at + ":<br><br>" + post.text _.each post.entities.media, (attachment) -> parsed += "<br><img src='" + attachment.media_url + "'></img>"