sporkstorms.org
sporkstorms.org miscellaneous code bits software photos
don't touch that dial!

Cocoa/Perl CEDICT interface

This is a very old version of the software. Please check out CocoaCEDICT instead.

CocoaPerlCEDICT is an OS X Cocoa interface to the CEDICT (Chinese English Dictionary). It is a Mandarin dictionary, and this application uses traditional characters (繁體字).

about

CocoaPerlCEDICT provides an interface to a Chinese-English dictionary. It supports looking up words by their English definition, Pinyin pronounciation, or traditional Chinese text.

The layout of its interface is largely based on that of OriDict, and the application icon from it is used.

notable features:

  • Search by English, Pinyin, or Chinese
  • Filter results: "begins with", "ends with", "exact match", "partial match"
  • Tone marks. Example: pin1 yin1 becomes pīn yīn.
  • Convenient font resizing with a slider
  • Easy modification of program behavior. Just edit the Perl modules (CocoaPerlCEDICTWindowController.pm most commonly) within the application bundle. No need to recompile.
    An example of the type of change you might want to make is to modify the font styles/colours and the order the parts of each record (Chinese, Pinyin, and English) are displayed.

This application is a testiment to the virtues of rapid development using CamelBones (and obviously CPAN). It was thrown together in under an hour!

screenshot

CocoaPerlCEDICT

download

application
source

requirements

  • OS X 10.3
  • Camelbones

    If you just want to run CamelBones apps, install the runtime framework.
    In order to write your own Cocoa/Perl applications, install the developer package.

  • Lingua::ZH::CEDICT

    Here's a quick overview in case you've never installed Perl modules before. This may seem rather troublesome.

    • You will probably need your root account enabled. Here's how.
    • Open a terminal (Terminal in your Applications -> Utilities folder).
    • Type sudo perl -MCPAN -e "install Lingua::ZH::CEDICT". It will ask for a password. If it said something like "sorry try again", "you aren't authorized..." or anything to that effect, continue reading. Otherwise skip to the next step.
      Try typing su, then enter the password. if it didn't spit out any errors, type perl -MCPAN -e "install Lingua::ZH::CEDICT".
    • Answer any questions the CPAN installation gives you. Let it install any dependencies that are required.
    • All done.

License and Copyright

CocoaPerlCEDICT is Copyright © 2004, Mark A. Stratman <mark@sporkstorms.org>

It is licensed under the GNU General Public License.
You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.