{"id":761,"date":"2008-10-23T07:33:00","date_gmt":"2008-10-23T00:33:00","guid":{"rendered":"http:\/\/project-ile.net\/lulu\/confessions\/?p=42"},"modified":"2008-10-23T07:33:00","modified_gmt":"2008-10-23T00:33:00","slug":"twitter-script-for-x-chat","status":"publish","type":"post","link":"https:\/\/project-ile.net\/lulu\/blog\/2008\/10\/23\/twitter-script-for-x-chat\/","title":{"rendered":"Twitter Script for X-Chat"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><span style=\"font-weight: bold;\">The situation<\/span><\/p>\n<p>Ok, the problem is I&#8217;ve to many programs opened at the same time in my Macbook. One for IM, i.e., Adium, one for IRC, i.e., X-Chat-Aqua, and one for twitter, i.e., Twhirl, which is not good. In Ubuntu, Pidgin will handle whole thing beautifully (yeah, you need <a href=\"http:\/\/code.google.com\/p\/microblog-purple\/\">mbpidgin<\/a> plugin for Pidgin). Unfortunately, Adium can&#8217;t do that so I&#8217;ve to find another way out.<\/p>\n<p>Then, I found this page on Internet discussing how to write <a href=\"http:\/\/arstechnica.com\/journals\/linux.ars\/2007\/08\/29\/send-twitter-updates-from-xchat-using-python\">a python script<\/a> for posting tweet from X-Chat. Then, I combine it with the <a href=\"http:\/\/sugree.com\/node\/193\">code<\/a> from the sugree himself for syncing twitter and NokNok. Finally, I got this <a href=\"http:\/\/project-ile.net\/lulu\/twitter.py\">code<\/a> for posting tweet to and retrieve updated from twitter within X-Chat.<\/p>\n<p>First, you will need to install simplejson and python plugin for X-Chat. Then, put the code into Plugins directory of X-Chat, in my case, it is \/Applications\/X-Chat Aqua\/Plugins.  Next, you need to create a configuration file, called  .xchattwitt.cfg in your home folder. Inside, put your twitter username\/password and update interval like this<\/p>\n<p>[twitter]<br \/>username = myname<br \/>password = mypassword<br \/>interval = 300<\/p>\n<p>The interval is in second. Finally, restart your X-Chat or load the script into your X-Chat. Then, you can tweet by typing &#8220;\/tweet This is my message&#8221; in any window. The updated tweets will be shown on your current window, with Twitter user name. If you don&#8217;t like any of this behavior, you can change it from the code.<\/p>\n<p><span style=\"font-weight: bold;\">Code:<\/span><br \/>You can download the code from <a href=\"http:\/\/project-ile.net\/lulu\/twitter.py\">here<\/a>.<\/p>\n<p><span style=\"font-weight: bold;\">License:<\/span><br \/>The code is distributed under <a href=\"http:\/\/en.wikipedia.org\/wiki\/WTFPL\">WTFPL<\/a>.<\/p>\n<p><span style=\"font-weight: bold;\">Contact:<\/span><br \/><a href=\"http:\/\/twitter.com\/pruet\">@pruet<\/a><\/p>\n<p><span style=\"font-weight: bold;\">Thanks:<\/span><br \/><a href=\"http:\/\/arstechnica.com\/authors.ars\/segphault\">Ryan Paul<\/a> and <a href=\"http:\/\/twitter.com\/sugree\">@Sugree<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The situation Ok, the problem is I&#8217;ve to many programs opened at the same time in my Macbook. One for IM, i.e., Adium, one for IRC, i.e., X-Chat-Aqua, and one for twitter, i.e., Twhirl, which is not good. In Ubuntu, Pidgin will handle whole thing beautifully (yeah, you need mbpidgin plugin for Pidgin). Unfortunately, Adium [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-761","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3RSgi-ch","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/posts\/761"}],"collection":[{"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":0,"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/posts\/761\/revisions"}],"wp:attachment":[{"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/categories?post=761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/project-ile.net\/lulu\/blog\/wp-json\/wp\/v2\/tags?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}