{"id":1284,"date":"2010-04-06T19:59:54","date_gmt":"2010-04-06T19:59:54","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=1284"},"modified":"2010-04-06T20:14:58","modified_gmt":"2010-04-06T20:14:58","slug":"following-twitter-hashtags-on-tv","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=1284","title":{"rendered":"Following twitter hashtags on TV"},"content":{"rendered":"<p><a href=\"http:\/\/www.flickr.com\/photos\/dalelane\/4497367013\/\" title=\"DSC06104 by dalelane, on Flickr\"><img loading=\"lazy\" decoding=\"async\" align=\"left\" style=\"border: thin solid black\" hspace=10 vspace=10 src=\"http:\/\/farm3.static.flickr.com\/2759\/4497367013_154f0ebbe0.jpg\" width=\"300\" height=\"225\" alt=\"DSC06104\" \/><\/a>As a lot of other people, I&#8217;m watching the debate of the Digital Economy Bill on BBC Parliament tonight. I&#8217;m also trying to follow along with some of the <a href=\"http:\/\/search.twitter.com\/search?q=%23debill\" target=\"_blank\">#debill back-channel on twitter<\/a>.<\/p>\n<p>With such a heated and interesting commentary on twitter, it reminded me of <a href=\"http:\/\/rooreynolds.com\/2009\/05\/27\/second-screen-this-works-for-me\/\" target=\"_blank\">Roo&#8217;s &#8220;Second screen&#8221; idea<\/a> of having tweets with a specific hashtag next to the TV during live TV events, when following the twitter backchannel during &#8216;The Apprentice&#8217;.<\/p>\n<p>Unfortunately, I don&#8217;t have a spare laptop kicking around to show tweets on. But I do have <a href=\"http:\/\/dalelane.co.uk\/blog\/?p=1228\">a hackable TV<\/a>. \ud83d\ude42 <\/p>\n<p>With that in mind, in just a few minutes I hacked together the following script to flash up tweets with the #debill tag on the TV:<\/p>\n<pre style=\"border: thin solid silver; background-color: #eeeeee; padding: 0.7em; font-size: 1.1em; overflow: auto;\"># run me using:\r\n#       python twittertv.py debill 1\r\n\r\nimport twython\r\nimport subprocess\r\nimport sys\r\nfrom time import sleep\r\n\r\ntwitterKeyword = sys.argv[1]\r\ntwitterSearchRateLimitMins = int(sys.argv[2])\r\n\r\ntwitter = twython.core.setup()\r\n\r\nshowOnTVCommand = ['svdrpsend', 'mesg', 'messagetodisplay']\r\n\r\nlasttweetid = 1\r\n\r\nwhile True:\r\n    search_results = twitter.searchTwitter(twitterKeyword, since_id=lasttweetid, show_user=True)\r\n\r\n    numtweets = len(search_results[\"results\"])\r\n    for tweetnum in reversed(range(0, numtweets)):\r\n        lasttweetid = search_results[\"results\"][tweetnum][\"id\"]\r\n\r\n        user = search_results[\"results\"][tweetnum][\"from_user\"]\r\n        tweet = search_results[\"results\"][tweetnum][\"text\"]\r\n        showOnTVCommand[2] = user + \" : \" + tweet\r\n\r\n        subprocess.Popen(showOnTVCommand)\r\n        sleep(20)\r\n\r\n    sleep(twitterSearchRateLimitMins * 60)<\/pre>\n<p><a href=\"http:\/\/www.flickr.com\/photos\/dalelane\/4498034258\/\" title=\"DSC06127 by dalelane, on Flickr\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm3.static.flickr.com\/2796\/4498034258_745fe5c39d.jpg\" width=\"450\" height=\"305\" alt=\"DSC06127\" \/><\/a><\/p>\n<p>It&#8217;s a quick-and-dirty hack, but I wanted to get something that would work before the debate was finished. \ud83d\ude42 <\/p>\n<p>And it seems to do the trick. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a lot of other people, I&#8217;m watching the debate of the Digital Economy Bill on BBC Parliament tonight. I&#8217;m also trying to follow along with some of the #debill back-channel on twitter. With such a heated and interesting commentary on twitter, it reminded me of Roo&#8217;s &#8220;Second screen&#8221; idea of having tweets with a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[449,306,398,151,427],"class_list":["post-1284","post","type-post","status-publish","format-standard","hentry","category-code","tag-debill","tag-television","tag-tv","tag-twitter","tag-vdr"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1284"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1284\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}