Posted in Linux

sdcv文字介面字典工具

sdcv文字介面字典工具 Posted on 2006 年 11 月 09 日1 Comment

Quote: http://sfdir.tnc.edu.tw/fs/index.php/Sdcv 

SDCV 是一個簡易、跨平台、以文字介面為基礎的字典工具,採用星際譯王(StarDict)的字典格式。對於文字介面重度使用者而言,是一個不可多得的好工具。

[1.] apt-get install glib2-devel stardict

[2.] wget http://nchc.dl.sourceforge.net/sourceforge/sdcv/sdcv-0.4.2.tar.bz2
      tar zxvf sdcv-0.4.2.tar.gz && cd sdcv-0.4.2 && ./configure && make && make install

[3.] 至下載字典檔
http://stardict.sourceforge.net/Dictionaries_zh_TW.php
ftp://ftp2.tnc.edu.tw/pub/dict/dicts (非官方下載點)

[root@ssorc stardict4sdcv]# ftp ftp2.tnc.edu.tw
Connected to ftp2.tnc.edu.tw.
220 (vsFTPd 1.2.2)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (ftp2.tnc.edu.tw:root): anonymous
331 Please specify the password.
Password:
230-
230-Welcome to TNC ftp2.tnc.edu.tw
230—————————————————–
230-pub  —- Network/Perl/GNU/Database/Java/MSdownload
230-       /Security/PHP/Apache/tex/vim/dict
230-       /Mozilla/OpenOffice.org/RH-DOCS/phpcache
230-pub1 —- CentOS
230-pub2 —- OpenBSD
230-pub3 —- PC-BSD
230—————————————————–
230-If you want to get KNOPPIX, please try FTP3.tnc.edu.tw.
230-
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (163,26,200,6,191,104)
150 Here comes the directory listing.
-rwxr-xr-x    1 0        0             333 Oct 01  2005 d.sh
-rw-r–r–    1 0        0         4489767 Oct 09  2004 stardict-cdict-big5-2.4.2.tar.bz2
-rw-r–r–    1 0        0          548514 Oct 09  2004 stardict-cedict-big5-2.4.2.tar.bz2
-rw-r–r–    1 0        0         7183037 Oct 09  2004 stardict-langdao-ce-big5-2.4.2.tar.bz2
-rw-r–r–    1 0        0         8497133 Oct 09  2004 stardict-langdao-ec-big5-2.4.2.tar.bz2
-rw-r–r–    1 0        0         7669212 Oct 09  2004 stardict-oxford-big5-2.4.2.tar.bz2
-rw-r–r–    1 0        0         2397897 Oct 09  2004 stardict-xdict-ce-big5-2.4.2.tar.bz2
-rw-r–r–    1 0        0         3565145 Oct 09  2004 stardict-xdict-ec-big5-2.4.2.tar.bz2
226 Directory send OK.
ftp> mget *
mget d.sh? y
227 Entering Passive Mode (163,26,200,6,253,177)
150 Opening BINARY mode data connection for d.sh (333 bytes).
226 File send OK.
333 bytes received in 0.0003 seconds (1.1e+03 Kbytes/s)
mget stardict-cdict-big5-2.4.2.tar.bz2? y
227 Entering Passive Mode (163,26,200,6,128,81)
150 Opening BINARY mode data connection for stardict-cdict-big5-2.4.2.tar.bz2 (4489767 bytes).
226 File send OK.
4489767 bytes received in 16 seconds (2.8e+02 Kbytes/s)
mget stardict-cedict-big5-2.4.2.tar.bz2? y
227 Entering Passive Mode (163,26,200,6,132,203)
150 Opening BINARY mode data connection for stardict-cedict-big5-2.4.2.tar.bz2 (548514 bytes).
226 File send OK.
548514 bytes received in 2.3 seconds (2.4e+02 Kbytes/s)
mget stardict-langdao-ce-big5-2.4.2.tar.bz2? y
227 Entering Passive Mode (163,26,200,6,78,178)
150 Opening BINARY mode data connection for stardict-langdao-ce-big5-2.4.2.tar.bz2 (7183037 bytes).
226 File send OK.
7183037 bytes received in 26 seconds (2.7e+02 Kbytes/s)
mget stardict-langdao-ec-big5-2.4.2.tar.bz2? y
227 Entering Passive Mode (163,26,200,6,137,195)
150 Opening BINARY mode data connection for stardict-langdao-ec-big5-2.4.2.tar.bz2 (8497133 bytes).
226 File send OK.
8497133 bytes received in 29 seconds (2.8e+02 Kbytes/s)
mget stardict-oxford-big5-2.4.2.tar.bz2? y
227 Entering Passive Mode (163,26,200,6,85,178)
150 Opening BINARY mode data connection for stardict-oxford-big5-2.4.2.tar.bz2 (7669212 bytes).
226 File send OK.
7669212 bytes received in 16 seconds (4.6e+02 Kbytes/s)
mget stardict-xdict-ce-big5-2.4.2.tar.bz2? y
227 Entering Passive Mode (163,26,200,6,189,206)
150 Opening BINARY mode data connection for stardict-xdict-ce-big5-2.4.2.tar.bz2 (2397897 bytes).
226 File send OK.
2397897 bytes received in 8.3 seconds (2.8e+02 Kbytes/s)
mget stardict-xdict-ec-big5-2.4.2.tar.bz2? y
227 Entering Passive Mode (163,26,200,6,131,106)
150 Opening BINARY mode data connection for stardict-xdict-ec-big5-2.4.2.tar.bz2 (3565145 bytes).
226 File send OK.
3565145 bytes received in 12 seconds (2.8e+02 Kbytes/s)
ftp> quit
221 Goodbye.

[4.] 解開全部將檔案copy到 /usr/share/stardict/dic目錄底下
         sh d.sh
         vi e.sh

#!/bin/bash
set -x

ls -l | grep ^d | awk '{print $9}' |
while read file; do
        mv $file/* /usr/share/stardict/dic/
done

         sh e.sh

[5.] [root@ssorc stardict4sdcv]# sdcv standard

找到 4 項紀錄和 standard 相似。
–>XDICT英漢辭典
–>standard

[ˊstændәd]
n. 標準,水準,水平,規格,規範,規定;旗幟
a. 標準的,一般的

–>朗道英漢字典5.0
–>standard

*['stændәd]
n. 標準, 規格, 旗, 軍旗, 本位
a. 標準的, 合規格的
【計】 標準
【醫】 標準, 規格
【經】 標準, 準則, 標準樣品
相關詞組:
  be up below the standard
  be up to the standard

–>CDICT5英漢辭典

我式過 pietty為 utf8,而 linux console為 LANG=C時,sdcv需加入 –utf8-output參數

1 comment

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *