zaz/doc/source/main/config.rst

143 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2021-02-05 22:38:46 -06:00
Configuration
=============
* Create new extension:
``./zaz.py -new -t ~/projects -n MyGreatExtension``
* Move to new folder:
``cd ~/projects/MyGreatExtension``
* Edit file ``conf.py``
``vim conf.py``
Parameters
----------
**Configure correctly this options, before you start code your extension.**
Only modify this options.
2021-02-05 22:46:31 -06:00
Type extension
^^^^^^^^^^^^^^
**TYPE_EXTENSION**
2021-02-05 22:52:33 -06:00
The type extension that you want develop.
2021-02-05 22:46:31 -06:00
* Integer
* 1 = Normal extension
* 2 = New components
* 3 = Calc addin
Example:
.. code-block:: python
TYPE_EXTENSION = 1
2021-02-05 22:52:33 -06:00
2021-02-05 22:56:36 -06:00
Version
^^^^^^^
2021-02-05 22:52:33 -06:00
**VERSION**
* String
2021-02-05 22:56:36 -06:00
* The current version of extension, look: `Semantic Versioning`_
2021-02-05 22:52:33 -06:00
Example:
.. code-block:: python
VERSION = '0.1.0'
2021-02-05 22:56:36 -06:00
Name
^^^^
**NAME**
* String
* Your extension name, not used spaces.
Example:
.. code-block:: python
NAME = 'MyGreatExtension'
2021-02-05 22:59:39 -06:00
ID extension
^^^^^^^^^^^^
The internal name for extension.
**ID**
* String
* Should be unique, used URL inverse
Example:
.. code-block:: python
ID = 'org.yourname.extensionname'
2021-02-05 22:56:36 -06:00
2021-02-06 21:20:00 -06:00
Locales
^^^^^^^
If your extension will be multi-language (recommended)
**USE_LOCALES**
* Bool
Example:
.. code-block:: python
USE_LOCALES = True
Domain for locales
^^^^^^^^^^^^^^^^^^
The base name for generate files POT
**DOMAIN**
* String
Example:
.. code-block:: python
DOMAIN = 'base'
Path pyGetText
^^^^^^^^^^^^^^
Absolute path for tool `pygettext.py` for generate POT.
**PATH_PYGETTEXT**
* String
Example:
.. code-block:: python
PATH_PYGETTEXT = '/usr/lib/python3.9/Tools/i18n/pygettext.py'
2021-02-05 22:52:33 -06:00
.. _Semantic Versioning: https://semver.org/