很山寨

经常访问GNU的网站你会发现一些很神奇的东西,比如gNewSense,又比如最新的:
IceCat

怎么样,够震撼啊,GNUzilla套件里的第一个发布,IceCat。IceCat是嘛?你知道Firefox吧,那拉开冰箱门,把Firefox塞进去,带上冰箱门,嗯,那就是IceCat了。当然是开玩笑了,GNU IceCat is the GNU version of the Firefox browser. Its main advantage is an ethical one: it is entirely free software.

现在已经可以在Ubuntu中使用这个病猫,哦不,冰猫了:

sudo add-apt-repository ppa:gnuzilla-team/ppa
sudo apt-get update
sudo apt-get install icecat

Patch for Fantasdic Google Source

I found fantasdic a great powerful dictionary tool with friendly UI and supports multiply sources. Unfortunately, this project seems to be no longer maintained. The latest version is 1.0-beta7.
fantasdic-google

The google translate source was created in 2007. As the google translate service page changed, this module doesn’t work any more, so I just picked up my vim then created this patch for those still want to use it.

This patch has dependency with ruby’s json module, so before you apply it, run:
sudo gem install json
or
sudo apt-get install libjson-ruby1.8

Download the patch at:
https://bugzilla.gnome.org/attachment.cgi?id=152835

Patch it (Ubuntu installation as example):
cd /usr/lib/ruby/1.8/fantasdic/sources/
sudo patch google_translate.rb /home/sun/google_translate.rb.diff

Restart fantasdic, then your get it works! And this bug is tracked at:
https://bugzilla.gnome.org/show_bug.cgi?id=605641

翻译po

翻译一个po文件。确认安装了gettext工具包。

cd到po目录,创建pot
intltool-update –pot

创建相应的语言文件,例如zh_CN
msginit -l zh_CN.utf8

程序会提示选择或输入邮箱,之后就会生成zh_CN.po文件,打开文件,逐条编辑msgstr即可。

手动编辑LINGUAS文件,按顺序将zh_CN添加到其中。

可以通过这个命令查看翻译的进度
msgfmt -cv zh_CN.po

对于更新pot更新的情况,可以使用命令更新po文件
intltool-update zh_CN

参考:

A button by GIMP

Inspired by a “Call to action” tutorial of Photoshop, I’d like to do the same thing with free and open source software, GIMP.

Before we start the journey, it’s better to get well prepared. Take a look at the powerful plugin “Layer Effects“. It provides you complete functionality as “Layer Style” in Photoshop does which is of critical importance in such kind of image manipulation. Follow the installation guide and I won’t spend many words about this step.

Open your gimp, create a new canvas with custom size (which makes you feel comfortable)

New a layer, use selection tool to create a rounded rectangle selection area.

Fill the selection with gradient color.

Resize the canvas. Glow the selection with 3px by menu command “selection->glow”. The crop the canvas by selection using “image->crop by selection”.

Then we apply some layer effects to beauty the button.

  • layer effects: inner glow, white 75% opacity, size 5
  • layer effects: stroke 1px

Place some text on the button such as “Sign Up”. Bold sans font(DejaVu sans or Helvetica bold) is recommended here.

Use gradient overlay effect on the text. As the layer effects plugin doesn’t support gradient overlay on text, we have to do it in a different way. First, create a new layer. Then convert text to selection with context menu command. Gradient fill the selection and hide the original text layer at last. Now we got:

Don’t stop here. Add layer effects on the new layer:

  • inner shadow, black, size 2px, distance 2px, angle 90
  • drop shadow, light, size 2px, distance 2px, angle 90

You can tune the color schema by yourself along the process :)

Exaile-DoubanCover 0.0.2

The Exaile plugin “Douban Covers” has been upgraded to 0.0.2. Now there is a new preference pane inside exaile preference dialog. This update provides you an optional choice to specify your own apikey when access douban.com open api. With an apikey, your request frequency will be raised to 40 times per minute.

Again, you can get the plugin from:
http://bitbucket.org/sunng/exailedoubancovers/downloads/

Grab source with mercurial:
hg close http://bitbucket.org/sunng/exailedoubancovers/

Also, exaile-cn has its first 0.3.0-compatible version released early today. As a part of Exaile-cn, Exaile-Doubancovers 0.0.1 has been packaged into the public release for the first time. Find the project at: http://code.google.com/p/exaile-cn/