File: build.md

package info (click to toggle)
grammalecte 2.1.2%2Bds2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 70,196 kB
  • sloc: python: 17,988; javascript: 9,417; java: 4,716; xml: 144; makefile: 28; sh: 11
file content (90 lines) | stat: -rw-r--r-- 1,750 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Building Grammalecte

# How to build Grammalecte

## Required ##

For building:

* Python 3.7+ > [download](https://www.python.org/)
* NodeJS (LTS version) > [download](https://nodejs.org/)
  * npm (should be installed with NodeJS)
  * web-ext > [instructions](https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/)

For testing:

* Firefox Developer > [download](https://www.mozilla.org/en-US/firefox/developer/)
* Thunderbird > [download](https://www.thunderbird.net/)


## Commands ##

**Build a language**

    make.py LANG

> Generate the LibreOffice extension and the package folder.
> LANG is the lang code (ISO 639).
> This script uses the file `config.ini` in the folder `gc_lang/LANG`.

**First build**

    make.py LANG -js

> This command is required to generate all necessary files.

**Options**

`-b --build_data`

> Launch the script `build_data.py` in the folder `gc_lang/LANG`.

`-d --dict`

> Generate the indexable binary dictionary from the lexicon in the folder `lexicons`.

`-js --javascript`

> Also generate JavaScript extensions.
> Without this option, only Python modules, data and extensions are generated.

`-t --tests`

> Run unit tests.

`-i --install`

> Install the LibreOffice extension.

`-fx --firefox`

> Launch Firefox Developper.
> Unit tests can be launched from the menu (Tests section).

`-fxn --firefox_nightly`

> Launch Firefox Nightly.
> Unit tests can be launched from the menu (Tests section).

`-tb --thunderbird`

> Launch Thunderbird.


## Examples ##

Full rebuild:

    make.py LANG -b -d -js

After modifying grammar rules:

    make.py LANG -t

If you modify the lexicon:

    make.py LANG -d -js

If you modify your script `build_data.py`:

    make.py LANG -b -js