経緯
手順
1. プチ・ロワイヤル仏和辞典のCD-ROMからソフトウェアをMacにインストール(必要ならAdobe AIRのインストールも)
プチ・ロワイヤル仏和辞典 /Applications/PetitRoyal.app
2.petit_royal.sqliteのテーブル名をリネームする(後述のpyglossaryがwordテーブルを前提としている)
itemsテーブルをwordテーブルに変更する
$ cd /Applications/PetitRoyal.app/Contents/Resources/DB $ sqlite3 petit_royal.sqlite SQLite version 3.16.0 2016-11-04 19:09:39 Enter ".help" for usage hints. sqlite> alter table items rename to word;
3. ubuntuを起動してpyglossaryをダウンロードする
https://github.com/ilius/pyglossary
$ git clone git@github.com:ilius/pyglossary.git
$ cd pyglossary
4. pyglossaryでsqlite3形式をApple XMLに変換し、辞書.appへのインストールに必要なテンプレートを作成する
$ python3 pyglossary.pyw --read-options=resPath=OtherResources --write-format=AppleDict ~/petit_royal.sqlite petit_royal $ ls petit_royal Makefile petit_royal.css petit_royal.plist petit_royal.xml
5. フォルダごとMacにコピーして、インストール
petit_royalフォルダ(上の4つのファイルを含む)をMacにコピーして移動
$ cd petit_royal
$ make
$ make install
辞書.appを開くとインストールされていた