HACKING.rst
changeset 339 4d8d46bbe30d
parent 338 61a9d2de0e3e
child 340 d57bcb08e80c
equal deleted inserted replaced
338:61a9d2de0e3e 339:4d8d46bbe30d
     1 .. -*- coding: utf-8 -*-
       
     2 .. include:: header.rst
       
     3 
       
     4 =======================
       
     5  gadict HACKING guide.
       
     6 =======================
       
     7 .. contents::
       
     8    :local:
       
     9 
       
    10 
       
    11 Document version.
       
    12 =================
       
    13 
       
    14 .. include:: VERSION.rst
       
    15 
       
    16 Versioning rules.
       
    17 =================
       
    18 
       
    19 We use **major.minor** schema.
       
    20 
       
    21 Until we reach 5000 words **major** is 0. **minor** updated from time to time.
       
    22 
       
    23 Getting sources (VCS).
       
    24 ======================
       
    25 
       
    26 Cloning repository::
       
    27 
       
    28   $ hg clone http://hg.defun.work/gadict gadict
       
    29   $ hg clone http://hg.code.sf.net/p/gadict/code gadict-hg
       
    30 
       
    31 Pushing changes::
       
    32 
       
    33   $ hg push ssh://$USER@hg.defun.work/gadict
       
    34   $ hg push ssh://$USER@hg.code.sf.net/p/gadict/code
       
    35   $ hg push https://$USER:$PASS@hg.code.sf.net/p/gadict/code
       
    36 
       
    37 Browsing sources.
       
    38 =================
       
    39 
       
    40   http://hg.defun.work/gadict
       
    41     hgweb at home page.
       
    42   http://hg.code.sf.net/p/gadict/code
       
    43     hgweb at old home page (but supported as mirror).
       
    44   https://sourceforge.net/p/gadict/code/
       
    45     Sourceforge Allure interface (not primary, a mirror).
       
    46 
       
    47 Dictionary source file format.
       
    48 ==============================
       
    49 
       
    50 For source file format used dictd C5 file format. See::
       
    51 
       
    52   $ man 1 dictfmt
       
    53 
       
    54 Shortly:
       
    55 
       
    56  * Headwords was preceded by 5 or more underscore characters ``_`` and a blank
       
    57    line.
       
    58  * All text until the next headword is considered the definition.
       
    59  * Any leading ``@`` characters are stripped out, but the file is otherwise
       
    60    unchanged.
       
    61 
       
    62 For convenience also used such assumptions:
       
    63 
       
    64  * Headwords was separated by ``;<SPACE>`` (and all was placed on single line).
       
    65  * UTF-8 encoding was used.
       
    66  * Lines started with ``#`` striped out (comment syntax).
       
    67  * First line with ``ABOUT:`` used as description of dictionary.
       
    68  * First URL (line with ``http://``) used as dictionary home page.
       
    69 
       
    70 Comment syntax convention.
       
    71 ==========================
       
    72 
       
    73 As 'dictd -c5' format does not support comment syntax we filter out all
       
    74 lines that start with '#'.
       
    75 
       
    76 TODO convention.
       
    77 ================
       
    78 
       
    79 Entries or parts of text that was not completed marked by keywords:
       
    80 
       
    81   TODO
       
    82                 incomplete
       
    83   XXX
       
    84                 urgent incomplete
       
    85 
       
    86 Makefile rules ``todo`` find this occurrence in sources::
       
    87 
       
    88   $ make todo
       
    89 
       
    90 Dictionary file name convention.
       
    91 ================================
       
    92 
       
    93 BNF form::
       
    94 
       
    95   FILE ::= PREFIX "-" NAME "-" LANG ".dict-c5"
       
    96   PREFIX ::= "gadict"
       
    97   LANG ::= ISOCODE | ISOCODE "-" ISOCODE
       
    98 
       
    99 where ``ISOCODE`` is ISO 639-1 language (2 letter) code, currently ``en``,
       
   100 ``ru``, ``uk`` in use, ``NAME`` is dictionary abbreviated name.
       
   101 
       
   102 World wide dictionary formats and standards.
       
   103 ============================================
       
   104 
       
   105   http://en.wikipedia.org/wiki/Dictionary_writing_system
       
   106                 Dictionary writing system
       
   107   http://www.sil.org/computing/shoebox/mdf.html
       
   108                 Multi-Dictionary Formatter (MDF). It defines about 100 data
       
   109                 field markers.
       
   110   http://fieldworks.sil.org/flex/
       
   111                 FieldWorks Language Explorer (or FLEx, for short) is designed
       
   112                 to help field linguists perform many common language
       
   113                 documentation and analysis tasks.
       
   114   http://code.google.com/p/lift-standard/
       
   115                 LIFT (Lexicon Interchange FormaT) is an XML format for storing
       
   116                 lexical information, as used in the creation of dictionaries.
       
   117                 It's not necessarily the format for your lexicon.
       
   118   http://www.lexiquepro.com/
       
   119                 Lexique Pro is an interactive lexicon viewer and editor, with
       
   120                 hyperlinks between entries, category views, dictionary
       
   121                 reversal, search, and export tools. It's designed to display
       
   122                 your data in a user-friendly format so you can distribute it
       
   123                 to others.
       
   124   http://deb.fi.muni.cz/index.php
       
   125                 DEBII — Dictionary Editor and Browser
       
   126 
       
   127 Register gadict dictionaries for dictd under Debian.
       
   128 ====================================================
       
   129 ::
       
   130 
       
   131   $ su
       
   132   $ cat >>etc/dictd/dictd.order <<EOF
       
   133   gadict-dictabbr
       
   134   /home/user/usr/share/dictd/
       
   135   $ dictdconfig --write
       
   136   $ /etc/init.d/dictd restart
       
   137   $ ^D
       
   138   $ dictdconfig --list
       
   139   $ dict -d gadict-dictabbr v
       
   140 
       
   141 Typing IPA chars in Emacs.
       
   142 ==========================
       
   143 
       
   144 For entering IPA chars use IPA input method. To enable it type::
       
   145 
       
   146   C-u C-\ ipa <enter>
       
   147 
       
   148 All chars from alphabet typed as usual. To type special IPA chars use next key
       
   149 bindings (or read help in Emacs by ``M-x describe-input-method`` or ``C-h I``).
       
   150 
       
   151 For vowel::
       
   152 
       
   153   æ  ae
       
   154   ɑ  o| or A
       
   155   ɒ  |o  or /A
       
   156   ʊ  U
       
   157   ɛ  /3 or E
       
   158   ɔ  /c
       
   159   ə  /e
       
   160   ʌ  /v
       
   161   ɪ  I
       
   162 
       
   163 For consonant::
       
   164 
       
   165   θ  th
       
   166   ð  dh
       
   167   ʃ  sh
       
   168   ʧ  tsh
       
   169   ʒ  zh or 3
       
   170   ŋ  ng
       
   171   ɡ  g
       
   172   ɹ  /r
       
   173 
       
   174 Special chars::
       
   175 
       
   176   ː  : (semicolon)
       
   177   ˈ  ' (quote)
       
   178   ˌ  ` (back quote)
       
   179 
       
   180 Alternatively use ``ipa-x-sampa`` or ``ipa-kirshenbaum`` input method (for help
       
   181 type: ``C-h I ipa-x-sampa RET`` or ``C-h I ipa-kirshenbaum RET``).
       
   182