Subscribe to RSS Subscribe to Comments Blog of Roy Chan

Blog of Roy Chan

Progress dialog box of Zenity

Zenity is the tool to display different types of GTK+ dialog box. It is very useful if you want to write a simple GUI shell script.

Apart from those simple yes-no/ok-cancel dialog box, zenity also provide interesting dialog box like the progress dialog box. The dialog box can be show with the commend “zenity --progress“. To make it meaningful, you may need to add more options of it.

The option “--text=string” control a short description show above the progress bar in the dialog box and “--percentage=num” set the percentage show in the progress bar.

You must not miss the following 4 options which applicable to all zenity dialog box. “--title=string” set the title of the dialog box and “--window-icon=path” set the window icon show beside the title. “--width=num” and “--height=num” control the size in pixels of the window. For example:

zenity --progress --title='Waiting...' --window-icon='/usr/share/pixmaps/gnome-about-logo.png' --text='Waiting for you to press Cancel' --percentage=50

Zenity progress dialog box

Sure, you won’t happy with the above functions. Let make the dialog box moving. Option “--pulsate” can make the progress bar beating right and left:

yes | zenity --progress --pulsate

Zenity pulsating progress box

Not satisfied? Me too! So, when will the Ok button press-able. Can the progress bar grow to show the progress of a task? Yes, it can. During the zenity show the progress dialog box, it also listen to the STDIN. If you type an number and press ENTER in the terminal you run zenity, you will see the number become the percentage show progress bar of the dialog box. If you start and line with “#”, type few words after it and press ENTER, the words will replace the description above the progress bar. In short, zenity --progress received the following format from STDIN:

num1
# description1
num2
# description2
...
# ...

Where num percentage of the progress bar and description change the progress description. The following script demo and explain more clear about the progress dialog box:

for x in 10 20 30 40 50 60 70 80 90 100
do
    echo $x
    echo "# Count to $x"
    sleep 1
done | zenity --progress --title='Counter'

Zenity progress box

You see that when the progress bar become 100%, the Ok button is activated.

Besides, you will found that if you press the “Cancel” button during the script working. The dialog box will disappear but you won’t see the prompt while script still running and not affected. You should expect the “Cancel” button will stop the script but it’s not. Option “--auto-kill” should be added to make it happen. It make the “Cancel” button kill parent process of zenity - the shell. Beware that if you type zenity on the command line, it will kill the shell and close the whole terminal. If you run zenity in a shell script, the script will be killed.

The last option you shall not missed is “--auto-close” which close the dialog automatically when the progress bar reach 100.

Many people demonstrate zenity progress with wget which show a progress dialog to show the progress while wget downloading file. But it seems the output format of wget was changed and all script I found online didn’t work. Here is my fix of the demo.

wget "$url" 2>&1 | \
     sed -u 's/^.* \+\([0-9]\+%\) \+\([0-9.]\+[GMKB]\) \+\([0-9hms.]\+\).*$/\1\n# Downloading... \2 (\3)/' | \
     zenity --progress --title='Download' --auto-kill --auto-close

It refine the wget output:

11550K .......... .......... .......... .......... .......... 21%  304K 2m51s
11600K .......... .......... .......... .......... .......... 21%  296K 2m50s
11650K .......... .......... .......... .......... .......... 22%  321K 2m50s
11700K .......... .......... .......... .......... .......... 22%  475K 2m49s

to zenity --progress format.


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


GDM 佈景主題: 用 Google/Windows/Mac 登入

GDM Google GDM

我一向都喜歡使用有人像的 GDM 登入畫面,近來最想使用的 tobain 設計的 Avio-GDM,不過今天看見 feuc5766 設計的 GDM Google English GDM 登入佈景,覺得很有趣。這個佈景主題把登入畫面裝扮成 Google 搜尋網頁,暗喻 Google 在當世電腦世界的地位。

當然,Gnome-look.org 還有模仿其他 OS 的登入畫面佈景:


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Ubuntu 上的圖形介面 PPPoE 連接程式!? Gnome System Tools 2.22

慣性教人在 Ubuntu 或 Debian 連上 xDSL 都是使用文字模式的 PPPoE 設定程式 pppoeconf 。不過跟據多年教人使用 GNU/Linux 的經驗,很多人對就算遇然打一兩句命令或文字模式的程式都很抗拒的。號稱人性化的 Ubuntu 多年來仍只用文字模式的 pppoeconf 來設定 xDSL 連線,似乎有點說不過去。

