Update Home

Mauricio 2024-03-22 10:23:53 -06:00
parent a86d41913f
commit f8dc93d65b
1 changed files with 160 additions and 160 deletions

320
Home.md

@ -1,160 +1,160 @@
# ZAZ # ZAZ
[Leer en español](es.home) [Leer en español](es.home)
## Develop macros and extensions for LibreOffice with Python ## Develop macros and extensions for LibreOffice with Python
`zaz` it's a script Python for rapid develop macros in LibreOffice, with Python of course. `zaz` it's a script Python for rapid develop macros in LibreOffice, with Python of course.
With `zaz`, you can create: With `zaz`, you can create:
* Extensions for final user. * Extensions for final user.
* New components for used from Basic developers. * New components for used from Basic developers.
* AddIn, new functions for Calc. * AddIn, new functions for Calc.
## Requirements ## Requirements
* Python 3.7+ * Python 3.7+
* LibreOffice with support for macros Python * LibreOffice with support for macros Python
* LibreOffice SDK, for new components and AddIn * LibreOffice SDK, for new components and AddIn
* For ArchLinux * For ArchLinux
``` ```
sudo pacman -S libreoffice-fresh-sdk sudo pacman -S libreoffice-fresh-sdk
``` ```
## Installation ## Installation
* Clone this repository. * Clone this repository.
``` ```
git clone https://git.elmau.net/elmau/zaz.git git clone https://git.cuates.net/elmau/zaz.git
``` ```
## My first extension ## My first extension
* Enter folder `source`. * Enter folder `source`.
``` ```
cd zaz/source cd zaz/source
``` ```
* Make new extension. * Make new extension.
Replace `PATH` for your absolute path. Replace `PATH` for your absolute path.
``` ```
python zaz.py --new -t PATH -n my-great-extension python zaz.py --new -t PATH -n my-great-extension
``` ```
* For example: * For example:
``` ```
python zaz.py --new -t /home/mau/ -n my-extension python zaz.py --new -t /home/mau/ -n my-extension
07/11/2020 18:28:39 - INFO - Folders and files copy successfully for new extension. 07/11/2020 18:28:39 - INFO - Folders and files copy successfully for new extension.
07/11/2020 18:28:39 - INFO - Change to folder: /home/mau/my-extension 07/11/2020 18:28:39 - INFO - Change to folder: /home/mau/my-extension
``` ```
* Then change to new folder * Then change to new folder
``` ```
cd /home/mau/my-extension cd /home/mau/my-extension
``` ```
* Create * Create
``` ```
python zaz.py -c python zaz.py -c
07/11/2020 20:43:25 - INFO - Created directories... 07/11/2020 20:43:25 - INFO - Created directories...
07/11/2020 20:43:25 - INFO - Created files... 07/11/2020 20:43:25 - INFO - Created files...
07/11/2020 20:43:25 - INFO - Don't forget generate DOMAIN.pot for locales 07/11/2020 20:43:25 - INFO - Don't forget generate DOMAIN.pot for locales
07/11/2020 20:43:25 - INFO - New extension: MyFirstExtension make sucesfully... 07/11/2020 20:43:25 - INFO - New extension: MyFirstExtension make sucesfully...
Now, you can install and test: zaz.py -i Now, you can install and test: zaz.py -i
``` ```
* And install it * And install it
``` ```
python zaz.py -i python zaz.py -i
07/11/2020 20:43:38 - INFO - Don't forget generate DOMAIN.pot for locales 07/11/2020 20:43:38 - INFO - Don't forget generate DOMAIN.pot for locales
07/11/2020 20:43:38 - INFO - Compress OXT extension... 07/11/2020 20:43:38 - INFO - Compress OXT extension...
07/11/2020 20:43:38 - INFO - Extension OXT created sucesfully... 07/11/2020 20:43:38 - INFO - Extension OXT created sucesfully...
Copying: MyFirstExtension_v0.1.0.oxt Copying: MyFirstExtension_v0.1.0.oxt
unopkg done. unopkg done.
07/11/2020 20:43:40 - INFO - Install extension sucesfully... 07/11/2020 20:43:40 - INFO - Install extension sucesfully...
07/11/2020 20:43:40 - INFO - Start LibreOffice... 07/11/2020 20:43:40 - INFO - Start LibreOffice...
07/11/2020 20:44:36 - INFO - Extension make successfully... 07/11/2020 20:44:36 - INFO - Extension make successfully...
``` ```
## File conf.py ## File conf.py
Only modify this options. Only modify this options.
**Configure correctly this options in this file, before you create your new extension.** **Configure correctly this options in this file, before you create your new extension.**
### Type extension ### Type extension
`TYPE_EXTENSION` `TYPE_EXTENSION`
It's important select correctly this option. It's important select correctly this option.
* Integer * Integer
* 1 = Normal extension * 1 = Normal extension
* 2 = New components * 2 = New components
* 3 = Calc addin * 3 = Calc addin
Example: Example:
```python ```python
TYPE_EXTENSION = 1 TYPE_EXTENSION = 1
``` ```
### Name ### Name
Your extension name, not used spaces. Your extension name, not used spaces.
`NAME` `NAME`
* String * String
Example: Example:
```python ```python
NAME = 'MyExtension' NAME = 'MyExtension'
``` ```
### Version ### Version
`VERSION` `VERSION`
* String * String
* Version for extension, look: [https://semver.org/](https://semver.org/) * Version for extension, look: [https://semver.org/](https://semver.org/)
Example: Example:
```python ```python
VERSION = '0.1.0' VERSION = '0.1.0'
``` ```
### ID extension ### ID extension
Internal name for your extension. Internal name for your extension.
`ID` `ID`
* String * String
* Should be unique, used URL inverse * Should be unique, used URL inverse
Example: Example:
```python ```python
ID = 'org.yourname.extensionname' ID = 'org.yourname.extensionname'
``` ```
## Library easymacro.py ## Library easymacro.py
[Documentation for `easymacro.py`](easymacro) [Documentation for `easymacro.py`](easymacro)
[Leer en español](es.home) [Leer en español](es.home)