N900 EPWING辞書 eblook+lookup

emacs上から、辞書引きできるようにしてみた。

ここでインストールしたlibebが必要。セルフコンパイルではうまくいかなかったので、Ubuntuクロスコンパイル環境で、EB ライブラリをクロスコンパイル環境に構築。クロスコンパイル環境の、scratchbox上で

sb-conf select FREMANTLE_ARMEL
wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.2.tar.bz2
解凍して
./configure
make
fakeroot make install

eblook1.61

wget http://openlab.ring.gr.jp/edict/eblook/dist/eblook-1.6.1.tar.gz
tar xvzf eblook-1.6.1.tar.gz
cd eblook-1.6.1
./configure
make

できたバイナリ eblookを、N900の、/home/user/bin/において、
ln -s /home/user/bin/eblook /usr/bin/
シンボリックリンクも作成。

N900上で、lookupをインストール。

wget http://openlab.ring.gr.jp/edict/lookup/dist/lookup-1.4.1.tar.gz
tar xvzf lookup-1.4.1.tar.gz
cd lookup-1.4.1
./configure
make install

~/.emacs に以下を追記。

;lookup(EPWING閲覧)
;; オートロードの設定
(autoload 'lookup "lookup" nil t)
(autoload 'lookup-region "lookup" nil t)
(autoload 'lookup-pattern "lookup" nil t)

;; キーバインドの設定
(define-key ctl-x-map "l" 'lookup) ; C-x l - lookup
(define-key ctl-x-map "y" 'lookup-region) ; C-x y - lookup-region
(define-key ctl-x-map "\C-y" 'lookup-pattern) ; C-x C-y - lookup-pattern

;; 検索エージェントの設定 CATALOGS があるディレクトリを指定
(setq lookup-search-agents '*1

上記設定だと、C-x y でリージョンを辞書引き 、C-x C-y で、手入力で辞書引き。
emacsでインラインで画像表示もできるようだ。

*1:ndeb "/home/user/MyDocs/eb_dict/WIKIP") (ndeb "/home/user/MyDocs/eb_dict/genius") (ndeb "/home/user/MyDocs/eb_dict/super2002")