不過令天倒留意到 GNOME System Tools 2.22 中的 network-admin 似乎有了 PPPoE 的支援。翻查 changelog ,PPPoE 和 GPRS/UMTS 是在 2.21.4 時加入。(去年 12 月推出)

只要選取 系統 -> 管理 -> 網路 執行 network-admin ,雙擊 “點對點連接” (Point-to-Point connection) 。

GNOME System Tools 的 network-admin

在 ppp0 的屬性中,勾選啟用這個連線 (Enable this connection),就在連線類型 (Connection Type) 中,選擇 序列數據機 (Serial Modem)、 PPPoE 或 GPRS/UMTS 。

PPPoE 設定

因為本人的寬頻供應商不使用 PPPoE ,所以未能測試這個新功能。如果有人可以幫手測試一下,並郵寄一兩個 screenshot 給我, 我會感激不盡。


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


How gnome-codec-install in Ubuntu work?

Ok, I know that I can ask people to install all GStreamer plugin to solve the codecs problems. But some people keep asking which package they need exactly. One thing in Ubuntu 7.04 that help me a lot is that is that it can detect the codec you need when you try to play a multimedia file and help you to install the packages. However, I still need to told people which package they really need on other distros.

I try to look around the gnome-codec-install and dig out how it know which package we need. First, gnome-codec-install is only a symbolic link of gnome-app-install. gnome-app-install put information of all available desktop applications in .desktop file under /usr/share/app-install/desktop. Those codecs package got the field “X-AppInstall-Codecs’ in their .desktop file. update-app-install will collect the information of all .desktop and build index in /var/cache/app-install/. The index file is in GDBM. I’m lazy to decode it. Therefore, I wrote a one-line shell command to build an index table from the .desktop files. Run the following command under /usr/share/app-install/desktop


grep  -l 'X-AppInstall-Codecs' * | while read file;
    do
        pkg=`basename "$file" .desktop`;
        grep 'X-AppInstall-Codecs' $file | \
            sed -e 's/^X-AppInstall-Codecs//' \
                -e 's/[=;]0.10:/\n'$pkg':/g' \
                -e 's/\.desktop$//'
    done | awk -F: '{printf "%s:%s\n", $2, $1}' | sort | less

Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Beryl 在北京的”Wah” 電腦新體驗

Ubuntu 7.04 Beryl Cube

上星期在南京北京走了一趟,到現在才有時間寫寫這次出差的經驗。

為北京分公司做宣傳,這次北京短短兩天半的時間走訪了幾間北京的大學和高等學院介紹GNU/Linux和Computer Forensics。由於事忙,一直未有準備演講的內容,加上北京同事設提的壓力,隨手找了最簡單的Beryl作演示,結果反應好得令我出奇。Beryl獨有的火燒視窗環形視窗切換器(Ring Window Switcher)等固然引來哄動的徊響。然而,傳統的cube和橡皮糖視窗招來”Wah! Wah!”的驚嘆!

微軟在宣傳Vista時就用一系列所謂”Wow”體驗的故事和所謂”Wow”電腦新體驗的口號。三月時,我就曾和YPWong討論過利用Beryl製造一些”Yeah”/”Yo”體驗的故事和Vista打對台,後來因時間問題不了了之。但這次北京之旅,我們確實真的利用Beryl打造了”Wah”電腦新體驗的故事。


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Beryl環形視窗切換器:為什麼GNU/Linux+Beryl比Vista更酷!!!!!!!

跑Vista最少要2GB記憶體,CPU要快,要玩3D特效,顯示卡更加要最新最強的。但GNU/Linux + Beryl, 512MB記憶體已可以暢順。顯示卡用兩年前的舊殘卡也可以應付自如。近數月為HKLUG公司搞了數次Ubuntu+Beryl的安裝版,用的是 AMD Althon 2000MHz + 512MB RAM 和兩三年前的ATI Radeon 7000顯示卡,九成Beryl的特效都運行很流暢。

Vista的所謂3D特效在Mac OSX的Aqua、GNU/Linux的Compiz或Beryl面前顯像小孩子玩意。最醜的要算是Vista經常宣傳的 3D Alt-Tab,按一下Win+Tab把所有視窗打側像骨牌排成真線讓你在各視窗間切換,幾乎是所有Vista展示必見的功能,但較好用和美,始總不及Mac OS X 始創的Expose,把所有視窗平鋪在桌面上讓你去選,比Win+Tab更美更清楚。Expose功能亦是我開始使用Beryl或Compiz的原因。而最新開發版本的Beryl新增了一個近似3D Alt-Tab但更酷百倍的功能 - 環形視窗切換器(Ring Window Switcher)。

只要安裝了svn中的Beryl (好像說最新的Beryl放進了套件beryl-plugins-extra中),在「Beryl設定管理員」(Beryl Setting Manager) ->「視窗管理」 (Window Management) -> Application Window Switcher -> Misc. Options 中勾選 「察看視窗清單」(Show Window List) 就可以了。現在你只要按 Win-Tab,Beryl就會把所有視窗視排成環狀,讓你去切換。當然這功能同樣是實時的,環狀上的影片還時動的。這功能又酷又比Vista的3D Tab 更清楚。

Just Another Tech Blog: Cool New Beryl Feature: Ring Window Switcher

Scale (Expose) in Beryl
Expose in Beryl

P.S. 我不是說Vista一無是處,酷也不代表一切。但如果你是為美觀而選Vista,你顯然做了個最錯的決定。


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Beryl 升級0.2.0問題 (for Ubuntu)

Beryl: Ring Window Switcher

久沒有更新Ubuntu裡的Beryl,今天想試一試svn最新的Beryl環形視窗切換器(Ring Window Switcher), 就出了事。整個Beryl都crash了,出了:

libberylsettings: Couldn't get vtable from '/usr/lib/beryl/libdbus.so' plugin
libberylsettings: Couldn't get vtable from '/usr/lib/beryl/libcrashhandler.so' plugin
libberylsettings: Couldn't get vtable from '/usr/lib/beryl/libdecoration.so' plugin
libberylsettings: Couldn't get vtable from '/usr/lib/beryl/libwobbly.so' plugin
libberylsettings: Couldn't get vtable from '/usr/lib/beryl/libanimation.so' plugin

apt-get --purge remove ......拆除Beryl再重新安裝都沒有。結果在Beryl Forum找到gourdin提無的解決方法,就是除了 purge 外,還要來個徹底大清洗。方法如下:

先拆除所舊版本Beryl的套件及其有關檔案:

apt-get remove --purge beryl beryl-core beryl-dev beryl-manager beryl-plugins beryl-plugins-data beryl-settings beryl-settings-bindings emerald libberyldecoration0 libberylsettings0 libemeraldengine0

找出所有殘餘的檔案 (除了在用戶home directory中個別用戶的設定檔外) 並放入檔案 /tmp/beryl.list

find / -iname '*bery*' | grep -v "^/home" > /tmp/beryl.list

你最好人手檢查一下 /tmp/beryl.list 有沒有你不想刪除的檔案,然後把裡面提給的檔案全部刪除:

xargs sudo rm -rf </tmp/beryl.list
sync

重新安裝beryl:

apt-get install beryl beryl-core beryl-manager beryl-plugins beryl-plugins-data beryl-settings beryl-settings-bindings emerald libberyldecoration0 libberylsettings0 libemeraldengine0

搞定後,你可以享受最新最酷的Beryl了!!! \(^O^)/


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


再談Metisse : 不是3D的三維桌面

週五提過Mandriva的新3D桌面 Metisse ,因為相關的網站被/.了。到近幾天才有機會看到官方screencast和試用LiveCD。原本曾說過覺得Metisse沒有大驚喜,這幾天試用後有很大的改觀。在畫面效果來說,Metisse 顯然給超炫的Beryl、Compiz甚至MacOS X的Aqua比下來。 或者不客氣的說,很醜。但正如其名 (Metisse 意指美印混血兒) ,Metisse 顯然走實而不華路線,很不少功能頗實用。

自動卷頁

我以往都不覺得卷起視窗的一個角位,除了有趣外有什麼實質用途。要偷看後面的視窗為什麼不把前面的視窗移開或令整個視窗半透呢?不過Metisse就為卷頁提供一個妙用。當你要由後面的視窗抄一些東東到前面的視窗,自行點擊視窗最少要四個步驟,autoraise 很多時也不是活動自如。但在Metisse中,只要你用滑鼠在後面的視窗拖拉企圖選取一些文字,前面的視窗會自動卷起讓你看到整個後面的視窗,可以清楚選取你要的文字。選好放開鼠鍵後,前面的視窗又會自動張開復原。只要你在你要貼出文字的地方按鼠中鍵,就完成了。前後只不過兩步,比以前爽很多了。

Dailymotion
[YouTube]

反轉視窗

打側和旋轉視窗其實很簡單。當你把鼠標移到視窗邊框時接下左鼠鍵,就會出現一個十字架,跟住十字架的指示移至你想做的動作方向就可以將視窗打側或旋轉。這個功能的重點是讓你在不改變軟件心目中視窗的大小而把幾個視窗堆在同一個桌面中。例如以下影片中,使用者將兩個Firefox的視窗打側對排在桌面中,令她可以一次過看到和比較兩個網頁的內容但不改變網頁顯示的大小。大家都知縮窄網頁視窗很多時會引致爆格或多了個很麻煩的scorll bar。但這打側視窗就不會有這個情況出現。你可以隨時按[Win-F1]令視窗回復正常或變回打側的模樣。你亦可以用[Win-F4]或[Win-F5]將視窗左右打側,[Win-F6]或[Win-F7]將視窗上下打側,[Win-F2]或[Win-F3]將視窗旋轉。你甚至可以[Win-A]令視窗自動旋轉。

Dailymotion
[YouTube]

遠眺群桌

Metisse轉換桌面並不像Beryl/Compiz/Aqua般轉動正立方體,而是相等於把pager放大的Bird View。這種方式似乎平淡很多,但也實用很多。按著Win鍵再把鼠輪滾向下(亦可以按[Win-D]),就可以跳入Bird View,一次過遠眺所有桌面,讓你清楚所有視窗的位置及內容。和Beryl/Compiz/Aqua,所有視窗內容變動都會即時反映在Bird View上。即是說你是可以在Bird View看到某桌面視窗正在播放的電影。你亦可以在Bird View上用右鼠鍵把任何視窗在各桌面間搬動。要切回桌面模式,只要按著Win鍵再把鼠輪滾向上或再按一次[Win-D]。

Dailymotion
[YouTube]

視窗鏡像

這個功能頗有用。你可以按視窗左上角的小圖示並在選單上選Duplicate來為視窗複製個鏡像。這個鏡像和原本一模一樣。你在任何一個視窗所做的改變都即時反映在其他視窗中。用處在於鏡像可以被打側放大縮細。你可以把一個視窗的鏡像縮細放在另一個桌面。這樣你就可以在那桌面一邊工作,一邊搞角落中的鏡像縮圖觀察另一個程式的情況。必要時切換桌面去專心操控相關程式。

Dailymotion
[YouTube]

重組介面

這個功能絕對酷斃了。Metisse可以讓你複製幾個視窗部份介面並將之合併成為新視窗。你只需要按著[Win]鍵和左鼠鍵在視窗上拖拉就會選取了一個長方形。在選取了的位置按右鼠鍵,選Create Façades,就會建立一個只包括選取區域鏡像的新視窗。鏡像上的按鈕或控制單元同樣可以按動運用,你亦可以再選取另一程式控制單元並拖至 Façades 視窗邊位併合到Façades 中。這個功能絕對有很大發展空間。例如,你可以把某網頁的文字框剪出來放在桌面下面,再從要參考的網頁視窗中把要內容部份和scroll bar(減去了其他控制單元、頁面上的navigator bar和margin位等) 剪出來在桌面上方,邊參考邊撰寫。這比把視窗上下平鋪有更大的空間和操控性。另外Façades 的組合可以儲存,下次開啟軟件時你可以再載入先前定義好的Façades 使用,很方便。更有趣的是,你可以把任何Drop down box 變成 radio box 。(似乎真的有人注意到太多軟件把濫用 drop down box 了) 當然如Pager的版片中所展示,你亦可為任何視窗中間挖洞。

Facades Metisse (29MB QuickTime Movie)
(29MB QuickTime Movie)

Metisse的缺點

  • Expose是不可缺的 - 把所有視窗平鋪來讓用戶選是Aqua最傑出的設計,這是Bird View代替不了。
  • 不夠炫 - 現在的模樣是不能打動愛炫的大眾去安裝GNU/Linux試試的。

現時Metisse或只是實驗階段,仍有很多改善空間。希望藉著這次發佈及Mandriva的協力,Metisse 能得到多點的參予改良,早日像Citroen的般 C-Metisse 發揮其 True Color!!!! \(^o^)/

