]> git.pld-linux.org Git - packages/dict-mueller7acc.git/blame - to-dict
3c1b69c290fb4c06bf3456baf5bf8b97 to-dict
[packages/dict-mueller7acc.git] / to-dict
CommitLineData
feb0369e 1#!/bin/sh
2# A shell script for conversion of MOVA MuellerXX.koi dictionaries
3# into DICT format.
4# Written by Andrew Comech <comech@math.sunysb.edu>
5# GNU GPL (2000)
6# The latest version is available from
7# http://www.math.sunysb.edu/~comech/tools/to-dict
8
9version="0.1"
10versiondate="November 11, 2000"
11
12# We need the following binaries:
13DICTFMT=`which dictfmt`
14DICTZIP=`which dictzip`
15
16INFO () {
17 echo "
18to-dict, version $version ($versiondate).
19Conversion of MOVA MuellerXX.koi dictionaries into DICT format.
20Written by Andrew Comech <comech@math.sunysb.edu>. GNU GPL (2000)
21
22The latest version is available from
23http://www.math.sunysb.edu/~comech/tools/to-dict
24"
25}
26
27REQUIREMENTS () {
28 echo "
29REQUIREMENTS: you need the binaries \`dictfmt' and \`dictzip'.
30
31dictzip.c can be found in dictd-1.5.0.tar.gz (or later version) at
32ftp://ftp.cs.unc.edu/pub/users/faith/dict/
33
34dictfmt.c can be found in Debian/GNU Linux package dict-elements at
35ftp://ftp.debian.org/debian/dists/potato/main/source/text/
36
37Compiled binaries (dictfmt and dictzip) could be downloaded from
38http://www.wh9.tu-dresden.de/~heinrich/dict/dict_leo_ftp/static-binaries/
39or
40http://iris.ltas.ulg.ac.be/download/apps/dict/
41"
42}
43
44USAGE () {
45 echo "
46USAGE:
47 -version: show version
48 -h, --help, or no parameters: show this help
49
50(*) To make DICT database from Mueller7GPL.koi available from
51http://www.chat.ru/~mueller_dic/Mueller7GPL.tgz
52
53# Remove transcription:
54./to-dict --no-trans Mueller7GPL.koi mueller7.notr
55# Convert <source> into <data> (a file with %h, %d-headers):
56./to-dict --src-data mueller7.notr mueller7.data && rm -i mueller7.notr
57# Convert <data> into DICT-format (files <name>.dict.dz and <name>.index):
58./to-dict --data-dict mueller7.data mueller7 && rm -i mueller7.data
59# Expand index file (to be able to access lines like \"A, a\" by \"A\" and \"a\"):
60./to-dict --expand-index mueller7.index mueller7.index.exp
61# Install a new dictionary with expanded index (RUN AS ROOT).
62# The location of files may depend on your distribution!!!
63cp mueller7.dict.dz /usr/share/dictd/mueller7.dict.dz
64cp mueller7.index.exp /usr/share/dictd/mueller7.index
65dictdconfig -w && (killall dictd; dictd)
66
67(*) To make DICT database from Mueller24.koi available from
68http://www.chat.ru/~mueller_dic/Mueller24.tgz (this one is preferred)
69
70# Convert <source> into <data> (a file with %h, %d):
71./to-dict --src-data Mueller24.koi mueller24.data
72# Convert <data> into DICT-format (files <name>.dict.dz and <name>.index):
73./to-dict --data-dict mueller24.data mueller24 && rm -i mueller24.data
74# Install a new dictionary with expanded index (RUN AS ROOT).
75# The location of files may depend on your distribution!!!
76cp mueller24.dict.dz /usr/share/dictd/mueller24.dict.dz
77cp mueller24.index /usr/share/dictd/mueller24.index
78dictdconfig -w && (killall dictd; dictd)
79
80(*) To re-convert <dict> into <data> (a file with %h, %d-headers):
81
82./to-dict --dict-data <dict> <data>
83
84 *************************************************************
85 !!WARNING!! !!WARNING!! !!WARNING!! !!WARNING!!
86
87 Temporary files created by this script occupy a lot of drive space!
88 15 MB for Mueller7GPL.koi (have to strip off transcription first)
89 12 MB for Mueller24.koi
90 *************************************************************
91"
92}
93
94# To remove the transcription except for [r] and [ju:] which found in the text.
95# This procedure should not change Mueller24.koi if applied to it.
96NO_TRANS () {
97