將詞典 XML 檔轉換為 HTML、PDF、ePub、StarDict 等格式的 Python 程式。
StarDict is the leading cross-platform, open-source dictionary software. It is released under the GNU General Public License, and is available for a wide variety of systems and platforms. In addition to Windows, Linux, Mac, FreeBSD, Solaris etc. systems, it is possible to run versions of StarDict on many mobile platforms, including the iPhone (look for the free application 'WeDict' in the App Store), maemo devices (e.g. Nokia N770, N800), and all Java (J2ME) -based handheld devices. There is even a command-line version available for *nix systems, and a php interface under development.
Dictionaries and glossaries for many languages and specialist vocabularies are available in the StarDict format, including others which are of interest to those working with Buddhist texts and languages. A collection is available at StarDict's project page at SourceForge, and another at XDXF.
For further information, see StarDict's project page at SourceForge, StarDict's online-search website, or StarDict on Wikipedia.
Windows installation information
Please see below for more information concerning fonts and scripts.
▲ TopFor Linux users, everything should be straightforward. Many, if not most, Linux distributions include StarDict automatically, and most will have good font support either 'out-of-the-box' or just a few clicks away. If your distro does not provide a package for StarDict, you can get an .rpm, a .deb or the source-code from StarDict's project page at SourceForge.
Please see below for more information concerning fonts and scripts.
▲ TopA Mac version of StarDict is made available at StarDict's project page at SourceForge. I have no experience with this myself, and have heard mixed reports. If you have problems with this, or have any feedback, hints or suggestions concerning running StarDict on a Mac, please email me - I'll help if I can, and share any information you can offer with our users.
▲ TopThe Dr.eye plugins available on this site have been produced by Inventec, the company that produces Dr.eye. They require that you have a fully installed and registered version of Dr.eye version 8.1 or newer in order to function. For further information please see the Dr.eye website.
▲ TopYou'll get an idea of how well your system will handle the scripts from observing how well it copes with the following:
正體 = Traditional Chinese
天城體 = Devanāgarī = देवनागरी
藏文字 = Tibetan script = bod yig = བོད༌ཡིག༌
If this is shown correctly on your system, you should have no problems using the resources available from this site. However, please read the notes below pertaining to your operating system, and if you have difficulties please email me.
Windows support for unicode and multiple non-Latin scripts is not very good (even under Vista - it is to be hoped that forthcoming versions of Windows will address this problem). The best choice right now is to use "Arial Unicode MS" if it's available to you (note: this font is under license to Microsoft, and is only permitted to be distributed with Microsoft software), and to set StarDict to use this font as it's default [instructions].
You should then have good support for Chinese (excepting rarer characters) and for text in Latin scripts (including romanized Indic languages). Newer versions of "Arial Unicode MS" have reasonable support for Devanāgarī too, although older ones will fail to render the ligatures correctly.
For text in the Tibetan script (currently only present in the Mahāvyutpatti), even the more recent versions of "Arial Unicode MS" are inadequate. I have therefore taken the step of 'hard-coding' such text to use the freely available "Tibetan Machine Uni" made available by the Tibetan & Himalayan Digital Library. You will therefore need to download and install this particular font, if you do not already have it, in order to see the Tibetan script in these StarDict dictionaries.
If you find you still have problems with the rendering of scripts in the display pane, please email me (preferably with a screenshot) and I'll find a way to make it work.
The Tibetan (and possibly the Devanāgarī) in the search pane, however, will still render with incorrect and ugly ligatures - there is nothing that can be done about this, unless a single font is available which will correctly (and attractively!) render Latin (including diacritical marks), CJK characters, Devanāgarī, and Tibetan script. (note: I have considered assembling such a font myself from the available open-source offerings - a kind of open-source Arial Unicode MS, but with improved support for Tibetan. If I ever do this, the font will almost certainly be made available from DDBC, here and elsewhere)
Finally, it should be noted that all of these problems are Windows-specific - there are no such issues on Linux or (so far as I know) Mac systems with appropriate fonts installed.
▲ TopIn order to provide support for Windows users, I have 'hard-coded' text in the Tibetan script (currently only present in the Mahāvyutpatti) to use the "Tibetan Machine Uni" font from the Tibetan & Himalayan Digital Library. This is not required on a Linux platform (which will simply select the most appropriate font available), but since this is almost certainly the font you will want to use anyway I deemed it unnecessary to remove this boot-strapping and produce a second version. It does mean, however, that you will have to install this specific font to view the words in Tibetan script. Packages are available for most distributions - users of Debian/Ubuntu (and derivatives) can simply `aptitude install ttf-tmuni` or install via Synaptic- or the font may be downloaded from the page linked above, and installed in the usual way for your distro.
If you work with Buddhist and Asian resources, you likely already have all the other font support you will need. If not, for Debian/Ubuntu users I can recommend the following packages: for Devanāgarī `aptitude install ttf-devanagari-fonts ttf-indic-fonts-core`; and for Chinese `aptitude install language-support-fonts-zh`. For other distros, please consult your documentation/forums, or email me for assistance.
▲ TopI understand that "Tibetan Machine Uni" is not available for the Mac. It is therefore unlikely that text in Tibetan script (currently only present in the Mahāvyutpatti) will render correctly on Mac systems. However, I don't have access to a modern Mac system to test or to properly develop an appropriate solution. If you can confirm whether this works or not, or if you know about using Unicode Tibetan script on a Mac and can offer suggestions or advice, please email me and I'll update the information here and produce new (perhaps Mac-specific) files as appropriate.
▲ TopThe DDBC Glossaries Project from Dharma Drum Institute of Liberal Arts (法鼓文理學院) is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. |