相關網站

相關文章


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Possbily the best Beryl demo ever!!

Wow!! It might be the best Beryl demo video til now!!!! \(^o^)/ Just find it in Youtube

Other fun stuffs


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl] [Digg It] [Netscape] [Reddit] [Newsvine]


香港 Gnome 開發者

Jserv 的 blog 提到Jeff Waugh 造了張全球 GNOME 開發者分佈圖,竟然發現香港人踪影:

“bb” # William Brack, Tai Tung, Hong Kong

或者我應該找他出來談談。消除一下小狗狗這個 Gnome 繁體中文翻譯的 Single Point of Failure 也好。 -p

以往香港在中華自由軟件界都被認為無甚建樹。但說起上來,當年大中華首個 Debian 開發者也是在香港出現。誰?當然不是指 foka (Anthony Fok, 霍東靈),他那時還在加拿大。沒記錯,Debian 開發者所在圖 在大中華第一個點是 ypwong (Anthony Wong, 黃彥邦) 。 8-) 咦!? O_o Y.P. !!!!! 你是 98 或是 99 年當 DD 的? Randolph Chung 也很早就當 DD 喎!


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


PDF “瀏覽” 程式

最近幫一些自由軟件作介面翻譯,當翻到一個 PDF reader,看見上一手翻作 “PDF 瀏覽程式” ,下意識上總覺得不妥。結果十多年來首次去翻查中文詞典,發覺 “瀏覽” 主要指大略看一看的意思。心想用 “瀏覽程式 ” 指 brower 還算可以,指 “PDF reader” 則怪怪的。雖則很多人都是把 pdf 印出來才閱讀,PDF reader 對他們來說只是一個供預覽的工具。不過真的在電腦上閱讀 PDF 書籍的人也不少,”瀏覽” 這字是否不大適合呢? 我倒偏向翻譯成 “閱覽” ,不過還未決定。

回應: 正字遊戲 - Deki


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Stardict 2.4.3-3

Finally, I have finished packaged the stardict 2.4.3-3 package. This build is fixed the problem of FTBFS with GTK+ 2.4. I have also translated a traditional chinese help help of stardict (submitted to upstream) and packed in this build.

While I didn’t get any problem on building with pbuilder last week, I got the same problem as Sebastien’s bug report this time - Missing X11. It spent several hours to work in the pbuilder environment and found that I miss a build dependency on libxt-dev finally. (Should it be depended on other gtk/gnome libraries?)

I try to test this build with pbuilder in Sid and Sarge. It should be ok

Oops, wrong timing. All port fail to build via buildd. Sad


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Stardict 2.4.3-2 uploaded

Spent sometime to solve the dependency problem of Stardict package, YPWong help me to upload the Stardict 2.4.3-2 package to sid yesterday. It sounds like solved most bug report but I got one more report this morning. Sebastien Bacher had spending a whole day to compile most gtk+ application under GTK+ 2.4 and submit bug report to those failed. And Stardict is one of them.

After having a glance on it, it is caused by fail to find the X11 library!? Oops, the log show his machine have already install libx11-dev. BTW, try to re-compile Stardict with GTK+ 2.4. (The old package work well under Gnome 2.6, I have tested it)


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


stardict 2.4.3-2

Yesterday, I work a whole night on the stardict package again and didn’t sleep til 7 today. I don’t got holiday during easter and my hacking plan delayed. Then, I haven’t touch it for a while after 2.4.3-1 enter Sid. However, the package is stuck in Sid and fail to enter Sarge. I spent a few night to try to solve it and other remain bugs. With the help of YP, I found that it is caused by my hard code dependency on stardict-tools and make it fail to install on Alpha and IA64 platform (They don’t got libc6 but only libc6.1) I hard code that coz I found dpkg-shlibdeps fill the dependency with many unnecessary package. I seems that it is better to modify the automake to minimize the dependency.

Apart from the dependency problem, I also fixed two remain bugs in the BTS and point the documents of package stardict to the one in stardict-common to save space. Now, waiting for the help of Foka and see if this version enter Sarge. Wow, it will be bug free in BTS if everything is alright!


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


More about Gnome 2.6

