iBus颜文字输入法,增加了安装脚本,需改进

这个其实是 @shellex 君在Google Code上的项目:

http://code.google.com/p/ibus-table-emoji/

其说明日志在:

http://shellex.info/ibus-emoji-im/

本文已贴在Ubuntu中文论坛等待反馈:
http://forum.ubuntu.org.cn/viewtopic.php?f=122&t=258949

前阵子自己重新安装了Ubuntu,这回要把emoji再装回去,还是要重复一些步骤……

本着Python写脚本代替手工重复操作的原则,我就写了这个东西,大家看看给点改进意见哈~ m( =∩王∩= )m


附件是从网上下载的压缩包,挺小的。里面增加了我的 emoji-installer.py
就到我的DropBox(你懂的)里去下载吧~:

#! /usr/bin/env python
# filename:emoji-installer.py

import os

def install():
    '''
    You can use this script to install ibus-table-emoji
    '''
    os.system("sudo cp emoji-table.db /usr/share/ibus-table/tables")
    os.system("sudo cp ibus-emoji.svg /usr/share/ibus-table/icons/")
    print "*" * 60
    print "emoji has been installed successfully\nand You need to restart iBus to take it work,\nenjoy~  (^_^)"
    print "*" * 60
    #FIXME How to restart iBus after I made these steps?

if __name__ == "__main__":
    install()

有一个最好能改进的地方是,安装完emoji后需要restart iBus输入法,这个我还不会在Python里实现,请大家添加。

ps:由于对html标签不熟悉,之前发表的日志代码部分格式丢失。请教了 @muzuiget 之后,使用了<pre><code>………………</code></pre>括住代码,好看多了~留句话做个记号~

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s