Skip to main content

bitlbee: twitter in irc

dedicate to @sychopx, without her instruction, this wouldn't be done.

from BitlBee Home Page

What is BitlBee?

BitlBee brings IM (instant messaging) to IRC clients. It's a great solution for people who have an IRC client running all the time and don't want to run an additional MSN/AIM/whatever client.

BitlBee currently supports the following IM networks/protocols: XMPP/Jabber (including Google Talk), MSN Messenger, Yahoo! Messenger, AIM and ICQ, and the Twitter microblogging network (plus all other Twitter API compatible services like identi.ca and status.net).

很明显的说了,bitlbee是把IM转成IRC的形式,非常适合整天开着irc而又不想开msn/aim的人。

目前bitlbee支持XMPP/Jabber (包括 Google Talk), MSN Messenger, Yahoo! Messenger, AIM and ICQ, and the Twitter 。

记录一下自己在ubuntu上折腾bitlbee的过程:

要准备的东西:irc客户端(这里用的是irssi)

插曲:因为看错了这个东西的名字,少看了个“l”,以为是“bitbee”,所以在ubuntu apt安装是一直找不到。事实上,bitlbee已经包含在ubuntu源里了。另外,据@sychopx says,

in fact you don't have to install it to use it. it's already implemented on the server. all you need to do is to connect to the server.

运行irssi,/connect testing.bitlbee.org 6668 note:更多server在这里;6668端口是ssl连接,如果irssi连接时提示lost connection,需要更改irssi配置文件里的server内容。不须加密用6667端口也行。
register //密码随便输入,要记住,下次用同样的nickname登录irc的时候,输入identify 就可以自动打开twitter了。
然后是添加im账号,msn、jabber之类的都行,具体看官网wiki。这里说下twitter的。account add twitter BitlBee foo //bitlbee是自己在twitter的ID,foo是密码,这里可以随便输入,因为后面是OAUTH认证的。
输入account on , 就开始twitter认证了。用浏览器打开认证地址,点击allow。看不到类似http://api.twitter.com/oauth/authorize?oauth_token=xxxxxxxxx的地址的,在irssi里安cltr+n切换screen。当初不知道这事……一直搞不定认证……
然后twitter就log in了,同样cltr+n切到相当于channel的twitter timeline,可以开始推了。
bitlbee的root命令可以输入help查看,具体命令的帮助,例如account命令,输入help account

In Addition

实现#nowplaying的功能。就是发一条推,带#nowplaying标签,播放的歌曲信息。

因为在irssi里chat,就相当于tweet了。所以找个irssi脚本能显示播放歌曲信息就可以了。

我自己用mocp多点,指导我的@sychopx用mpd,两个都有脚本支持。

mocp的irssi脚本在http://moc.daper.net/node/272

下载后mv到~/.irssi/scripts

在irssi中/script load imocp.pl

再到twitter channel,/mocp np

输出的格式控制,可以修改imocp.pl

Comments

Popular posts from this blog

Magotan 2.0T 入手两月作业

6月12日,家里入手迈腾2.0T 豪华,开了2月了,小记一下。 购车: 家里准备上20-30W的车,看了A4L、迈腾、C5、蒙迪欧、途观等等,潜伏论坛多日,准备入迈腾1.8 T 舒适。但是看车那天,得知1.8的都得等车,而2.0T豪华的有现车。上车试了一下就中毒了。。。请示领导后,12W付了车拉回家。 先给个车库里的pp 家里一楼为了小迈,把铁拉门改卷门了……前厅5.2m长,小迈4.8m……刚刚好 前座 中控台 说说比较满意的地方: 动力 操控 油耗 科技 动力:2.0T的发动机配6档DSG手自一体变速箱,提供200马力最高车速230km/h,最大扭矩280。动力很足,超车很自如。 操控:其他什么悬挂的不懂,反正就是感觉方向盘比较轻,稳定,双手离开也能保持直线。油门、刹车一点就有。 油耗:加的97#,两个月共加了1500的油,里程1624km,还剩1/4多油箱的油,行车电脑显示综合油耗9.9(主要在城区开,在高速上的瞬时油耗可以降到6个)。 科技: 电子手刹,踩住刹车,按P点亮就行了 kessy无钥匙启动,有三档,按入一档解锁方向盘,二档启动电源,三档点火 定速巡航,跑高速不错,解放踩油门的脚,杆子向上,速度加5,向下减5,踩了油门或者刹车就解除定速巡航,向内拨2下,自动恢复上次设定的速度 行车电脑,可以显示瞬时油耗、综合油耗、续航里程、导航信息、歌曲信息等 转向灯光随动,可以照亮侧边路况 DSG手自一体,挂入D再向右侧进入手动模式;S,传说中的运动模式,很暴力;ESP:车身稳定;auto hold:电子驻车,开启后,上下坡起步不需刹车,不滑车;P>>:雷达;后挡风玻璃电动遮阳等 原装导航,支持SD卡,MP3 CD/DVD,自带18G硬盘。平时一般用个2G的SD卡,基本不需要刻盘。 蓝牙电话神马的也不错,配对了我的BB9700,上车开启蓝牙,自动连接,通过多功能方向盘可以接挂电话,车载音响通话。 最好玩的是声控操作,上视频~~(为装B,车载导航设成英文系统了,因为哥觉得英文女生读出指令比较有科技感): 其他:

TwitVim: Tweeting in the vim

很久没更新了,因为很久没折腾了。 昨晚火星地发现了一个好东西:twitvim,是个vim script。 试用了下,很不错,该有的功能都有了。这里做个笔记。 1、安装 从 vim script 下载twitvim的vba包。 用vim打开下载到的twitvim.vba,输入 :so % 回车完成安装。 安装curl,twitvim需要curl来fetching。 sudo apt-get install curl 2、配置 在.vimrc里添加 let twitvim_login = " user:pwd " 试用api,则添加 let twivim_api_root = " api_url " 使用代理,添加 let twitvim_proxy = " proxyhost:proxyport " 3、使用 进入vim (via http://www.vim.org/scripts/script.php?script_id=2204 ) :PosttoTwitter - This command will prompt you for a message to send to Twitter. :CPosttoTwitter - This command posts the current line in the current buffer to Twitter. :BPosttoTwitter - This command posts the current buffer to Twitter. Alt-T - In Visual select mode, the Alt-T key posts the selected text to Twitter.   (use Ctrl-T instead if menu bar is enabled) NOTE: The T mapping was changed to Alt-T to avoid overriding the T search command. Alt-R - Starts a @-reply. (from timeline buffer) Alt-D - Starts a direct...

aes,gpg,encrypt, man etc

-Who is the most controversial man in the world recently? -Definitely it's Julia Assange . WikiLeaks had released a package of file encrypted with AES. What shall we do right now? yeah! download it and wait for the passphrase! So let's have a little try at encrypting in Ubuntu. GPG  here is sample file another_file. 1.gpg -c filename enter a passphrase.Now the file is encrypted. 2.gpg filename.gpg AES     Download AESCrypt here.     extract the package with         tar xzvf filename     then         make         sudo make install     I haven't tried aescrypt yet. But you can make it with a simple command. Just go to their home page. Others things: Chinese man page. while downloading source file of aescrypt, i found that they provide a manpage file. So making 'man aescrypt' working in terminal became a problem. After goo...