author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 03 Mar 2019 21:57:19 +0200 | |
changeset 1117 | 87e4b3726f16 |
parent 337 | 33b08a8b7fb1 |
permissions | -rw-r--r-- |
243
deede3c3386f
Add coding to RST files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
242
diff
changeset
|
1 |
.. -*- coding: utf-8 -*- |
206
407f2a82ef26
Include common header for quick links. Exclude unnecessary .html files from build.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
2 |
|
43
b75220c0eef6
Register gadict dictionaries for dictd under Debian.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
======================= |
b75220c0eef6
Register gadict dictionaries for dictd under Debian.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
gadict HACKING guide. |
b75220c0eef6
Register gadict dictionaries for dictd under Debian.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
======================= |
69 | 6 |
.. contents:: |
301
1439e072640a
Remove CSS hack that suppress displaying document name in TOC by
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
252
diff
changeset
|
7 |
:local: |
1439e072640a
Remove CSS hack that suppress displaying document name in TOC by
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
252
diff
changeset
|
8 |
|
233
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
9 |
Dictionary source file format. |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
10 |
============================== |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
11 |
|
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
12 |
For source file format used dictd C5 file format. See:: |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
13 |
|
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
14 |
$ man 1 dictfmt |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
15 |
|
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
16 |
Shortly: |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
17 |
|
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
18 |
* Headwords was preceded by 5 or more underscore characters ``_`` and a blank |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
19 |
line. |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
20 |
* All text until the next headword is considered the definition. |
337
33b08a8b7fb1
About my c5 dictionary format usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
301
diff
changeset
|
21 |
* Any leading ``@`` characters are stripped out, but the file is otherwise |
33b08a8b7fb1
About my c5 dictionary format usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
301
diff
changeset
|
22 |
unchanged. |
233
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
23 |
|
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
24 |
For convenience also used such assumptions: |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
25 |
|
337
33b08a8b7fb1
About my c5 dictionary format usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
301
diff
changeset
|
26 |
* Headwords was separated by ``;<SPACE>`` (and all was placed on single line). |
233
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
27 |
* UTF-8 encoding was used. |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
28 |
* Lines started with ``#`` striped out (comment syntax). |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
29 |
* First line with ``ABOUT:`` used as description of dictionary. |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
30 |
* First URL (line with ``http://``) used as dictionary home page. |
d3670cd252ce
Move info about dict format to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
31 |
|
46
86c0184efac7
Comment syntax convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
32 |
Comment syntax convention. |
69 | 33 |
========================== |
46
86c0184efac7
Comment syntax convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
34 |
|
337
33b08a8b7fb1
About my c5 dictionary format usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
301
diff
changeset
|
35 |
As 'dictd -c5' format does not support comment syntax we filter out all lines |
33b08a8b7fb1
About my c5 dictionary format usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
301
diff
changeset
|
36 |
that start with '#'. |
249 | 37 |
|
252
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
38 |
Dictionary file name convention. |
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
39 |
================================ |
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
40 |
|
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
41 |
BNF form:: |
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
42 |
|
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
43 |
FILE ::= PREFIX "-" NAME "-" LANG ".dict-c5" |
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
44 |
PREFIX ::= "gadict" |
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
45 |
LANG ::= ISOCODE | ISOCODE "-" ISOCODE |
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
46 |
|
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
47 |
where ``ISOCODE`` is ISO 639-1 language (2 letter) code, currently ``en``, |
7aac5f9dcf06
Dictionary file name convention.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
48 |
``ru``, ``uk`` in use, ``NAME`` is dictionary abbreviated name. |