diff --git a/.gitignore b/.gitignore
index c1981af..df59ba0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,6 @@ __pycache__/
conf.py
files/
-doc/build
source/source/
# Virtualenv
diff --git a/doc/build/.buildinfo b/doc/build/.buildinfo
new file mode 100644
index 0000000..9ff6a59
--- /dev/null
+++ b/doc/build/.buildinfo
@@ -0,0 +1,4 @@
+# Sphinx build info version 1
+# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
+config: 9dc485243b09862a9e5c34c02e1c395f
+tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/doc/build/.doctrees/environment.pickle b/doc/build/.doctrees/environment.pickle
new file mode 100644
index 0000000..850dbea
Binary files /dev/null and b/doc/build/.doctrees/environment.pickle differ
diff --git a/doc/build/.doctrees/es/index.doctree b/doc/build/.doctrees/es/index.doctree
new file mode 100644
index 0000000..0c40222
Binary files /dev/null and b/doc/build/.doctrees/es/index.doctree differ
diff --git a/doc/build/.doctrees/index.doctree b/doc/build/.doctrees/index.doctree
new file mode 100644
index 0000000..562d078
Binary files /dev/null and b/doc/build/.doctrees/index.doctree differ
diff --git a/doc/build/.doctrees/main/01_tools.doctree b/doc/build/.doctrees/main/01_tools.doctree
new file mode 100644
index 0000000..e184bd4
Binary files /dev/null and b/doc/build/.doctrees/main/01_tools.doctree differ
diff --git a/doc/build/.doctrees/main/02_tools.doctree b/doc/build/.doctrees/main/02_tools.doctree
new file mode 100644
index 0000000..6fed627
Binary files /dev/null and b/doc/build/.doctrees/main/02_tools.doctree differ
diff --git a/doc/build/.doctrees/main/application.doctree b/doc/build/.doctrees/main/application.doctree
new file mode 100644
index 0000000..19e8a01
Binary files /dev/null and b/doc/build/.doctrees/main/application.doctree differ
diff --git a/doc/build/.doctrees/main/base.doctree b/doc/build/.doctrees/main/base.doctree
new file mode 100644
index 0000000..b516107
Binary files /dev/null and b/doc/build/.doctrees/main/base.doctree differ
diff --git a/doc/build/.doctrees/main/calc.doctree b/doc/build/.doctrees/main/calc.doctree
new file mode 100644
index 0000000..f053fb6
Binary files /dev/null and b/doc/build/.doctrees/main/calc.doctree differ
diff --git a/doc/build/.doctrees/main/config.doctree b/doc/build/.doctrees/main/config.doctree
new file mode 100644
index 0000000..259ed18
Binary files /dev/null and b/doc/build/.doctrees/main/config.doctree differ
diff --git a/doc/build/.doctrees/main/easymacro.doctree b/doc/build/.doctrees/main/easymacro.doctree
new file mode 100644
index 0000000..0d9a915
Binary files /dev/null and b/doc/build/.doctrees/main/easymacro.doctree differ
diff --git a/doc/build/.doctrees/main/email.doctree b/doc/build/.doctrees/main/email.doctree
new file mode 100644
index 0000000..a1d6139
Binary files /dev/null and b/doc/build/.doctrees/main/email.doctree differ
diff --git a/doc/build/.doctrees/main/examples.doctree b/doc/build/.doctrees/main/examples.doctree
new file mode 100644
index 0000000..c6ce785
Binary files /dev/null and b/doc/build/.doctrees/main/examples.doctree differ
diff --git a/doc/build/.doctrees/main/examples_app.doctree b/doc/build/.doctrees/main/examples_app.doctree
new file mode 100644
index 0000000..0897d5d
Binary files /dev/null and b/doc/build/.doctrees/main/examples_app.doctree differ
diff --git a/doc/build/.doctrees/main/examples_base.doctree b/doc/build/.doctrees/main/examples_base.doctree
new file mode 100644
index 0000000..301adeb
Binary files /dev/null and b/doc/build/.doctrees/main/examples_base.doctree differ
diff --git a/doc/build/.doctrees/main/examples_calc.doctree b/doc/build/.doctrees/main/examples_calc.doctree
new file mode 100644
index 0000000..0e32a1a
Binary files /dev/null and b/doc/build/.doctrees/main/examples_calc.doctree differ
diff --git a/doc/build/.doctrees/main/examples_draw.doctree b/doc/build/.doctrees/main/examples_draw.doctree
new file mode 100644
index 0000000..4ef061f
Binary files /dev/null and b/doc/build/.doctrees/main/examples_draw.doctree differ
diff --git a/doc/build/.doctrees/main/examples_writer.doctree b/doc/build/.doctrees/main/examples_writer.doctree
new file mode 100644
index 0000000..d931dce
Binary files /dev/null and b/doc/build/.doctrees/main/examples_writer.doctree differ
diff --git a/doc/build/.doctrees/main/intro.doctree b/doc/build/.doctrees/main/intro.doctree
new file mode 100644
index 0000000..b89a8ee
Binary files /dev/null and b/doc/build/.doctrees/main/intro.doctree differ
diff --git a/doc/build/.doctrees/main/path.doctree b/doc/build/.doctrees/main/path.doctree
new file mode 100644
index 0000000..df4b521
Binary files /dev/null and b/doc/build/.doctrees/main/path.doctree differ
diff --git a/doc/build/.doctrees/main/paths.doctree b/doc/build/.doctrees/main/paths.doctree
new file mode 100644
index 0000000..16afe8b
Binary files /dev/null and b/doc/build/.doctrees/main/paths.doctree differ
diff --git a/doc/build/.doctrees/main/tools.doctree b/doc/build/.doctrees/main/tools.doctree
new file mode 100644
index 0000000..24aae88
Binary files /dev/null and b/doc/build/.doctrees/main/tools.doctree differ
diff --git a/doc/build/.doctrees/main/tools_for_debug.doctree b/doc/build/.doctrees/main/tools_for_debug.doctree
new file mode 100644
index 0000000..17e1665
Binary files /dev/null and b/doc/build/.doctrees/main/tools_for_debug.doctree differ
diff --git a/doc/build/.doctrees/main/writer.doctree b/doc/build/.doctrees/main/writer.doctree
new file mode 100644
index 0000000..c1e0938
Binary files /dev/null and b/doc/build/.doctrees/main/writer.doctree differ
diff --git a/doc/build/_sources/index.rst.txt b/doc/build/_sources/index.rst.txt
new file mode 100644
index 0000000..354b990
--- /dev/null
+++ b/doc/build/_sources/index.rst.txt
@@ -0,0 +1,24 @@
+.. ZAZ documentation master file, created by
+ sphinx-quickstart on Thu Feb 4 22:28:30 2021.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Welcome to ZAZ's documentation!
+===============================
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Contents:
+
+ main/intro
+ main/config
+ main/easymacro
+ main/examples
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/doc/build/_sources/main/application.rst.txt b/doc/build/_sources/main/application.rst.txt
new file mode 100644
index 0000000..8e20fd2
--- /dev/null
+++ b/doc/build/_sources/main/application.rst.txt
@@ -0,0 +1,158 @@
+
+Application
+-----------
+
+Remember, always import library.
+
+.. code-block:: python
+
+ import easymacro as app
+
+
+Create instances
+^^^^^^^^^^^^^^^^
+
+* Instances without context
+
+.. code-block:: python
+
+ toolkit = app.create_instance("com.sun.star.awt.Toolkit")
+
+* Instances with context
+
+.. code-block:: python
+
+ service = 'com.sun.star.awt.DialogProvider2'
+ dialog = app.create_instance(service, True)
+
+
+* Get desktop
+
+.. code-block:: python
+
+ desktop1 = app.create_instance('com.sun.star.frame.Desktop', True)
+ # ~ or
+ desktop2 = app.get_desktop()
+
+ app.msgbox(desktop1 == desktop2)
+
+
+Current doc
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.title)
+
+
+Iter docs
+^^^^^^^^^
+
+.. code-block:: python
+
+ for doc in app.docs:
+ app.msgbox(doc.title)
+
+
+Count
+^^^^^
+
+.. code-block:: python
+
+ count = len(app.docs)
+ app.msgbox(count)
+
+
+Get by name
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ name = 'MyDoc.ods'
+ if name in app.docs:
+ doc = app.docs[name]
+ app.msgbox(doc.title)
+
+
+New
+^^^
+
+For default create new Calc document.
+
+.. code-block:: python
+
+ doc = app.docs.new()
+ app.msgbox(doc.type)
+
+
+For new Writer document.
+
+.. code-block:: python
+
+ doc = app.docs.new('writer')
+ app.msgbox(doc.type)
+
+
+With arguments.
+
+.. code-block:: python
+
+ args= {'Hidden': True}
+ doc = app.docs.new('writer', args)
+ msg = f'{doc.type} - {doc.title}'
+ app.msgbox(msg)
+ doc.visible = True
+
+
+Other documents.
+
+.. code-block:: python
+
+ doc = app.docs.new('draw')
+ app.msgbox(doc.type)
+
+ doc = app.docs.new('impress')
+ app.msgbox(doc.type)
+
+
+Open
+^^^^
+
+.. code-block:: python
+
+ path = '/home/mau/MyDoc.ods'
+ doc = app.docs.open(path)
+
+
+While LibreOffice support format, you can open arbitrary file.
+
+.. code-block:: python
+
+ path = '/home/mau/example.xlsx'
+ doc = app.docs.open(path)
+
+
+With arguments.
+
+.. code-block:: python
+
+ path = '/home/mau/example.odt'
+ args = {'Password': 'letmein'}
+ doc = app.docs.open(path, args)
+
+
+Call dispatch
+^^^^^^^^^^^^^
+
+You can call any `dispatch command`_ used only if property or method no exists in original object or in `easymacro.py`
+
+.. code-block:: python
+
+ doc = app.active
+ command = '.uno:Gallery'
+ app.call_dispatch(doc, command)
+
+
+
+.. _dispatch command: https://wiki.documentfoundation.org/Development/DispatchCommands
diff --git a/doc/build/_sources/main/base.rst.txt b/doc/build/_sources/main/base.rst.txt
new file mode 100644
index 0000000..1ac826a
--- /dev/null
+++ b/doc/build/_sources/main/base.rst.txt
@@ -0,0 +1,20 @@
+
+Base
+----
+
+Remember, always import library.
+
+.. code-block:: python
+
+ import easymacro as app
+
+
+New database
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = '/home/mau/db.odb'
+ db = app.doc.connect(path)
+ app.msgbox(db.type)
+
diff --git a/doc/build/_sources/main/calc.rst.txt b/doc/build/_sources/main/calc.rst.txt
new file mode 100644
index 0000000..b6ce700
--- /dev/null
+++ b/doc/build/_sources/main/calc.rst.txt
@@ -0,0 +1,27 @@
+
+Calc
+----
+
+Remember, always import library.
+
+.. code-block:: python
+
+ import easymacro as app
+
+
+Current doc
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.type)
+
+
+Active sheet
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.name)
diff --git a/doc/build/_sources/main/config.rst.txt b/doc/build/_sources/main/config.rst.txt
new file mode 100644
index 0000000..3f3ce97
--- /dev/null
+++ b/doc/build/_sources/main/config.rst.txt
@@ -0,0 +1,399 @@
+
+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.
+
+
+Type extension
+^^^^^^^^^^^^^^
+
+**TYPE_EXTENSION**
+
+The type extension that you want develop.
+
+* Integer
+ * 1 = Normal extension
+ * 2 = New components
+ * 3 = Calc addin
+
+Example:
+
+.. code-block:: python
+
+ TYPE_EXTENSION = 1
+
+
+Version
+^^^^^^^
+
+**VERSION**
+
+* String
+ * The current version of extension, look: `Semantic Versioning`_
+
+Example:
+
+.. code-block:: python
+
+ VERSION = '0.1.0'
+
+
+Name
+^^^^
+
+**NAME**
+
+* String
+ * Your extension name, not used spaces.
+
+Example:
+
+.. code-block:: python
+
+ NAME = 'MyGreatExtension'
+
+
+ID extension
+^^^^^^^^^^^^
+
+The internal name for extension.
+
+**ID**
+
+ * String
+ * Should be unique, used URL inverse
+
+Example:
+
+.. code-block:: python
+
+ ID = 'org.yourname.extensionname'
+
+
+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'
+
+
+Author
+^^^^^^
+
+Your information like author, one or more languages. This information is displayed in the extension manager.
+
+**PUBLISHER**
+
+ * Dictionary
+
+Example:
+
+.. code-block:: python
+
+ PUBLISHER = {
+ 'en': {'text': 'Your name', 'link': 'https://your.page'},
+ 'es': {'text': 'Tu nombre', 'link': 'https://elmau.net'},
+ }
+
+
+Extension icon
+^^^^^^^^^^^^^^
+
+Path relative or absolute to extension logo. Show in extension manager.
+
+**ICON**
+
+ * String
+
+Example:
+
+.. code-block:: python
+
+ ICON='images/logo.png'
+
+
+License
+^^^^^^^
+
+The license for your extension, please, used free license.
+
+**LICENSE**
+
+ * String
+
+Example:
+
+.. code-block:: python
+
+ LICENSE_EN = f"""This file is part of {NAME}.
+
+ {NAME} is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ {NAME} is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with {NAME}. If not, see .
+ """
+ LICENSE_ES = LICENSE_EN
+
+
+Information
+^^^^^^^^^^^
+
+Information of extension: Display name, description and license to displayed when install.
+
+**INFO**
+
+ * Dictionary
+
+Example:
+
+.. code-block:: python
+
+ INFO = {
+ 'en': {
+ 'display_name': 'Test Macro',
+ 'description': 'My great extension',
+ 'license': LICENSE_EN,
+ },
+ 'es': {
+ 'display_name': 'Macro de Prueba',
+ 'description': 'Mi gran extensión',
+ 'license': LICENSE_ES,
+ },
+ }
+
+
+Parent menu
+^^^^^^^^^^^
+
+Only for normal extension (`TYPE_EXTENSION = 1`), where add extension menu, only two possible values: **AddonMenu** or **OfficeMenuBar**
+
+**PARENT**
+
+ * String
+ * **AddonMenu**: Show in menu Tools->Add-Ons
+ * **OfficeMenuBar**: Show in LibreOffice menu
+
+Example:
+
+.. code-block:: python
+
+ PARENT = 'OfficeMenuBar'
+
+
+Main menu
+^^^^^^^^^
+
+Only for normal extension (`TYPE_EXTENSION = 1`) and only if parent menu is `OfficeMenuBar`. Can be multi language.
+
+**MENU_MAIN**
+
+ * Dictionary
+
+Example:
+
+.. code-block:: python
+
+ MENU_MAIN = {
+ 'en': 'My Extension',
+ 'es': 'Mi Extensión',
+ }
+
+
+Menus
+^^^^^
+
+Each menu for show in parent menu.
+
+**MENUS**
+
+ * Tuple of dictionaries
+ * **title** = Label showed, can be multi language.
+ * **argument** = Argument to pass to extension, not use spaces.
+ * **context** = In what applications show, if is blank, show in all.
+ * **icon** = Icon to add, the icon should be in format BMP. The name should be NAME_16.bmp or NAME_26.bmp. Set only NAME in this property.
+ * **toolbar** = It is True, add to new toolbar too, used same icon.
+ * **shortcut** = Shortcut keyboard for this menu. For `Shift+Ctrl+Alt+T` used: `T_SHIFT_MOD1_MOD2`
+
+Example:
+
+.. code-block:: python
+
+ MENUS = (
+ {
+ 'title': {'en': 'Option 1', 'es': 'Opción 1'},
+ 'argument': 'option1',
+ 'context': 'calc,writer',
+ 'icon': 'icon',
+ 'toolbar': True,
+ 'shortcut': 'T_SHIFT_MOD1_MOD2',
+ },
+ )
+
+
+Functions
+^^^^^^^^^
+
+Only for Add-in extension (`TYPE_EXTENSION = 2`). Can be multi language.
+
+The key of dictionary, is the same name of your function. Used exactly you used in your code.
+
+**FUNCTIONS**
+
+ * Dictionary of dictionaries
+ * **displayname** = Show in function wizard, multi language.
+ * **description** = Show in function wizard, multi language.
+ * **parameters** = Each parameters in your function.
+ * **key** = Is the exactly name for parameter in your code function.
+ * **displayname** = Show in function wizard, multi language.
+ * **description** = Show in function wizard, multi language.
+
+Example:
+
+.. code-block:: python
+
+ FUNCTIONS = {
+ 'test': {
+ 'displayname': {'en': 'test', 'es': 'prueba'},
+ 'description': {'en': 'My test', 'es': 'Mi prueba'},
+ 'parameters': {
+ 'value': {
+ 'displayname': {'en': 'value', 'es': 'valor'},
+ 'description': {'en': 'The value', 'es': 'El valor'},
+ },
+ },
+ },
+ }
+
+
+Default program
+^^^^^^^^^^^^^^^
+
+Optional. Open automatically when install and test.
+
+**PROGRAM**
+
+ * String
+ * --calc
+ * --writer
+ * --draw
+ * --impress
+
+Example:
+
+.. code-block:: python
+
+ PROGRAM = '--calc'
+
+
+File test
+^^^^^^^^^
+
+Optional. Open automatically when install and test.
+
+ * String
+
+Example:
+
+.. code-block:: python
+
+ FILE_TEST = '/home/mau/example.ods'
+
+
+Paths
+^^^^^
+
+Paths for install and test. `idlc`, `include` and `remerge` only used en `TYPE_EXTENSION` 2 or 3. `idlc` and path `include` is installed with LibreOffice SDK.
+
+**PATHS**
+
+ * Dictionary
+ * **idlc** for generate files urd.
+ * **include** path with files idl.
+ * **remerge** for generate files rdb.
+ * **soffice** for open LibreOffice.
+ * **install** for install extension.
+
+Example:
+
+.. code-block:: python
+
+ PATHS = {
+ 'idlc': '/usr/lib/libreoffice/sdk/bin/idlc',
+ 'include': '/usr/share/idl/libreoffice',
+ 'regmerge': '/usr/lib/libreoffice/program/regmerge',
+ 'soffice': ('soffice', PROGRAM, FILE_TEST),
+ 'install': ('unopkg', 'add', '-v', '-f', '-s'),
+ }
+
+
+.. _Semantic Versioning: https://semver.org/
diff --git a/doc/build/_sources/main/easymacro.rst.txt b/doc/build/_sources/main/easymacro.rst.txt
new file mode 100644
index 0000000..1d90f56
--- /dev/null
+++ b/doc/build/_sources/main/easymacro.rst.txt
@@ -0,0 +1,34 @@
+
+Library easymacro.py
+====================
+
+**easymacro.py** it's a library for easily develop macros en LibreOffice con Python. It is an abstraction layer between the extensive and complex LibreOffice API UNO and your code.
+
+Probably, your will be more happy if used it. :)
+
+You can used **easymacro.py** with any extension or directly in your macros.
+
+
+**IMPORTANT**: Majority objects are custom objects, you can always get original UNO object with property `obj`
+
+.. code-block:: python
+
+ doc = app.active
+
+ app.msgbox(doc)
+
+ app.msgbox(doc.obj)
+
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Contents:
+
+ tools_for_debug.rst
+ tools.rst
+ paths.rst
+ email.rst
+ application.rst
+ calc.rst
+ writer.rst
+ base.rst
diff --git a/doc/build/_sources/main/email.rst.txt b/doc/build/_sources/main/email.rst.txt
new file mode 100644
index 0000000..b8d71fd
--- /dev/null
+++ b/doc/build/_sources/main/email.rst.txt
@@ -0,0 +1,20 @@
+
+Email
+-----
+
+Remember, always import library.
+
+.. code-block:: python
+
+ import easymacro as app
+
+
+Send email
+^^^^^^^^^^
+
+.. code-block:: python
+
+ app.msgbox(app.OS)
+
+
+.. _cryptography: https://github.com/pyca/cryptography
diff --git a/doc/build/_sources/main/examples.rst.txt b/doc/build/_sources/main/examples.rst.txt
new file mode 100644
index 0000000..c9e0a35
--- /dev/null
+++ b/doc/build/_sources/main/examples.rst.txt
@@ -0,0 +1,15 @@
+
+Examples
+========
+
+Examples of macros used in production.
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Contents:
+
+ examples_app.rst
+ examples_calc.rst
+ examples_writer.rst
+ examples_draw.rst
+ examples_base.rst
diff --git a/doc/build/_sources/main/examples_app.rst.txt b/doc/build/_sources/main/examples_app.rst.txt
new file mode 100644
index 0000000..703de6c
--- /dev/null
+++ b/doc/build/_sources/main/examples_app.rst.txt
@@ -0,0 +1,47 @@
+
+For Application
+---------------
+
+Make custom menu
+^^^^^^^^^^^^^^^^
+
+Macro example in library ``mymacros``
+
+.. code-block:: python
+
+ def show_info_debug():
+ app.msgbox(app.INFO_DEBUG)
+ return
+
+
+Insert custom menu in menu Tools in Calc.
+
+.. code-block:: python
+
+ def insert_menu_in_calc():
+ menus = app.menus['calc']
+ data = {
+ 'Label': 'My Macros',
+ 'CommandURL': 'zaz.my.macros',
+ 'Index': 0,
+ 'Submenu': [
+ {
+ 'Label': 'Show info debug',
+ 'CommandURL': {'library': 'mymacros', 'name': 'show_info_debug'},
+ 'ShortCut': 'Ctrl+Shift+Alt+M'
+ },
+ ],
+ }
+ menus.insert('Tools', data)
+ return
+
+
+Delete menu
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ def delete_menu():
+ menus = app.menus['calc']
+ menus.remove('Tools', 'zaz.my.macros')
+ return
diff --git a/doc/build/_sources/main/examples_base.rst.txt b/doc/build/_sources/main/examples_base.rst.txt
new file mode 100644
index 0000000..358119d
--- /dev/null
+++ b/doc/build/_sources/main/examples_base.rst.txt
@@ -0,0 +1,100 @@
+
+For Base
+--------
+
+You need install ``peewee``
+
+``pip install -U peewee``
+
+Create table
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ import easymacro as app
+ from peewee import *
+
+ database_proxy = DatabaseProxy()
+
+ class BaseModel(Model):
+ class Meta:
+ database = database_proxy
+ legacy_table_names = False
+
+
+ class Contacts(BaseModel):
+ id = IdentityField()
+ name = CharField()
+ born = app.BaseDateField(null=True)
+
+
+ def create_table():
+ path = '/home/mau/test.odb'
+ if app.paths.exists(path):
+ db = app.docs.connect(path)
+ else:
+ db = app.docs.new('base', {'path': path})
+
+ tables = [Contacts]
+ db.initialize(database_proxy, tables)
+ return
+
+
+Insert data
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ def base_insert_data():
+ path = '/home/mau/test.odb'
+ db = app.docs.connect(path)
+ db.initialize(database_proxy)
+
+ rows = (
+ dict(name = 'Ingrid Bergman', born=app.dates.date(2001, 1, 1)),
+ dict(name = 'Sofia Loren', born=app.dates.date(2002, 2, 2)),
+ dict(name = 'Kim Novak', born=app.dates.date(2003, 3, 3)),
+ dict(name = 'Jane Fonda', born=app.dates.date(2004, 4, 4)),
+ dict(name = 'Marion Cotillar', born=app.dates.date(2005, 5, 5)),
+ )
+ for row in rows:
+ Contactos.insert(**row).execute()
+
+ return
+
+
+Select data
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ def base_select_data():
+ path = '/home/mau/test.odb'
+ db = app.docs.connect(path)
+ db.initialize(database_proxy)
+
+ query = Contactos.select()
+ rows = db.get_query(query).tuples
+ for row in rows:
+ print(row)
+
+ rows = db.get_query(query).dicts
+ for row in rows:
+ print(row)
+
+ return
+
+You can get tuples or dict::
+
+ (1, 'Ingrid Bergman', datetime.date(2001, 1, 1))
+ (2, 'Sofia Loren', datetime.date(2002, 2, 2))
+ (3, 'Kim Novak', datetime.date(2003, 3, 3))
+ (4, 'Jane Fonda', datetime.date(2004, 4, 4))
+ (5, 'Marion Cotillar', datetime.date(2005, 5, 5))
+
+ {'id': 1, 'name': 'Ingrid Bergman', 'born': datetime.date(2001, 1, 1)}
+ {'id': 2, 'name': 'Sofia Loren', 'born': datetime.date(2002, 2, 2)}
+ {'id': 3, 'name': 'Kim Novak', 'born': datetime.date(2003, 3, 3)}
+ {'id': 4, 'name': 'Jane Fonda', 'born': datetime.date(2004, 4, 4)}
+ {'id': 5, 'name': 'Marion Cotillar', 'born': datetime.date(2005, 5, 5)}
+
diff --git a/doc/build/_sources/main/examples_calc.rst.txt b/doc/build/_sources/main/examples_calc.rst.txt
new file mode 100644
index 0000000..93f45ff
--- /dev/null
+++ b/doc/build/_sources/main/examples_calc.rst.txt
@@ -0,0 +1,23 @@
+
+For Calc
+--------
+
+Data to cell
+^^^^^^^^^^^^
+
+Automatic calculate size range.
+
+.. code-block:: python
+
+ def calc_data_to_cell():
+ sheet = app.active_sheet
+ data = (
+ ('Month', 'Total'),
+ ('January', 100),
+ ('February', 200),
+ ('March', 300),
+ ('April', 400),
+ ('May', 500),
+ )
+ sheet['A1'].data = data
+ return
diff --git a/doc/build/_sources/main/examples_draw.rst.txt b/doc/build/_sources/main/examples_draw.rst.txt
new file mode 100644
index 0000000..abef9da
--- /dev/null
+++ b/doc/build/_sources/main/examples_draw.rst.txt
@@ -0,0 +1,27 @@
+
+For Draw
+-----------------
+
+Save image from clipboard
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ def save_image_from_clipboard():
+ # Target path
+ path = '/home/mau/Pictures'
+
+ # Open new hidden Draw doc
+ doc = app.docs.new('draw', {'Hidden': True})
+
+ # Paste image from clipboard and return
+ image = doc.paste()
+
+ # Save image
+ image.save(path)
+
+ # Close document
+ doc.close()
+
+ app.msgbox('Image saved')
+ return
diff --git a/doc/build/_sources/main/examples_writer.rst.txt b/doc/build/_sources/main/examples_writer.rst.txt
new file mode 100644
index 0000000..d7f3067
--- /dev/null
+++ b/doc/build/_sources/main/examples_writer.rst.txt
@@ -0,0 +1,14 @@
+
+For Writer
+-------------------
+
+Set autostyle in table
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ def writer_table_set_style():
+ doc = app.active
+ table = doc.tables[0]
+ table.style = 'Academic'
+ return
diff --git a/doc/build/_sources/main/intro.rst.txt b/doc/build/_sources/main/intro.rst.txt
new file mode 100644
index 0000000..aaf4178
--- /dev/null
+++ b/doc/build/_sources/main/intro.rst.txt
@@ -0,0 +1,86 @@
+
+Introduction
+============
+
+Overview
+--------
+
+ZAZ is a script for rapid develop extensions and macros for `LibreOffice`_, in
+`Python`_ of course.
+
+With ZAZ, you can create:
+
+* Extensions for final user
+* New components for used from Basic
+* AddIn, new functions for Calc
+
+
+Requirements
+------------
+
+* Python 3.7+
+* LibreOffice 7.0+ with support for macros Python
+* LibreOffice SDK, for new components and Add-In
+
+In:
+
+* ArchLinux
+ * ``sudo pacman -S libreoffice-fresh-sdk``
+* Ubuntu 20.04+
+ * ``sudo apt install libreoffice-script-provider-python libreoffice-dev``
+
+
+Installation
+------------
+
+* Clone this repository (recommended) or download it.
+
+``git clone https://git.cuates.net/elmau/zaz.git``
+
+* Move to.
+
+``cd zaz/source``
+
+* Start new extension.
+
+``./zaz.py -new -t ~/projects -n MyFirstExtension``
+
+
+My first extension
+------------------
+
+* Move to:
+
+``cd ~/projects/MyFirstExtension``
+
+* Create:
+
+``python zaz.py -c``::
+
+ ↪ python zaz.py -c
+ 04/02/2021 23:07:50 - INFO - Created directories...
+ 04/02/2021 23:07:50 - INFO - Created files...
+ 04/02/2021 23:07:50 - INFO - Don't forget generate DOMAIN.pot for locales
+ 04/02/2021 23:07:50 - INFO - New extension: MyFirstExtension make successfully...
+ Now, you can install and test: zaz.py -i
+
+* Install and test:
+
+``python zaz.py -i``::
+
+ ↪ python zaz.py -i
+ 04/02/2021 23:11:40 - INFO - Don't forget generate DOMAIN.pot for locales
+ 04/02/2021 23:11:40 - INFO - Compress OXT extension...
+ 04/02/2021 23:11:40 - INFO - Extension OXT created successfully...
+ Copying: MyFirstExtension_v0.1.0.oxt
+
+ unopkg done.
+
+ 04/02/2021 23:11:41 - INFO - Install extension successfully...
+ 04/02/2021 23:11:41 - INFO - Start LibreOffice...
+ 04/02/2021 23:11:53 - INFO - Extension make successfully...
+
+
+
+.. _LibreOffice: https://libreoffice.org
+.. _Python: https://python.org
diff --git a/doc/build/_sources/main/paths.rst.txt b/doc/build/_sources/main/paths.rst.txt
new file mode 100644
index 0000000..0d25be3
--- /dev/null
+++ b/doc/build/_sources/main/paths.rst.txt
@@ -0,0 +1,449 @@
+
+Paths and files
+---------------
+
+Remember, always import library.
+
+.. code-block:: python
+
+ import easymacro as app
+
+
+Get info path
+^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = '/home/mau/myfile.ods'
+ p = app.paths(path)
+
+ app.debug(p.path)
+ app.debug(p.file_name)
+ app.debug(p.name)
+ app.debug(p.ext)
+ app.debug(p.size)
+ app.debug(p.url)
+
+Or get information in a tuple
+
+.. code-block:: python
+
+ path = '/home/mau/myfile.ods'
+ p = app.paths(path)
+
+ app.msgbox(p.info)
+
+
+Exists path
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = '/home/mau/test'
+ app.msgbox(app.paths.exists(path))
+
+
+Path is file
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = '/home/mau/myfile.ott'
+ app.msgbox(app.paths.is_file(path))
+
+
+Path is dir
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = '/home/mau'
+ app.msgbox(app.paths.is_dir(path))
+
+
+Get path home
+^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = app.paths.home
+ app.msgbox(path)
+
+
+Get path documents
+^^^^^^^^^^^^^^^^^^
+
+* Configurate in LibreOffice Paths
+
+.. code-block:: python
+
+ path = app.paths.documents
+ app.msgbox(path)
+
+
+Get path temp
+^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = app.paths.temp_dir
+ app.msgbox(path)
+
+
+Get path from LibreOffice configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* Default get path documents.
+
+.. code-block:: python
+
+ path = app.paths.config()
+ app.msgbox(path)
+
+* All options in `API XPathSettings`_
+
+.. code-block:: python
+
+ path = app.paths.config('Config')
+ app.msgbox(path)
+
+
+Get path executable python
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path_python = app.paths.python
+ app.msgbox(path_python)
+
+
+Save and read text data
+^^^^^^^^^^^^^^^^^^^^^^^
+
+* Default encoding is UTF8
+
+.. code-block:: python
+
+ data = """Do you want to know who you are? Don't ask. Act!
+ Action will delineate and define you.
+
+ Thomas Jefferson
+ """
+
+ path = '/home/mau/temp.txt'
+ app.paths.save(path, data)
+
+ data = app.paths.read(path)
+ app.msgbox(data)
+
+* Change encoding
+
+.. code-block:: python
+
+ app.paths.save(path, data, 'iso-8859-1')
+
+
+Save and read binary data
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ data = b'Binary data'
+ path = '/home/mau/temp.bin'
+ app.paths.save_bin(path, data)
+
+ data = app.paths.read_bin(path)
+ app.msgbox(data)
+
+
+Join paths
+^^^^^^^^^^
+
+.. code-block:: python
+
+ path_home = app.paths.home
+ file_name = 'test.ods'
+ path = app.paths.join(path_home, file_name)
+
+ app.msgbox(path)
+
+
+Get a temporal path
+^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path_temp = app.paths.tmp()
+ app.msgbox(path_temp)
+
+* Get with extension.
+
+.. code-block:: python
+
+ path_temp = app.paths.tmp('.txt')
+ app.msgbox(path_temp)
+
+* Save data in a temporal path
+
+.. code-block:: python
+
+ data = """He who receives an idea from me,
+ receives instruction himself without lessening mine;
+ as he who lights his taper at mine,
+ receives light without darkening me.
+
+ Thomas Jefferson
+ """
+ path_tmp = app.paths.save_tmp(data)
+
+ app.msgbox(path_tmp)
+
+
+Get a temporal dir
+^^^^^^^^^^^^^^^^^^
+
+* All content and directory is deleted when exit context.
+
+.. code-block:: python
+
+ data = """Do you want to know who you are? Don't ask. Act!
+ Action will delineate and define you.
+
+ Thomas Jefferson
+ """
+
+ with app.paths.dir_tmp() as dt:
+ app.debug(app.paths.exists(dt))
+ path = app.paths.join(dt, 'test.txt')
+ app.paths.save(path, data)
+
+ app.debug(app.paths.exists(dt))
+
+
+Get path for save
+^^^^^^^^^^^^^^^^^
+
+* Default open in user documents.
+
+.. code-block:: python
+
+ path = app.paths.get()
+ app.msgbox(path)
+
+* Open in other path.
+
+.. code-block:: python
+
+ path_tmp = app.paths.temp_dir
+ path = app.paths.get(path_tmp)
+ app.msgbox(path)
+
+* Add one filter
+
+.. code-block:: python
+
+ path = app.paths.get(filters='xml')
+ app.msgbox(path)
+
+* Add multiple filters
+
+.. code-block:: python
+
+ path = app.paths.get(filters='xml,txt')
+
+
+Select directory
+^^^^^^^^^^^^^^^^
+
+* Default open in user documents.
+
+.. code-block:: python
+
+ path_dir = app.paths.get_dir()
+ app.msgbox(path_dir)
+
+* Open in other path.
+
+.. code-block:: python
+
+ path_tmp = app.paths.temp_dir
+ path_dir = app.paths.get_dir(path_tmp)
+ app.msgbox(path_dir)
+
+
+Get path exists file
+^^^^^^^^^^^^^^^^^^^^
+
+* Default open in user documents.
+
+.. code-block:: python
+
+ path_file = app.paths.get_file()
+ app.msgbox(path_file)
+
+* Change init dir.
+
+.. code-block:: python
+
+ path = '/home/mau'
+ path_file = app.paths.get_file(path)
+ app.msgbox(path_file)
+
+* Add filter or filters.
+
+.. code-block:: python
+
+ path_file = app.paths.get_file(filters='ods')
+
+ # or
+
+ path_file = app.paths.get_file(filters='ods,odt')
+
+* Can select multiple files.
+
+.. code-block:: python
+
+ path_file = app.paths.get_file(multiple=True)
+
+
+Replace extension
+^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = '/home/mau/myFile.ods'
+ path_new = app.paths.replace_ext(path, 'pdf')
+ app.msgbox(path_new)
+
+
+Path in format URL <-> System
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ path = '/home/mau/myFile.ods'
+ path_url = app.paths.to_url(path)
+ app.msgbox(path_url)
+
+ path = app.paths.to_system(path_url)
+ app.msgbox(path)
+
+
+Delete files and directories
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+**CAUTION**: Delete files and directories immediately, always confirm this action.
+
+.. code-block:: python
+
+ path = '/home/mau/temp.bin'
+ result = app.paths.kill(path)
+ app.msgbox(result)
+
+* Delete directory and all content.
+
+.. code-block:: python
+
+ path = '/home/mau/safe_for_delete'
+ result = app.paths.kill(path)
+ app.msgbox(result)
+
+
+Get files
+^^^^^^^^^
+
+This method use library `pathlib`
+
+* Get files not recursively
+
+.. code-block:: python
+
+ path = '/home/mau/Documents'
+ files = app.paths.files(path)
+ for f in files:
+ app.debug(f)
+
+* Add filter
+
+.. code-block:: python
+
+ files = app.paths.files(path, '*.pdf')
+
+* Get from this directory and all subdirectories, recursively
+
+.. code-block:: python
+
+ files = app.paths.files(path, '**/*.pdf')
+
+This method use `os.walk`
+
+* Get content files recursively
+
+.. code-block:: python
+
+ path = '/home/mau/Documents'
+ files = app.paths.walk(path)
+ for f in files:
+ app.debug(f)
+
+* Add filters
+
+.. code-block:: python
+
+ files = app.paths.walk(path, 'ods')
+
+ # or filters
+
+ files = app.paths.walk(path, 'ods|odt')
+
+
+Get directories
+^^^^^^^^^^^^^^^
+
+This method use library `pathlib`
+
+* Get directories in path not recursively
+
+.. code-block:: python
+
+ path = '/home/mau/Documents'
+ folders = app.paths.dirs(path)
+ for f in folders:
+ app.debug(f)
+
+This method use `os.walk`
+
+* Get directories in path recursively
+
+.. code-block:: python
+
+ path = '/home/mau/Documents'
+ folders = app.paths.walk_dirs(path)
+ for f in folders:
+ app.debug(f)
+
+* Get info in a tuple (ID_FOLDER, ID_PARENT, NAME)
+
+.. code-block:: python
+
+ path = '/home/mau/Documents'
+ folders = app.paths.walk_dirs(path, True)
+ for f in folders:
+ app.debug(f)
+
+
+Get install path from id extension
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ id_ext = 'net.elmau.zaz.EasyMacro'
+ path = app.paths.from_id(id_ext)
+ app.debug(path)
+
+.. code-block:: bash
+
+ 24/06/2021 21:47:29 - DEBUG - /home/mau/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu20665x29msz.tmp_/ZAZEasyMacro_v0.1.0.oxt
+
+
+.. _API XPathSettings: http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XPathSettings.html
diff --git a/doc/build/_sources/main/tools.rst.txt b/doc/build/_sources/main/tools.rst.txt
new file mode 100644
index 0000000..08a2397
--- /dev/null
+++ b/doc/build/_sources/main/tools.rst.txt
@@ -0,0 +1,511 @@
+
+Tools
+-----
+
+Remember, always import library.
+
+.. code-block:: python
+
+ import easymacro as app
+
+
+Info from PC
+^^^^^^^^^^^^
+
+* Operate system
+
+.. code-block:: python
+
+ app.msgbox(app.OS)
+
+* Current user
+
+.. code-block:: python
+
+ app.msgbox(app.USER)
+
+* Name PC
+
+.. code-block:: python
+
+ app.msgbox(app.PC)
+
+* Name desktop, only GNU/Linux
+
+.. code-block:: python
+
+ app.msgbox(app.DESKTOP)
+
+* Language
+
+.. code-block:: python
+
+ app.msgbox(app.LANG)
+
+* Language with variant
+
+.. code-block:: python
+
+ app.msgbox(app.LANGUAGE)
+
+* Application name
+
+.. code-block:: python
+
+ app.msgbox(app.NAME)
+
+* Application version
+
+.. code-block:: python
+
+ app.msgbox(app.VERSION)
+
+* In Windows
+
+.. code-block:: python
+
+ app.msgbox(app.IS_WIN)
+
+* In Mac
+
+.. code-block:: python
+
+ app.msgbox(app.IS_MAC)
+
+
+Message Box
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ app.msgbox(app.IS_WIN, 'My Macro')
+
+
+Show warning
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ message = 'Caution, this action is dangerous'
+ title = 'My App'
+ app.warning(message, title)
+
+
+Show error box
+^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ message = 'ERROR: Contact technical support'
+ title = 'My App'
+ app.errorbox(message, title)
+
+
+Make question
+^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ message = 'Is easy Python?'
+ title = 'My App'
+ result = app.question(message, title)
+ app.msgbox(result)
+
+
+InputBox
+^^^^^^^^
+
+* Normal data
+
+.. code-block:: python
+
+ message = 'Type your name'
+ default = ''
+ title = 'My App'
+
+ result = app.inputbox(message, default, title)
+ app.msgbox(result)
+
+* Private data
+
+.. code-block:: python
+
+ message = 'Type your password'
+ default = ''
+ title = 'My App'
+ echochar = "*"
+
+ result = app.inputbox(message, default, title, echochar)
+ app.msgbox(result)
+
+
+Date and times
+^^^^^^^^^^^^^^
+
+* Get today
+
+.. code-block:: python
+
+ app.msgbox(app.today())
+
+* Get now
+
+.. code-block:: python
+
+ app.msgbox(app.now())
+
+* Get now only time
+
+.. code-block:: python
+
+ app.msgbox(app.now(True))
+
+* Get `epoch time`_
+
+.. code-block:: python
+
+ app.msgbox(app.get_epoch())
+
+* Simple measure time
+
+.. code-block:: python
+
+ app.start()
+ app.sleep(5)
+ seconds = app.end(True)
+ app.msgbox(seconds)
+
+
+Thread
+^^^^^^
+
+You can execute any macro in thread
+
+* Normal execution
+
+.. code-block:: python
+
+ def show_time(seconds):
+ app.sleep(seconds)
+ app.msgbox(app.NAME)
+ return
+
+ def main(args=None):
+ show_time(5)
+ app.msgbox('Finish...')
+ return
+
+* Run in thread
+
+.. code-block:: python
+
+ @app.run_in_thread
+ def show_time(seconds):
+ app.sleep(seconds)
+ app.msgbox(app.NAME)
+ return
+
+ def main(args=None):
+ show_time(5)
+ app.msgbox('Finish...')
+ return
+
+
+Dictionary <-> properties
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ args = {
+ 'Hidden': True,
+ 'Password': 'letmein',
+ }
+ properties = app.dict_to_property(args)
+
+ app.msgbox(properties)
+
+ data = app.data_to_dict(properties)
+
+ app.msgbox(data)
+
+
+Tuples or lists to dictionary
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ tuple_of_tuples = (
+ ('Hidden', True),
+ ('Password', 'letmein'),
+ )
+ data = app.data_to_dict(tuple_of_tuples)
+ app.msgbox(data)
+
+ list_of_lists = [
+ ['Hidden', True],
+ ['Password', 'letmein'],
+ ]
+ data = app.data_to_dict(list_of_lists)
+ app.msgbox(data)
+
+
+Json
+^^^^
+
+.. code-block:: python
+
+ data = {
+ 'Hidden': True,
+ 'Password': 'letmein',
+ }
+
+ json = app.json_dumps(data)
+
+ app.msgbox(json)
+
+ data = app.json_loads(json)
+
+ app.msgbox(data)
+
+
+Call Macros
+^^^^^^^^^^^
+
+You can any macro, for default call macros Python.
+
+.. code-block:: python
+
+ def show_message():
+ app.msgbox(app.INFO_DEBUG)
+ return
+
+ def main(args=None):
+ args = {
+ 'library': 'test',
+ 'name': 'show_message',
+ }
+ app.call_macro(args)
+ return
+
+Of course is better call directly if both macros are the same languaje, but, you can call macro in Basic too.
+
+.. code-block:: vbnet
+
+ Sub show_message()
+ MsgBox "Basic from Python"
+ End Sub
+
+Call from Python with.
+
+.. code-block:: python
+
+ args = {
+ 'language': 'Basic',
+ 'library': 'Standard',
+ 'module': 'Module1',
+ 'name': 'show_message',
+ }
+ app.call_macro(args)
+
+Execute macro in other thread
+
+.. code-block:: python
+
+ app.call_macro(args, True)
+
+
+Call external program
+^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ app_name = 'gnome-calculator'
+ app.run(app_name)
+ app.msgbox('ok')
+
+Call command line and capture output
+
+.. code-block:: python
+
+ args = 'ls -lh ~'
+ result = app.run(args, True)
+ app.debug(result)
+
+.. code-block:: bash
+
+ 21/06/2021 22:27:22 - DEBUG - total 1.3M
+ drwxr-xr-x 5 mau mau 4.0K Jun 17 13:09 Desktop
+ drwxr-xr-x 6 mau mau 4.0K Jun 15 12:35 Documents
+ drwxr-xr-x 2 mau mau 4.0K Jun 21 20:26 Downloads
+ drwxr-xr-x 2 mau mau 4.0K Jun 21 16:18 Pictures
+ drwxr-xr-x 13 mau mau 4.0K Jun 21 15:34 Projects
+ drwxr-xr-x 2 mau mau 4.0K May 11 18:48 Templates
+ drwxr-xr-x 2 mau mau 4.0K Jun 20 23:27 Videos
+
+Call command line and capture output line by line.
+
+.. code-block:: python
+
+ args = 'ls -lh /home/mau'
+ for line in app.popen(args):
+ app.debug(line)
+
+.. code-block:: bash
+
+ 21/06/2021 22:34:42 - DEBUG - total 1.3M
+ 21/06/2021 22:34:42 - DEBUG - drwxr-xr-x 5 mau mau 4.0K Jun 17 13:09 Desktop
+ 21/06/2021 22:34:42 - DEBUG - drwxr-xr-x 6 mau mau 4.0K Jun 15 12:35 Documents
+ 21/06/2021 22:34:42 - DEBUG - drwxr-xr-x 2 mau mau 4.0K Jun 21 20:26 Downloads
+ 21/06/2021 22:34:42 - DEBUG - -rw-r----- 1 mau mau 1.3M Jun 14 11:53 out.png
+ 21/06/2021 22:34:42 - DEBUG - drwxr-xr-x 2 mau mau 4.0K Jun 21 16:18 Pictures
+ 21/06/2021 22:34:42 - DEBUG - drwxr-xr-x 13 mau mau 4.0K Jun 21 15:34 Projects
+ 21/06/2021 22:34:42 - DEBUG - drwxr-xr-x 2 mau mau 4.0K May 11 18:48 Templates
+ 21/06/2021 22:34:42 - DEBUG - drwxr-xr-x 2 mau mau 4.0K Jun 20 23:27 Videos
+
+
+Timer
+^^^^^
+
+Execute any macro every seconds.
+
+.. code-block:: python
+
+ TIMER_NAME = 'clock'
+
+ def show_time():
+ app.debug(app.now(True))
+ return
+
+ def start_clock():
+ seconds = 1
+ macro = {
+ 'library': 'test',
+ 'name': 'show_time',
+ }
+ app.start_timer(TIMER_NAME, seconds, macro)
+ return
+
+ def stop_clock():
+ app.stop_timer(TIMER_NAME)
+ return
+
+ def main(args=None):
+ start_clock()
+ return
+
+Execute `stop_clock` for stop timer.
+
+.. code-block:: bash
+
+ 21/06/2021 22:43:17 - INFO - Timer started... show_time
+ 21/06/2021 22:43:18 - DEBUG - 22:43:18.080315
+ 21/06/2021 22:43:19 - DEBUG - 22:43:19.082211
+ ...
+ 21/06/2021 22:43:46 - DEBUG - 22:43:46.126446
+ 21/06/2021 22:43:47 - DEBUG - 22:43:47.128487
+ 21/06/2021 22:43:47 - INFO - Timer stopped... show_time
+
+
+Get digest
+^^^^^^^^^^
+
+.. code-block:: python
+
+ data = 'LibreOffice with Python'
+
+ digest = app.sha256(data)
+ app.msgbox(digest)
+
+ digest = app.sha512(data)
+ app.msgbox(digest)
+
+
+Save and get configurations
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+You can save any data.
+
+.. code-block:: python
+
+ my_app = 'my_extension'
+ data = {
+ 'path': '/home/mau/work',
+ 'save_data': True,
+ }
+
+ app.set_config('config', data, my_app)
+
+ app.msgbox('Save config')
+
+ data = app.get_config('config', my_app)
+
+ app.msgbox(data)
+
+
+Render string
+^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ template = """Hello $name
+
+ I send you this $file_name
+
+ Best regards
+ """
+
+ data = {'name': 'Ingrid Bergman', 'file_name': 'letter_love.odt'}
+
+ render = app.render(template, data)
+
+ app.msgbox(render)
+
+
+Encrypt decrypt
+^^^^^^^^^^^^^^^
+
+You need install library `cryptography`_
+
+.. code-block:: python
+
+ import easymacro as app
+ from conf import PASSWORD
+
+ def encrypt_decrypt():
+
+ data = 'My super secret data'
+ token = app.encrypt(data, PASSWORD)
+ app.msgbox(token)
+
+ data = app.decrypt(token, PASSWORD)
+ app.msgbox(data)
+
+ return
+
+
+Simple url open
+^^^^^^^^^^^^^^^
+
+* Get text data
+
+.. code-block:: python
+
+ url = 'https://api.ipify.org'
+ data = app.url_open(url)
+ app.msgbox(data)
+
+* Get json data
+
+.. code-block:: python
+
+ url = 'https://api.ipify.org?format=json'
+ data = app.url_open(url, get_json=True)
+ app.msgbox(data)
+
+For more complex case, you can used `requests`_ or `httpx`_
+
+
+.. _epoch time: https://en.wikipedia.org/wiki/Unix_time
+.. _cryptography: https://github.com/pyca/cryptography
+.. _requests: https://docs.python-requests.org
+.. _httpx: https://www.python-httpx.org/
diff --git a/doc/build/_sources/main/tools_for_debug.rst.txt b/doc/build/_sources/main/tools_for_debug.rst.txt
new file mode 100644
index 0000000..b30ca19
--- /dev/null
+++ b/doc/build/_sources/main/tools_for_debug.rst.txt
@@ -0,0 +1,153 @@
+
+Tools for debug
+---------------
+
+INFO_DEBUG
+^^^^^^^^^^
+
+Show info debug, show in message box.
+
+If you have any problem in your code, you can `open issue`_ in this project,
+always copy the information of INFO_DEBUG in your ticket.
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def info():
+ app.msgbox(INFO_DEBUG)
+ return
+
+Show in shell.
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def info():
+ app.debug(INFO_DEBUG)
+ return
+
+
+Log error
+^^^^^^^^^
+
+Show error message in shell.
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def error():
+ msg = 'My error 500'
+ app.error(msg)
+ return
+
+
+Log debug
+^^^^^^^^^
+
+Show debug message in shell.
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def error():
+ msg = 'Verify this data...'
+ app.debug(msg)
+ return
+
+
+Log info
+^^^^^^^^
+
+Show info message in shell.
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def error():
+ msg = 'Start process...'
+ app.info(msg)
+ return
+
+
+Log to file
+^^^^^^^^^^^
+
+Save log to file, automatic add date and time.
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def log():
+ app.save_log('/home/mau/log.txt', 'PyUNO')
+ app.save_log('/home/mau/log.txt', app.INFO_DEBUG)
+ return
+
+
+
+Message box
+^^^^^^^^^^^
+
+Show any data in message box
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def message():
+
+ msg = 'Please, save the planet'
+ app.msgbox(msg)
+
+ msg = ('one', 2, 'three')
+ app.msgbox(msg)
+
+ msg = {'name': 'Teresa'}
+ app.msgbox(msg)
+
+ app.msgbox(app)
+
+ return
+
+
+Catch exceptions
+^^^^^^^^^^^^^^^^
+
+Sometimes, for difficult errors, you can catch exceptions.
+
+.. code-block:: python
+
+ import easymacro as app
+
+ @app.catch_exception
+ def test():
+ r = 1 / 0
+ return
+
+And not, not used you this function in production.
+
+
+Call MRI
+^^^^^^^^
+
+`MRI`_ is the better extension for debug any object in LibreOffice, you need
+install before call it.
+
+
+.. code-block:: python
+
+ import easymacro as app
+
+ def error():
+ obj = app.active
+ app.mri(obj)
+ return
+
+
+.. _MRI: https://github.com/hanya/MRI
+.. _open issue: https://git.cuates.net/elmau/zaz/issues
diff --git a/doc/build/_sources/main/writer.rst.txt b/doc/build/_sources/main/writer.rst.txt
new file mode 100644
index 0000000..2c907e6
--- /dev/null
+++ b/doc/build/_sources/main/writer.rst.txt
@@ -0,0 +1,19 @@
+
+Writer
+------
+
+Remember, always import library.
+
+.. code-block:: python
+
+ import easymacro as app
+
+
+Current doc
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.type)
+
diff --git a/doc/build/_static/alabaster.css b/doc/build/_static/alabaster.css
new file mode 100644
index 0000000..0eddaeb
--- /dev/null
+++ b/doc/build/_static/alabaster.css
@@ -0,0 +1,701 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+ font-family: Georgia, serif;
+ font-size: 17px;
+ background-color: #fff;
+ color: #000;
+ margin: 0;
+ padding: 0;
+}
+
+
+div.document {
+ width: 940px;
+ margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+ float: left;
+ width: 100%;
+}
+
+div.bodywrapper {
+ margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+ width: 220px;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+hr {
+ border: 1px solid #B1B4B6;
+}
+
+div.body {
+ background-color: #fff;
+ color: #3E4349;
+ padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+ text-align: left;
+}
+
+div.footer {
+ width: 940px;
+ margin: 20px auto 30px auto;
+ font-size: 14px;
+ color: #888;
+ text-align: right;
+}
+
+div.footer a {
+ color: #888;
+}
+
+p.caption {
+ font-family: inherit;
+ font-size: inherit;
+}
+
+
+div.relations {
+ display: none;
+}
+
+
+div.sphinxsidebar a {
+ color: #444;
+ text-decoration: none;
+ border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+ border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+ padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+ padding: 0;
+ margin: -10px 0 0 0px;
+ text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+ margin-top: -10px;
+ text-align: center;
+ margin-bottom: 5px;
+ text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+ margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+ margin-top: 0;
+ font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+ font-family: Georgia, serif;
+ color: #444;
+ font-size: 24px;
+ font-weight: normal;
+ margin: 0 0 5px 0;
+ padding: 0;
+}
+
+div.sphinxsidebar h4 {
+ font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+ color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+ border: none;
+}
+
+div.sphinxsidebar p {
+ color: #555;
+ margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+ margin: 10px 0;
+ padding: 0;
+ color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+ font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+ font-size: 110%;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #CCC;
+ font-family: Georgia, serif;
+ font-size: 1em;
+}
+
+div.sphinxsidebar hr {
+ border: none;
+ height: 1px;
+ color: #AAA;
+ background: #AAA;
+
+ text-align: left;
+ margin-left: 0;
+ width: 50%;
+}
+
+div.sphinxsidebar .badge {
+ border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+ border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+ margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+ color: #004B6B;
+ text-decoration: underline;
+}
+
+a:hover {
+ color: #6D4100;
+ text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+ font-family: Georgia, serif;
+ font-weight: normal;
+ margin: 30px 0px 10px 0px;
+ padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+ color: #DDD;
+ padding: 0 4px;
+ text-decoration: none;
+}
+
+a.headerlink:hover {
+ color: #444;
+ background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+ line-height: 1.4em;
+}
+
+div.admonition {
+ margin: 20px 0px;
+ padding: 10px 30px;
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+ background-color: #FBFBFB;
+ border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+ font-family: Georgia, serif;
+ font-weight: normal;
+ font-size: 24px;
+ margin: 0 0 10px 0;
+ padding: 0;
+ line-height: 1;
+}
+
+div.admonition p.last {
+ margin-bottom: 0;
+}
+
+div.highlight {
+ background-color: #fff;
+}
+
+dt:target, .highlight {
+ background: #FAF3E8;
+}
+
+div.warning {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+}
+
+div.danger {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+ -moz-box-shadow: 2px 2px 4px #D52C2C;
+ -webkit-box-shadow: 2px 2px 4px #D52C2C;
+ box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+ -moz-box-shadow: 2px 2px 4px #D52C2C;
+ -webkit-box-shadow: 2px 2px 4px #D52C2C;
+ box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+}
+
+div.attention {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+}
+
+div.important {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.note {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.tip {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.hint {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.seealso {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.topic {
+ background-color: #EEE;
+}
+
+p.admonition-title {
+ display: inline;
+}
+
+p.admonition-title:after {
+ content: ":";
+}
+
+pre, tt, code {
+ font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.9em;
+}
+
+.hll {
+ background-color: #FFC;
+ margin: 0 -12px;
+ padding: 0 12px;
+ display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+ font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+ padding-right: 0.08em;
+}
+
+img.screenshot {
+ -moz-box-shadow: 2px 2px 4px #EEE;
+ -webkit-box-shadow: 2px 2px 4px #EEE;
+ box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+ border: 1px solid #888;
+ -moz-box-shadow: 2px 2px 4px #EEE;
+ -webkit-box-shadow: 2px 2px 4px #EEE;
+ box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+ border: 1px solid #888;
+ padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+ border: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+table.footnote {
+ margin: 15px 0;
+ width: 100%;
+ border: 1px solid #EEE;
+ background: #FDFDFD;
+ font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+ margin-top: -15px;
+ border-top: none;
+}
+
+table.field-list th {
+ padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+ padding: 0;
+}
+
+table.field-list p {
+ margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+ -moz-hyphens: manual;
+ -ms-hyphens: manual;
+ -webkit-hyphens: manual;
+ hyphens: manual;
+}
+
+table.footnote td.label {
+ width: .1px;
+ padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+ padding: 0.3em 0.5em;
+}
+
+dl {
+ margin: 0;
+ padding: 0;
+}
+
+dl dd {
+ margin-left: 30px;
+}
+
+blockquote {
+ margin: 0 0 0 30px;
+ padding: 0;
+}
+
+ul, ol {
+ /* Matches the 30px from the narrow-screen "li > ul" selector below */
+ margin: 10px 0 10px 30px;
+ padding: 0;
+}
+
+pre {
+ background: #EEE;
+ padding: 7px 30px;
+ margin: 15px 0px;
+ line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+ background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+ margin-left: 0;
+ padding-left: 30px;
+}
+
+tt, code {
+ background-color: #ecf0f3;
+ color: #222;
+ /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+ background-color: #FBFBFB;
+ border-bottom: 1px solid #fff;
+}
+
+a.reference {
+ text-decoration: none;
+ border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+ border-bottom: none;
+}
+
+a.reference:hover {
+ border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+ text-decoration: none;
+ font-size: 0.7em;
+ vertical-align: top;
+ border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+ border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+ background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+ div.sphinxsidebar {
+ display: none;
+ }
+
+ div.document {
+ width: 100%;
+
+ }
+
+ div.documentwrapper {
+ margin-left: 0;
+ margin-top: 0;
+ margin-right: 0;
+ margin-bottom: 0;
+ }
+
+ div.bodywrapper {
+ margin-top: 0;
+ margin-right: 0;
+ margin-bottom: 0;
+ margin-left: 0;
+ }
+
+ ul {
+ margin-left: 0;
+ }
+
+ li > ul {
+ /* Matches the 30px from the "ul, ol" selector above */
+ margin-left: 30px;
+ }
+
+ .document {
+ width: auto;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .bodywrapper {
+ margin: 0;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .github {
+ display: none;
+ }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+ body {
+ margin: 0;
+ padding: 20px 30px;
+ }
+
+ div.documentwrapper {
+ float: none;
+ background: #fff;
+ }
+
+ div.sphinxsidebar {
+ display: block;
+ float: none;
+ width: 102.5%;
+ margin: 50px -30px -20px -30px;
+ padding: 10px 20px;
+ background: #333;
+ color: #FFF;
+ }
+
+ div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+ div.sphinxsidebar h3 a {
+ color: #fff;
+ }
+
+ div.sphinxsidebar a {
+ color: #AAA;
+ }
+
+ div.sphinxsidebar p.logo {
+ display: none;
+ }
+
+ div.document {
+ width: 100%;
+ margin: 0;
+ }
+
+ div.footer {
+ display: none;
+ }
+
+ div.bodywrapper {
+ margin: 0;
+ }
+
+ div.body {
+ min-height: 0;
+ padding: 0;
+ }
+
+ .rtd_doc_footer {
+ display: none;
+ }
+
+ .document {
+ width: auto;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .github {
+ display: none;
+ }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+ display: none!important;
+}
+
+/* Make nested-list/multi-paragraph items look better in Releases changelog
+ * pages. Without this, docutils' magical list fuckery causes inconsistent
+ * formatting between different release sub-lists.
+ */
+div#changelog > div.section > ul > li > p:only-child {
+ margin-bottom: 0;
+}
+
+/* Hide fugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+ border: none;
+ /* Below needed in some edge cases; if not applied, bottom shadows appear */
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+ line-height: 30px;
+ width: 100%;
+ font-size: 0.9rem;
+}
+
+.related.top {
+ border-bottom: 1px solid #EEE;
+ margin-bottom: 20px;
+}
+
+.related.bottom {
+ border-top: 1px solid #EEE;
+}
+
+.related ul {
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+
+.related li {
+ display: inline;
+}
+
+nav#rellinks {
+ float: right;
+}
+
+nav#rellinks li+li:before {
+ content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+ content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+ div.related {
+ display: none;
+ }
+}
\ No newline at end of file
diff --git a/doc/build/_static/basic.css b/doc/build/_static/basic.css
new file mode 100644
index 0000000..aa9df31
--- /dev/null
+++ b/doc/build/_static/basic.css
@@ -0,0 +1,904 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+ clear: both;
+}
+
+div.section::after {
+ display: block;
+ content: '';
+ clear: left;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+ width: 100%;
+ font-size: 90%;
+}
+
+div.related h3 {
+ display: none;
+}
+
+div.related ul {
+ margin: 0;
+ padding: 0 0 0 10px;
+ list-style: none;
+}
+
+div.related li {
+ display: inline;
+}
+
+div.related li.right {
+ float: right;
+ margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+ padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+ float: left;
+ width: 230px;
+ margin-left: -100%;
+ font-size: 90%;
+ word-wrap: break-word;
+ overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+ list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+ margin-left: 20px;
+ list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+ margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #98dbcc;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox form.search {
+ overflow: hidden;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+ float: left;
+ width: 80%;
+ padding: 0.25em;
+ box-sizing: border-box;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+ float: left;
+ width: 20%;
+ border-left: none;
+ padding: 0.25em;
+ box-sizing: border-box;
+}
+
+
+img {
+ border: 0;
+ max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+ margin: 10px 0 0 20px;
+ padding: 0;
+}
+
+ul.search li {
+ padding: 5px 0 5px 20px;
+ background-image: url(file.png);
+ background-repeat: no-repeat;
+ background-position: 0 7px;
+}
+
+ul.search li a {
+ font-weight: bold;
+}
+
+ul.search li p.context {
+ color: #888;
+ margin: 2px 0 0 30px;
+ text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+ font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+ width: 90%;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+table.contentstable p.biglink {
+ line-height: 150%;
+}
+
+a.biglink {
+ font-size: 1.3em;
+}
+
+span.linkdescr {
+ font-style: italic;
+ padding-top: 5px;
+ font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+ width: 100%;
+}
+
+table.indextable td {
+ text-align: left;
+ vertical-align: top;
+}
+
+table.indextable ul {
+ margin-top: 0;
+ margin-bottom: 0;
+ list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+ padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+ height: 10px;
+}
+
+table.indextable tr.cap {
+ margin-top: 10px;
+ background-color: #f2f2f2;
+}
+
+img.toggler {
+ margin-right: 3px;
+ margin-top: 3px;
+ cursor: pointer;
+}
+
+div.modindex-jumpbox {
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ margin: 1em 0 1em 0;
+ padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ margin: 1em 0 1em 0;
+ padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+ padding: 2px;
+ border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body {
+ min-width: 450px;
+ max-width: 800px;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+ -moz-hyphens: auto;
+ -ms-hyphens: auto;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+}
+
+a.headerlink {
+ visibility: hidden;
+}
+
+a.brackets:before,
+span.brackets > a:before{
+ content: "[";
+}
+
+a.brackets:after,
+span.brackets > a:after {
+ content: "]";
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+ visibility: visible;
+}
+
+div.body p.caption {
+ text-align: inherit;
+}
+
+div.body td {
+ text-align: left;
+}
+
+.first {
+ margin-top: 0 !important;
+}
+
+p.rubric {
+ margin-top: 30px;
+ font-weight: bold;
+}
+
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
+ clear: left;
+ float: left;
+ margin-right: 1em;
+}
+
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
+ clear: right;
+ float: right;
+ margin-left: 1em;
+}
+
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+img.align-default, figure.align-default, .figure.align-default {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.align-left {
+ text-align: left;
+}
+
+.align-center {
+ text-align: center;
+}
+
+.align-default {
+ text-align: center;
+}
+
+.align-right {
+ text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar,
+aside.sidebar {
+ margin: 0 0 0.5em 1em;
+ border: 1px solid #ddb;
+ padding: 7px;
+ background-color: #ffe;
+ width: 40%;
+ float: right;
+ clear: right;
+ overflow-x: auto;
+}
+
+p.sidebar-title {
+ font-weight: bold;
+}
+
+div.admonition, div.topic, blockquote {
+ clear: left;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+div.topic {
+ border: 1px solid #ccc;
+ padding: 7px;
+ margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+ margin-top: 10px;
+ margin-bottom: 10px;
+ padding: 7px;
+}
+
+div.admonition dt {
+ font-weight: bold;
+}
+
+p.admonition-title {
+ margin: 0px 10px 5px 0px;
+ font-weight: bold;
+}
+
+div.body p.centered {
+ text-align: center;
+ margin-top: 25px;
+}
+
+/* -- content of sidebars/topics/admonitions -------------------------------- */
+
+div.sidebar > :last-child,
+aside.sidebar > :last-child,
+div.topic > :last-child,
+div.admonition > :last-child {
+ margin-bottom: 0;
+}
+
+div.sidebar::after,
+aside.sidebar::after,
+div.topic::after,
+div.admonition::after,
+blockquote::after {
+ display: block;
+ content: '';
+ clear: both;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border: 0;
+ border-collapse: collapse;
+}
+
+table.align-center {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+table.align-default {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+table caption span.caption-number {
+ font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+ padding: 1px 8px 1px 5px;
+ border-top: 0;
+ border-left: 0;
+ border-right: 0;
+ border-bottom: 1px solid #aaa;
+}
+
+table.footnote td, table.footnote th {
+ border: 0 !important;
+}
+
+th {
+ text-align: left;
+ padding-right: 5px;
+}
+
+table.citation {
+ border-left: solid 1px gray;
+ margin-left: 1px;
+}
+
+table.citation td {
+ border-bottom: none;
+}
+
+th > :first-child,
+td > :first-child {
+ margin-top: 0px;
+}
+
+th > :last-child,
+td > :last-child {
+ margin-bottom: 0px;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure, figure {
+ margin: 0.5em;
+ padding: 0.5em;
+}
+
+div.figure p.caption, figcaption {
+ padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
+ font-style: italic;
+}
+
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+ border: 0 !important;
+}
+
+.field-list ul {
+ margin: 0;
+ padding-left: 1em;
+}
+
+.field-list p {
+ margin: 0;
+}
+
+.field-name {
+ -moz-hyphens: manual;
+ -ms-hyphens: manual;
+ -webkit-hyphens: manual;
+ hyphens: manual;
+}
+
+/* -- hlist styles ---------------------------------------------------------- */
+
+table.hlist {
+ margin: 1em 0;
+}
+
+table.hlist td {
+ vertical-align: top;
+}
+
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+ font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+ background-color: transparent;
+ font-weight: bold;
+}
+
+.sig-name {
+ font-size: 1.1em;
+}
+
+code.descname {
+ font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+ background-color: transparent;
+}
+
+.optional {
+ font-size: 1.3em;
+}
+
+.sig-paren {
+ font-size: larger;
+}
+
+.sig-param.n {
+ font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+ font-family: unset;
+}
+
+.sig.c .k, .sig.c .kt,
+.sig.cpp .k, .sig.cpp .kt {
+ color: #0033B3;
+}
+
+.sig.c .m,
+.sig.cpp .m {
+ color: #1750EB;
+}
+
+.sig.c .s, .sig.c .sc,
+.sig.cpp .s, .sig.cpp .sc {
+ color: #067D17;
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+ list-style: decimal;
+}
+
+ol.loweralpha {
+ list-style: lower-alpha;
+}
+
+ol.upperalpha {
+ list-style: upper-alpha;
+}
+
+ol.lowerroman {
+ list-style: lower-roman;
+}
+
+ol.upperroman {
+ list-style: upper-roman;
+}
+
+:not(li) > ol > li:first-child > :first-child,
+:not(li) > ul > li:first-child > :first-child {
+ margin-top: 0px;
+}
+
+:not(li) > ol > li:last-child > :last-child,
+:not(li) > ul > li:last-child > :last-child {
+ margin-bottom: 0px;
+}
+
+ol.simple ol p,
+ol.simple ul p,
+ul.simple ol p,
+ul.simple ul p {
+ margin-top: 0;
+}
+
+ol.simple > li:not(:first-child) > p,
+ul.simple > li:not(:first-child) > p {
+ margin-top: 0;
+}
+
+ol.simple p,
+ul.simple p {
+ margin-bottom: 0;
+}
+
+dl.footnote > dt,
+dl.citation > dt {
+ float: left;
+ margin-right: 0.5em;
+}
+
+dl.footnote > dd,
+dl.citation > dd {
+ margin-bottom: 0em;
+}
+
+dl.footnote > dd:after,
+dl.citation > dd:after {
+ content: "";
+ clear: both;
+}
+
+dl.field-list {
+ display: grid;
+ grid-template-columns: fit-content(30%) auto;
+}
+
+dl.field-list > dt {
+ font-weight: bold;
+ word-break: break-word;
+ padding-left: 0.5em;
+ padding-right: 5px;
+}
+
+dl.field-list > dt:after {
+ content: ":";
+}
+
+dl.field-list > dd {
+ padding-left: 0.5em;
+ margin-top: 0em;
+ margin-left: 0em;
+ margin-bottom: 0em;
+}
+
+dl {
+ margin-bottom: 15px;
+}
+
+dd > :first-child {
+ margin-top: 0px;
+}
+
+dd ul, dd table {
+ margin-bottom: 10px;
+}
+
+dd {
+ margin-top: 3px;
+ margin-bottom: 10px;
+ margin-left: 30px;
+}
+
+dl > dd:last-child,
+dl > dd:last-child > :last-child {
+ margin-bottom: 0;
+}
+
+dt:target, span.highlighted {
+ background-color: #fbe54e;
+}
+
+rect.highlighted {
+ fill: #fbe54e;
+}
+
+dl.glossary dt {
+ font-weight: bold;
+ font-size: 1.1em;
+}
+
+.versionmodified {
+ font-style: italic;
+}
+
+.system-message {
+ background-color: #fda;
+ padding: 5px;
+ border: 3px solid red;
+}
+
+.footnote:target {
+ background-color: #ffa;
+}
+
+.line-block {
+ display: block;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+.line-block .line-block {
+ margin-top: 0;
+ margin-bottom: 0;
+ margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+ font-family: sans-serif;
+}
+
+.accelerator {
+ text-decoration: underline;
+}
+
+.classifier {
+ font-style: oblique;
+}
+
+.classifier:before {
+ font-style: normal;
+ margin: 0.5em;
+ content: ":";
+}
+
+abbr, acronym {
+ border-bottom: dotted 1px;
+ cursor: help;
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+ overflow: auto;
+ overflow-y: hidden; /* fixes display issues on Chrome browsers */
+}
+
+pre, div[class*="highlight-"] {
+ clear: both;
+}
+
+span.pre {
+ -moz-hyphens: none;
+ -ms-hyphens: none;
+ -webkit-hyphens: none;
+ hyphens: none;
+}
+
+div[class*="highlight-"] {
+ margin: 1em 0;
+}
+
+td.linenos pre {
+ border: 0;
+ background-color: transparent;
+ color: #aaa;
+}
+
+table.highlighttable {
+ display: block;
+}
+
+table.highlighttable tbody {
+ display: block;
+}
+
+table.highlighttable tr {
+ display: flex;
+}
+
+table.highlighttable td {
+ margin: 0;
+ padding: 0;
+}
+
+table.highlighttable td.linenos {
+ padding-right: 0.5em;
+}
+
+table.highlighttable td.code {
+ flex: 1;
+ overflow: hidden;
+}
+
+.highlight .hll {
+ display: block;
+}
+
+div.highlight pre,
+table.highlighttable pre {
+ margin: 0;
+}
+
+div.code-block-caption + div {
+ margin-top: 0;
+}
+
+div.code-block-caption {
+ margin-top: 1em;
+ padding: 2px 5px;
+ font-size: small;
+}
+
+div.code-block-caption code {
+ background-color: transparent;
+}
+
+table.highlighttable td.linenos,
+span.linenos,
+div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
+ user-select: none;
+ -webkit-user-select: text; /* Safari fallback only */
+ -webkit-user-select: none; /* Chrome/Safari */
+ -moz-user-select: none; /* Firefox */
+ -ms-user-select: none; /* IE10+ */
+}
+
+div.code-block-caption span.caption-number {
+ padding: 0.1em 0.3em;
+ font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+ margin: 1em 0;
+}
+
+code.xref, a code {
+ background-color: transparent;
+ font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+ background-color: transparent;
+}
+
+.viewcode-link {
+ float: right;
+}
+
+.viewcode-back {
+ float: right;
+ font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+ margin: -1px -10px;
+ padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+ vertical-align: middle;
+}
+
+div.body div.math p {
+ text-align: center;
+}
+
+span.eqno {
+ float: right;
+}
+
+span.eqno a.headerlink {
+ position: absolute;
+ z-index: 1;
+}
+
+div.math:hover a.headerlink {
+ visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+ div.document,
+ div.documentwrapper,
+ div.bodywrapper {
+ margin: 0 !important;
+ width: 100%;
+ }
+
+ div.sphinxsidebar,
+ div.related,
+ div.footer,
+ #top-link {
+ display: none;
+ }
+}
\ No newline at end of file
diff --git a/doc/build/_static/custom.css b/doc/build/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/doc/build/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/doc/build/_static/doctools.js b/doc/build/_static/doctools.js
new file mode 100644
index 0000000..61ac9d2
--- /dev/null
+++ b/doc/build/_static/doctools.js
@@ -0,0 +1,321 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for all documentation.
+ *
+ * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/**
+ * select a different prefix for underscore
+ */
+$u = _.noConflict();
+
+/**
+ * make the code below compatible with browsers without
+ * an installed firebug like debugger
+if (!window.console || !console.firebug) {
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
+ "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
+ "profile", "profileEnd"];
+ window.console = {};
+ for (var i = 0; i < names.length; ++i)
+ window.console[names[i]] = function() {};
+}
+ */
+
+/**
+ * small helper function to urldecode strings
+ *
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
+ */
+jQuery.urldecode = function(x) {
+ if (!x) {
+ return x
+ }
+ return decodeURIComponent(x.replace(/\+/g, ' '));
+};
+
+/**
+ * small helper function to urlencode strings
+ */
+jQuery.urlencode = encodeURIComponent;
+
+/**
+ * This function returns the parsed url parameters of the
+ * current request. Multiple values per key are supported,
+ * it will always return arrays of strings for the value parts.
+ */
+jQuery.getQueryParameters = function(s) {
+ if (typeof s === 'undefined')
+ s = document.location.search;
+ var parts = s.substr(s.indexOf('?') + 1).split('&');
+ var result = {};
+ for (var i = 0; i < parts.length; i++) {
+ var tmp = parts[i].split('=', 2);
+ var key = jQuery.urldecode(tmp[0]);
+ var value = jQuery.urldecode(tmp[1]);
+ if (key in result)
+ result[key].push(value);
+ else
+ result[key] = [value];
+ }
+ return result;
+};
+
+/**
+ * highlight a given string on a jquery object by wrapping it in
+ * span elements with the given class name.
+ */
+jQuery.fn.highlightText = function(text, className) {
+ function highlight(node, addItems) {
+ if (node.nodeType === 3) {
+ var val = node.nodeValue;
+ var pos = val.toLowerCase().indexOf(text);
+ if (pos >= 0 &&
+ !jQuery(node.parentNode).hasClass(className) &&
+ !jQuery(node.parentNode).hasClass("nohighlight")) {
+ var span;
+ var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
+ if (isInSVG) {
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ } else {
+ span = document.createElement("span");
+ span.className = className;
+ }
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+ node.parentNode.insertBefore(span, node.parentNode.insertBefore(
+ document.createTextNode(val.substr(pos + text.length)),
+ node.nextSibling));
+ node.nodeValue = val.substr(0, pos);
+ if (isInSVG) {
+ var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
+ var bbox = node.parentElement.getBBox();
+ rect.x.baseVal.value = bbox.x;
+ rect.y.baseVal.value = bbox.y;
+ rect.width.baseVal.value = bbox.width;
+ rect.height.baseVal.value = bbox.height;
+ rect.setAttribute('class', className);
+ addItems.push({
+ "parent": node.parentNode,
+ "target": rect});
+ }
+ }
+ }
+ else if (!jQuery(node).is("button, select, textarea")) {
+ jQuery.each(node.childNodes, function() {
+ highlight(this, addItems);
+ });
+ }
+ }
+ var addItems = [];
+ var result = this.each(function() {
+ highlight(this, addItems);
+ });
+ for (var i = 0; i < addItems.length; ++i) {
+ jQuery(addItems[i].parent).before(addItems[i].target);
+ }
+ return result;
+};
+
+/*
+ * backward compatibility for jQuery.browser
+ * This will be supported until firefox bug is fixed.
+ */
+if (!jQuery.browser) {
+ jQuery.uaMatch = function(ua) {
+ ua = ua.toLowerCase();
+
+ var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
+ /(webkit)[ \/]([\w.]+)/.exec(ua) ||
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
+ /(msie) ([\w.]+)/.exec(ua) ||
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
+ [];
+
+ return {
+ browser: match[ 1 ] || "",
+ version: match[ 2 ] || "0"
+ };
+ };
+ jQuery.browser = {};
+ jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
+}
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+var Documentation = {
+
+ init : function() {
+ this.fixFirefoxAnchorBug();
+ this.highlightSearchWords();
+ this.initIndexTable();
+ if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
+ this.initOnKeyListeners();
+ }
+ },
+
+ /**
+ * i18n support
+ */
+ TRANSLATIONS : {},
+ PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
+ LOCALE : 'unknown',
+
+ // gettext and ngettext don't access this so that the functions
+ // can safely bound to a different name (_ = Documentation.gettext)
+ gettext : function(string) {
+ var translated = Documentation.TRANSLATIONS[string];
+ if (typeof translated === 'undefined')
+ return string;
+ return (typeof translated === 'string') ? translated : translated[0];
+ },
+
+ ngettext : function(singular, plural, n) {
+ var translated = Documentation.TRANSLATIONS[singular];
+ if (typeof translated === 'undefined')
+ return (n == 1) ? singular : plural;
+ return translated[Documentation.PLURALEXPR(n)];
+ },
+
+ addTranslations : function(catalog) {
+ for (var key in catalog.messages)
+ this.TRANSLATIONS[key] = catalog.messages[key];
+ this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
+ this.LOCALE = catalog.locale;
+ },
+
+ /**
+ * add context elements like header anchor links
+ */
+ addContextElements : function() {
+ $('div[id] > :header:first').each(function() {
+ $('').
+ attr('href', '#' + this.id).
+ attr('title', _('Permalink to this headline')).
+ appendTo(this);
+ });
+ $('dt[id]').each(function() {
+ $('').
+ attr('href', '#' + this.id).
+ attr('title', _('Permalink to this definition')).
+ appendTo(this);
+ });
+ },
+
+ /**
+ * workaround a firefox stupidity
+ * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
+ */
+ fixFirefoxAnchorBug : function() {
+ if (document.location.hash && $.browser.mozilla)
+ window.setTimeout(function() {
+ document.location.href += '';
+ }, 10);
+ },
+
+ /**
+ * highlight the search words provided in the url in the text
+ */
+ highlightSearchWords : function() {
+ var params = $.getQueryParameters();
+ var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
+ if (terms.length) {
+ var body = $('div.body');
+ if (!body.length) {
+ body = $('body');
+ }
+ window.setTimeout(function() {
+ $.each(terms, function() {
+ body.highlightText(this.toLowerCase(), 'highlighted');
+ });
+ }, 10);
+ $('
' + _('Hide Search Matches') + '
')
+ .appendTo($('#searchbox'));
+ }
+ },
+
+ /**
+ * init the domain index toggle buttons
+ */
+ initIndexTable : function() {
+ var togglers = $('img.toggler').click(function() {
+ var src = $(this).attr('src');
+ var idnum = $(this).attr('id').substr(7);
+ $('tr.cg-' + idnum).toggle();
+ if (src.substr(-9) === 'minus.png')
+ $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
+ else
+ $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
+ }).css('display', '');
+ if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
+ togglers.click();
+ }
+ },
+
+ /**
+ * helper function to hide the search marks again
+ */
+ hideSearchWords : function() {
+ $('#searchbox .highlight-link').fadeOut(300);
+ $('span.highlighted').removeClass('highlighted');
+ },
+
+ /**
+ * make the url absolute
+ */
+ makeURL : function(relativeURL) {
+ return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
+ },
+
+ /**
+ * get the current relative url
+ */
+ getCurrentURL : function() {
+ var path = document.location.pathname;
+ var parts = path.split(/\//);
+ $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
+ if (this === '..')
+ parts.pop();
+ });
+ var url = parts.join('/');
+ return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
+ },
+
+ initOnKeyListeners: function() {
+ $(document).keydown(function(event) {
+ var activeElementType = document.activeElement.tagName;
+ // don't navigate when in search box, textarea, dropdown or button
+ if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
+ && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
+ && !event.shiftKey) {
+ switch (event.keyCode) {
+ case 37: // left
+ var prevHref = $('link[rel="prev"]').prop('href');
+ if (prevHref) {
+ window.location.href = prevHref;
+ return false;
+ }
+ case 39: // right
+ var nextHref = $('link[rel="next"]').prop('href');
+ if (nextHref) {
+ window.location.href = nextHref;
+ return false;
+ }
+ }
+ }
+ });
+ }
+};
+
+// quick alias for translations
+_ = Documentation.gettext;
+
+$(document).ready(function() {
+ Documentation.init();
+});
diff --git a/doc/build/_static/documentation_options.js b/doc/build/_static/documentation_options.js
new file mode 100644
index 0000000..4daa6b5
--- /dev/null
+++ b/doc/build/_static/documentation_options.js
@@ -0,0 +1,12 @@
+var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
+ VERSION: '',
+ LANGUAGE: 'en',
+ COLLAPSE_INDEX: false,
+ BUILDER: 'html',
+ FILE_SUFFIX: '.html',
+ LINK_SUFFIX: '.html',
+ HAS_SOURCE: true,
+ SOURCELINK_SUFFIX: '.txt',
+ NAVIGATION_WITH_KEYS: false
+};
\ No newline at end of file
diff --git a/doc/build/_static/file.png b/doc/build/_static/file.png
new file mode 100644
index 0000000..a858a41
Binary files /dev/null and b/doc/build/_static/file.png differ
diff --git a/doc/build/_static/jquery-3.5.1.js b/doc/build/_static/jquery-3.5.1.js
new file mode 100644
index 0000000..5093733
--- /dev/null
+++ b/doc/build/_static/jquery-3.5.1.js
@@ -0,0 +1,10872 @@
+/*!
+ * jQuery JavaScript Library v3.5.1
+ * https://jquery.com/
+ *
+ * Includes Sizzle.js
+ * https://sizzlejs.com/
+ *
+ * Copyright JS Foundation and other contributors
+ * Released under the MIT license
+ * https://jquery.org/license
+ *
+ * Date: 2020-05-04T22:49Z
+ */
+( function( global, factory ) {
+
+ "use strict";
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get jQuery.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info.
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
+// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
+// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
+// enough that all such attempts are guarded in a try block.
+"use strict";
+
+var arr = [];
+
+var getProto = Object.getPrototypeOf;
+
+var slice = arr.slice;
+
+var flat = arr.flat ? function( array ) {
+ return arr.flat.call( array );
+} : function( array ) {
+ return arr.concat.apply( [], array );
+};
+
+
+var push = arr.push;
+
+var indexOf = arr.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var fnToString = hasOwn.toString;
+
+var ObjectFunctionString = fnToString.call( Object );
+
+var support = {};
+
+var isFunction = function isFunction( obj ) {
+
+ // Support: Chrome <=57, Firefox <=52
+ // In some browsers, typeof returns "function" for HTML