Finally, I have installed the Gnome 2.6 Experimental Debian package in some testing machines. They are not yet on Sid or event Experimental while some are still stuck in Incoming. But I found that the Debian Gnome team build a repository for those packages when I read Jordi Mallach’s blog. If you got a spare space and would like to try them, put the following line in you /etc/apt/source.list:

deb http://www.hk.debian.org/debian/ sid main non-free contrib
deb http://www.hk.debian.org/debian/ experimental main non-free contrib
deb http://pkg-gnome.alioth.debian.org/debian/ experimental main

Then use your favorite APT client to upgrade to Gnome 2.6.

If you use Slackware, Dropline Gnome 2.6 is available now.

Of course, don’t miss some another Gnome 2.6 review from OSNews and The state and future of Gnome 2.6.

I can’t describe how Gnome delight me in these several releases. I heard many KDE advocators stated that many new features of Gnome had already existed in KDE long time ago. But sorry. KDE is never my cup of tea! And undoubtfully, the future of open source desktop is belong to Gnome. ;P


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Ok, stardict 2.4.3

Ok, I just received email from Debian Installer system that it finally accept my stardict 2.4.3 packages. You will see them around in SID soon. Remind you once again, no dictionary is included in the package. You need to download from the original site or wait until I have time to hack the Dict format. May be easter, I don’t know.


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


StarDict 2.4.3-1 Debian 包

好了, Stardict 2.4.3 的 Debian 包 終於大致上完成。 同時,我也得到了 WordNet Debian 包的維護者 Andreas Trille 同意做一次 NMU 去令 wordnet 產多一個 stardict-wn 包去支援 stardict 。

在 Debian-devel 上, Andreas 及其他人都提出最好是 stardict 可以支援 DICT 格式,這可以省了數十 MB 的空間 (Debian 上而有太多 DICT 格式的包),而本身 DICT 也是 RFC 標準。不過 Andreas 仲使不太願意也 很康慨地答允我這個暫時方案。

現在只等 Foka 有時間檢查好再上載好就可以了。大家就可以有最新的 stardict 用了。 Smiling (心急的可以到 http://www.debian.org.hk/~voidoo/debian/incoming/ 下載試試) 當然, 中文及其他字典還 要自己去主站下載


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


stardict 2.4.3 Debian 包

昨晚初步完成了 stardict 2.4.3 的 debian package 及對 wordnet 的修改,也寄了電郵 給 stardict 原作者 和 debian-devel 打招呼和問意見。

其實 stardict 2.4.3 的 debian package 早就完成了,不過一直想分拆幾個 package 以減少佔用 mirror 站的硬盤空間及是否修改 Makefile.am 令其將字典轉換程式安裝上 /usr/lib/stardict 。拖了一個多星期,還是用最原始的 cp 去做算了。

我已把半完成品放上 http://www.debian.org.hk/~voidoo/debian/incoming/ ,有興趣的可以自己下載來玩玩。

這個版本分拆成 3 個 package:

  • stardict: 重要程式
  • stardict-common: 硬體無關性的資料檔
  • stardict-tools: 字典轉換程式

不過因為版權問題,這個版本沒有任何字典。當然理想的處理方式都要以一個字典一個 package 的方式放上 Debian 。但中國人對知識產權的認識實在太差了,幾乎所有在 stardict 主站上的中文字典的來源及真正版權都不明不白。我想短期來說都很難可以包一個中文字典上 debian 供 stardict 使用。

我的計劃是先修改現時 Debian 上而有的字典包,令她們生成多個含 stardict 格式版本的package。第一步從 wordnet 開始,待測試 好後會寄及 wordnet 的管理者。然後就到 gcide, freedict, jargon 等。搞妥這些易處理的後,才把有問題的字典一個一個的發上 debian-legal 做驗身。

修改 wordnet 也搞了一陣子。因為懶得再加 build-depends 去讀取 stardict 字典的 ifo 檔需要資料 ,結果還是被迫要改字典轉程式,令其生成一個 ifo 草稿,然後再增修其他資料。

大體上都是照這個方向去做,現在主要是看看 debian-devel 還有什麼回應罷了。


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Gnome 2.6 translation

My progress of LoTR is very slow recently coz I’m busy on Gnome 2.6 translation and Stardict Debian Package in these recently news. To help to standardize the translation, I spend a few hours to write a PO searching engine which allow people to see how others translate the same terms.


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Based on Fluidity© 1998-2007 Roy Hiu-yeung Chan