EazyTranslator 0.98a - Stream editor to use and to manage dictionary files Requires 'basename', 'grep' and 'sed', optionally 'sort' and 'mktemp' in PATH Copyright (C) 2001 Thomas Lahn (webmaster@PointedEars.de) Be sure to have 'easyTrans' or similar in mail subject line for fast response. This program is free software; 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. You should have received a copy of the GNU General Public License along with this program (COPYING file); if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. EazyTranslator 0.98a - Stream editor to use and to manage dictionary files Requires 'basename', 'grep' and 'sed', optionally 'sort' and 'mktemp' in PATH translate EXPRESSION DICTIONARY [OPTIONS] Tries to translate EXPRESSION looking up DICTIONARY and writes the result to standard output (stdout) in a single line followed by a newline (\n). Environment: TRANSLATE_DIR Dictionary folder root (absolute path '/') If undefined, this is the program directory (currently 'latest'). TRANSLATE_OPTIONS Default options to overwrite command-line options Arguments: EXPRESSION Word or (double-quoted) phrase to be translated DICTIONARY Path of dictionary file relative to TRANSLATE_DIR Translation OPTIONS: -b, --brackets If not in DICTIONARY, writes given WORD or EXPRESSION as [WORD] or [EXPRESSION]. -m, --messages Return error messages instead of null-strings. -p, --phrase Translate EXPRESSION as entire phrase. If not given, each WORD of EXPRESSION is translated seperately. -r, --reverse Perform reverse translation. Recommended only if no appropriate dictionary file for vice-versa translation is available and -p is also used. -s, --sound Beep on fatal errors. -v, --verbose Display flow of operation. Includes -m behavior. -z, --zero Return not translatable tokens as null-strings. Overwrites -b. translate EXPRESSION DICTIONARY COMMAND TRANSLATION [INFO] [OPTIONS] translate COMMAND DICTIONARY [INFO] [OPTIONS] Dictionary file COMMANDs: -a, --add If not in DICTIONARY, add EXPRESSION with TRANSLATION to DICTIONARY and write TRANSLATION. If DICTIONARY does not exist, create the file with INFO and add the entry; if INFO is a null-string, default INFO is added, containing program version, user name and timestamp. Requires 'sort'. -ai, --addinfo Add information data INFO to DICTIONARY. Must be used as first argument. -c, --create Create new DICTIONARY with INFO (see -a). Existing files are replaced. Must be used as first argument. -d, --delete If used with EXPRESSION and DICTIONARY, remove EXPRESSION from DICTIONARY instead of translating. If used as first argument, delete DICTIONARY. -i, --info Display information about DICTIONARY. Must be used as first argument. -o, --overwrite Like -a but overwrite a contained translation of EXPRESSION with TRANSLATION without question. Additionally requires `mktemp'. -R, --repair Repair DICTIONARY instead of translating. Requires `mktemp'. Info data is kept but invalid entries are removed. USE WITH CAUTION! -s, --sort Sort DICTIONARY instead of translating. Requires `sort'. Includes --sound when used with -v. Must be used as first argument. translate OPTION [OPTION] Help page OPTIONs: --1 Display help on one page (without `clear' and user input). Useful with redirection (try `translate --1 --help > translate.doc.txt'). Must be given before all other help page options. --a, --about Display information about the program. --c, --cmd Display this help page. --d, --dict Display help about dictionary files. --dev, --emp Display special information for developers and employers. --x, --example Display example. -h, --help Display all help pages. EazyTranslator 0.98a - Stream editor to use and to manage dictionary files Requires 'basename', 'grep' and 'sed', optionally 'sort' and 'mktemp' in PATH EXAMPLE: If you would like to translate the English words 'a few' into German, translate 'a few' en-de should write the German words ein(e) wenig(e) (without indent) to stdout if the dictionary file 'en-de' contains a correct entry for it (see next page). You may also translate it as entire phrase (which seems to make more sense here): translate 'a few' en-de -p should instead write the German word `einige'. EazyTranslator 0.98a - Stream editor to use and to manage dictionary files Requires 'basename', 'grep' and 'sed', optionally 'sort' and 'mktemp' in PATH DICTIONARY FILES: You may create/improve dictionary files to be used with EazyTranslator of your own. Translation data must match the following expression: #:File description displayed when option -i is used\n[#:File description\n] [Expression:translation\n[Next expression:next translation\n]] Last expression:last translation\z Parts enclosed in rectangle brackets are optional. The colon (:) is to be used as delimiter character between original and translated expression only. Dictionary file names should contain common language identifiers separated by a dash (such as `en-de.dic' for an English-German dictionary file). Program updates and dictionaries can be obtained from 'http://pointedears.de/tools/languages/eazyrans/'. Thank you for using a program by PointedEars. EazyTranslator 0.98a - Stream editor to use and to manage dictionary files Requires 'basename', 'grep' and 'sed', optionally 'sort' and 'mktemp' in PATH Copyright (C) 2001 Thomas Lahn (webmaster@PointedEars.de) Be sure to have 'easyTrans' or similar in mail subject line for fast response. INFORMATION FOR DEVELOPERS (KNOWN ISSUES)... - Sorting the dictionary unfortunately also sorts its info data by now. ...AND FOR EMPLOYERS: BTW, if you have an idea for improving EasyTranslator or for another (field of) application you want me to develop for you (BASIC, DOS batch, Windows INF, Visual Basic, (ba)sh, Pascal, Delphi, C, (X)(HT)ML, CSS, JavaScript, PHP, Perl and I am still learning other languages) feel free to mail me, too. THNX! -- PointedEars, 2003-05-20