diff --git a/doc/archetypes/default.md b/doc/archetypes/default.md deleted file mode 100644 index 00e77bd..0000000 --- a/doc/archetypes/default.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- - diff --git a/doc/config.toml b/doc/config.toml deleted file mode 100644 index 56aef8c..0000000 --- a/doc/config.toml +++ /dev/null @@ -1,57 +0,0 @@ -baseURL = 'https://doc.cuates.net/easymacro' -languageCode = 'en-us' -title = "EasyMacro's documentation" - -theme = "hugo-theme-learn" - -# For search functionality -[outputs] -home = [ "HTML", "RSS", "JSON"] - -[params] -themeVariant = "blue" -custom_css = ["css/custom.css"] - -defaultContentLanguage = "en" -defaultContentLanguageInSubdir= true - -[Languages] - -[Languages.en] - contentDir = "content/en" - title = "EasyMacro's documentation" - weight = 1 - languageName = "English" - landingPageURL = "/en" - landingPageName = " Home" - staticDir2 = "images_en" - -[Languages.es] - contentDir = 'content/es' - title = "Documentación para EasyMacro" - weight = 2 - languageName = "Español" - landingPageURL = "/easymacro/es" - landingPageName = " Inicio" - -[Languages.pt] - contentDir = 'content/pt' - title = "Documentação para EasyMacro" - weight = 3 - languageName = "Português" - landingPageURL = "/pt" - landingPageName = " Inicio" - -[Languages.fr] - contentDir = 'content/fr' - title = "Documentation du EasyMacro" - weight = 4 - languageName = "Français" - landingPageURL = "/fr" - landingPageName = " Accueil" - -[[menu.shortcuts]] -name = " Git Repo" -url = "https://git.cuates.net/elmau/easymacro" -weight = 10 - diff --git a/doc/content/en/_index.md b/doc/content/en/_index.md deleted file mode 100644 index c088900..0000000 --- a/doc/content/en/_index.md +++ /dev/null @@ -1,15 +0,0 @@ -# Welcome to easymacro’s documentation! - - -#### Free Software, not gratis software - - -**easymacro** 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, you will be more happy if used it. :) - -You can used **easymacro** with any extension or directly in your macros. - -{{% notice note %}} -This project is in continuous development. -{{% /notice %}} diff --git a/doc/content/en/installation/_index.md b/doc/content/en/installation/_index.md deleted file mode 100644 index 18a7039..0000000 --- a/doc/content/en/installation/_index.md +++ /dev/null @@ -1,51 +0,0 @@ -+++ -title = "Installation" -weight = 1 -+++ - -## Clone repository - -Clone repository in your favorite folder projects. - -``` -git clone https://git.cuates.net/elmau/easymacro -``` - -and copy library into pythonpath in your macros. - -``` -/home/USER/.config/libreoffice/4/user/Scripts/python/pythonpath/easymacro.py -``` - -or used hard link. Replace `ABSOLUTE_PATH` for absolute path in your system and `USER` for your real name user. - -``` -ln ABSOLUTE_PATH/easymacro/source/easymacro.py /home/USER/.config/libreoffice/4/user/Scripts/python/pythonpath/ -``` - - -## Test - -In your favorite macros file, for example `mymacros.py`: - -``` -vim /home/USER/.config/libreoffice/4/user/Scripts/python/mymacros.py -``` - -copy this code: - -```python -import easymacro as app - -def main(): - app.msgbox(app.INFO_DEBUG) - return -``` - -and execute from LibreOffice, if you see similar next info, great! - -![Test instalation](install_01.png) - -you are ready for develop with easymacro. - -Happy develop! diff --git a/doc/content/en/installation/install_01.png b/doc/content/en/installation/install_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/content/en/installation/install_01.png and /dev/null differ diff --git a/doc/content/en/tools_debug/_index.md b/doc/content/en/tools_debug/_index.md deleted file mode 100644 index ee3c290..0000000 --- a/doc/content/en/tools_debug/_index.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = "Tools for debug" -weight = 2 -+++ - -## INFO_DEBUG - diff --git a/doc/content/es/_index.md b/doc/content/es/_index.md deleted file mode 100644 index f42bf5d..0000000 --- a/doc/content/es/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Documentación de easymacro! - -#### Software Libre, no software gratis. - -**easymacro** es una librería para desarrollar más fácilmente macros en LibreOffice con Python. Es una capa de abstracción entre la extensa y compleja API UNO de LibreOffice y tu código. - -Probablemente, será más feliz si la usa :) - -Puede utilizar **easymacro** con cualquier extensión o directamente en sus macros. - -Aportaciones en Junas (G1) - -``` -A5DdXxCKPw3QKWVdDVs7CzkNugNUW1sHu5zDJFWxCU2h -``` - -{{% notice note %}} -Este proyecto esta en continuo desarrollo. -{{% /notice %}} diff --git a/doc/content/es/application/_index.md b/doc/content/es/application/_index.md deleted file mode 100644 index ac5049c..0000000 --- a/doc/content/es/application/_index.md +++ /dev/null @@ -1,137 +0,0 @@ -+++ -title = "LibreOffice" -weight = 4 -+++ - -### fonts - -Devolver todas las fuentes visibles en LibreOffice. Mire [FontDescriptor][1] - -```python -fonts = app.fonts() -for f in fonts: - app.debug(f'Nombre: {f.Name} - Estilo: {f.StyleName}') -``` - - -### filters - -Devolver todos los filtros soportados en LibreOffice. Mire la [ayuda][2] y en [API FilterFactory][3] para más detalles. - -```python -filtros = app.filters() -for f in filtros: - info = f"Nombre UI: {f['UIName']} - Nombre: {f['Name']} - Tipo: {f['Type']}" - app.debug(info) -``` - - -### dispatch - -Ejecutar cualquier comando `UNO` de LibreOffice, mire la [lista de comandos][4] y [API dispatch][5]. - -Este método automáticamente agrega el prefijo necesario: `.uno:` - -```python -doc = app.active -comando = 'Gallery' -app.dispatch(doc, comando) -``` - -{{% notice tip %}} -Use este método solamente si no hay un método equivalente en `easymacro` o directamente en el API de LibreOffice. -{{% /notice %}} - - -### clipboard - -Envíar contenido al portapapeles. - -```python -app.clipboard.set('Los 7 samuráis') -``` - -Recuperar contenido del portapapeles. - -```python -content = app.clipboard.get() -app.debug(content) -``` - -### disable - -Deshabilitar un comando. Para una lista de comandos mire [DispatchCommands][4]. - -```python -comando = 'OpenFromCalc' -resultado = app.cmd.disable(comando) -app.debug(resultado) -``` - -`OpenFromCalc` es la opción para abrir documentos en Calc, deshabilita o habilita la entrada del menú y el icono en la barra de herramientas. - -### enabled - -Habilitar un comando. - -```python -comando = 'OpenFromCalc' -resultado = app.cmd.enabled(comando) -app.debug(resultado) -``` - -### get_config - -Obtener valores de la configuración de LibreOffice. - -```python -nombre_node = '/org.openoffice.Office.Common/Help' -clave = 'System' -valor = app.get_config(nombre_node, clave) -app.debug(valor) - -nombre_node = '/org.openoffice.Office.Common/Misc/' -clave = 'FirstRun' -valor = app.get_config(nombre_node, clave) -app.debug(valor) - -clave = 'UseSystemFileDialog' -valor = app.get_config(nombre_node, clave) -app.debug(valor) -``` - -``` -17/08/2022 14:14:12 - DEBUG - UNIX -17/08/2022 14:14:12 - DEBUG - False -17/08/2022 14:14:12 - DEBUG - True -``` - -### set_config - -Establece un nuevo valor en la configuración de LibreOffice. - -```python -nombre_nodo = '/org.openoffice.Office.UI/ColorScheme' -clave = 'CurrentColorScheme' -nuevo_valor = 'LibreOffice Dark' -resultado = app.set_config(nombre_nodo, clave, nuevo_valor) -app.debug(resultado) -``` - -Algunos nodos y claves interesantes: - -* `/org.openoffice.Office.Common/Save/Document` - * AutoSave - * AutoSaveTimeIntervall - - -{{% notice warning %}} -No todos los valores de los nodos se pueden cambiar, algunos valores son de solo lectura. -{{% /notice %}} - - -[1]: https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1awt_1_1FontDescriptor.html -[2]: https://help.libreoffice.org/latest/en-US/text/shared/guide/convertfilters.html -[3]: https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1document_1_1FilterFactory.html -[4]: https://wiki.documentfoundation.org/Development/DispatchCommands -[5]: https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1frame_1_1XDispatch.html#a42beb1ea2ddae35c076b6e65867025ea diff --git a/doc/content/es/application/shortcuts/_index.md b/doc/content/es/application/shortcuts/_index.md deleted file mode 100644 index 3d37ad0..0000000 --- a/doc/content/es/application/shortcuts/_index.md +++ /dev/null @@ -1,114 +0,0 @@ -+++ -title = "Accesos directos" -weight = 1 -+++ - -#### Globales - -Iterar en todos los accesos directos. Accesos directos disponibles para todas las aplicaciones. - -```python -for acceso_directo, comando in app.shortcuts: - app.debug(acceso_directo, comando) -``` - -Devolver una lista de tuplas con toda la información. - -```python -datos = app.shortcuts.get_all() -app.debug(datos) -``` - -Verificar si un acceso directo esta asignado. - -```python -acceso_directo = 'Shift+Ctrl+Alt+T' -app.debug(acceso_directo in app.shortcuts) -``` - -### set - -Establecer un acceso directo a un comando. - -```python -sc = app.shortcuts -acceso_directo = 'Shift+Ctrl+Alt+T' -comando = 'MacroDialog' -sc.set(acceso_directo, comando) -``` - -Establecer un acceso directo a una macro. - -```python -sc = app.shortcuts -acceso_directo = 'Shift+Ctrl+Alt+M' -macro = {'library': 'test', 'name': 'pruebas'} -sc.set(acceso_directo, macro) -``` - - -### get_by_shortcut - -Devolver el comando asociado a un acceso directo. - -```python -sc = app.shortcuts -acceso_directo = 'Shift+Ctrl+Alt+M' -comando = sc.get_by_shortcut(acceso_directo) -app.debug(comando) -``` - - -### get_by_command - -Devolver el acceso directo asociado a un comando. Puede haber más de uno. - -```python -sc = app.shortcuts -comando = 'MacroDialog' -acceso_directo = sc.get_by_command(comando) -app.debug(acceso_directo) -``` - - -### remove_by_shortcut - -Eliminar por acceso directo. - -```python -sc = app.shortcuts -acceso_directo = 'Shift+Ctrl+Alt+T' -sc.remove_by_shortcut(acceso_directo) -``` - - -### remove_by_command - -Eliminar por comando. - -```python -sc = app.shortcuts -macro = {'library': 'test', 'name': 'pruebas'} -sc.remove_by_command(macro) -``` - -### reset - -Reiniciar todas las modificaciones. - -```python -app.shortcuts.reset() -``` - - -#### Modificar accesos directos, solo en una aplicación. - -Por ejemplo Calc. - -```python -sc = app.shortcuts['calc'] -``` - -Los métodos son los mismos que los globales. - -Para las demas aplicaciones: `writer`, `draw`, `impress`, `math`. diff --git a/doc/content/es/calc/_index.md b/doc/content/es/calc/_index.md deleted file mode 100644 index 9dc5ecb..0000000 --- a/doc/content/es/calc/_index.md +++ /dev/null @@ -1,322 +0,0 @@ -+++ -title = "Calc" -weight = 6 -+++ - -#### Trabajar con Calc - -### active - - -```python -doc = app.active -app.debug(doc.type) -``` - -#### Propiedades - -### headers - -Mostrar u ocultar encabezados de filas y columnas. - -```python -doc = app.active -app.msgbox(doc.headers) -doc.headers = not doc.headers -app.msgbox(doc.headers) -doc.headers = not doc.headers -``` - - -### tabs - -Mostrar u ocultar las pestañas de las hojas. - -```python -doc = app.active -app.msgbox(doc.tabs) -doc.tabs = not doc.tabs -app.msgbox(doc.tabs) -doc.tabs = not doc.tabs -``` - -### selection - -Devolver la selección activa. - -```python -doc = app.active -seleccion = doc.selection -app.debug(seleccion) -``` - -{{% notice warning %}} -**Cuidado**, la selección actual pueden ser muchas cosas diferentes. -{{% /notice %}} - - -### names - -Devolver una tupla con los nombres de todas las hojas. - -```python -doc = app.active -nombres = doc.names -app.debug(nombres) -``` - -### active - -Devuelve la hoja activa. - -```python -doc = app.active -hoja = doc.active -app.debug(hoja) -``` - - -#### Métodos - -### activate - -Activar hoja, argumento como objeto. - -```python -doc = app.active -hoja = doc[-1] -doc.activate(hoja) -``` - -Activar hoja por nombre. - -```python -doc = app.active -doc.activate('Hoja3') -``` - - -### select - -Seleccionar una celda o rango. - -```python -doc = app.active -cell = doc[0]['A1'] -doc.select(cell) -``` - -{{% notice tip %}} -**NO** es necesario seleccionar celdas o rangos para manipularlos. -{{% /notice %}} - - -### start_range_selection - -Permitir al usuario seleccionar un rango. Es necesario pasarle una clase con el nombre que prefiera (`Eventos` es recomendable) con dos métodos para procesar la captura como en el siguiente ejemplo: - -```python -class Eventos(): - - def __init__(self, doc): - self.doc = doc - - def range_selection_done(self, range_selection): - if range_selection: - app.debug(range_selection) - self.doc.remove_range_selection_listener() - return - - def range_selection_aborted(self): - self.doc.remove_range_selection_listener() - return - - -def main(): - doc = app.active - doc.start_range_selection(Eventos) - return -``` - -### insert - -Inserta una nueva hoja. - -```python -doc = app.active -hoja = doc.insert('OtraHoja') -``` - -Insertar varias hojas. Devolverá la última insertada. - -```python -nombres = ('Enero', 'Febrero', 'Marzo') -hoja = doc.insert(nombres) -app.debug(hoja) -``` - -Creando una nueva instancia y asignandola. - -```python - doc = app.active - doc['NuevaHoja'] = doc.new_sheet() -``` - -{{% notice warning %}} -Si la hoja existe, obtendrá un error, verifique siempre que no exista primero. -{{% /notice %}} - - -### move - -Mover hojas. - -Pasar la hoja como objeto, de forma predetermianda se mueve a la última posición. - -```python -doc = app.active -hoja = doc[0] -doc.move(hoja) -``` - -Pasar la hoja por nombre. - -```python -doc = app.active -doc.move('Hoja1') -``` - -Especificar la posición destino. - -```python -doc = app.active -hoja = doc[0] -doc.move(hoja, 2) -``` - - -### remove - -Eliminar hoja. - -```python -doc = app.active -sheet = doc[0] - -doc.remove(sheet) -``` - -Eliminar por nombre. - -```python -doc.remove('Hoja2') -``` - - -### copy - -Copiar hoja dentro del mismo documento. - -```python -doc = app.active -hoja = doc[0] - -doc.copy_sheet(hoja, 'Otra hoja') -``` - -Por nombre. - -```python -doc.copy_sheet('Hoja1', 'Hoja2') -``` - -Si no se establece el nuevo nombre, se generá de forma automática: `nombre + índice`. - -```python -doc.copy_sheet(hoja) -``` - - -### copy_from - -Copiar hojas de otro documento. Copiar con el mismo nombre. - -```python -doc = app.active -documento_origen = app.docs['Contactos.ods'] -nombre_origen = 'Nombres' - -doc.copy_from(documento_origen, nombre_origen) -``` - -Copiar con un nuevo nombre. - -```python -doc.copy_from(documento_origen, nombre_origen, 'NuevoNombre') -``` - -Si solo se establece el documento origen, se copian todas las hojas. - -```python -doc.copy_from(documento_origen) -``` - - -### sort - -Ordenar hojas en orden alfabetico. - -```python -doc = app.active -doc.sort() -``` - -Ordenar de forma inversa. - -```python -doc = app.active -doc.sort(True) -``` - - -### Eventos del documento. - -Obtener una tupla con los eventos soportados por el documento. - -```python -doc = app.active -nombres = doc.events.names -app.debug(nombres) -``` - -#### Asignar una macro a un evento. - -```python -def doc_on_focus(event): - app.debug('Documento activado...') - return - - -def main(): - doc = app.active - events = doc.events - if 'OnFocus' in events: - macro = {'library': 'test', 'name': 'doc_on_focus'} - events['OnFocus'] = macro - return -``` - -#### Eliminar la asignación del evento. - -```python -doc = app.active -doc.events['OnFocus'] = {} -``` - -O - -```python -doc = app.active -doc.events.remove('OnFocus') -``` - diff --git a/doc/content/es/calc/cells/_index.md b/doc/content/es/calc/cells/_index.md deleted file mode 100644 index 55c5ce1..0000000 --- a/doc/content/es/calc/cells/_index.md +++ /dev/null @@ -1,85 +0,0 @@ -+++ -title = "Celdas y rangos" -weight = 3 -+++ - -#### Trabajar con celdas y rangos - -### selection - -Referencia por selección actual. - -```python -seleccion = app.selection -app.debug(seleccion) -``` - -``` -20/08/2022 15:32:36 - DEBUG - Cell: $Sheet1.$A$2 -20/08/2022 15:32:39 - DEBUG - Range: $Sheet1.$C$8:$D$11 -``` - -### address - -Referencia por dirección. - -```python -hoja = app.active_sheet -celda = hoja['A1'] -rango = hoja['C10:D15'] - -app.debug(celda) -app.debug(rango) -``` - - -### position - -Referencia por posición. - -Para celdas: `HOJA[fila,columna]` - -Para rangos: `HOJA[fila_inicial:fila_final, columna_inicial:columna_final]` - - -```python -hoja = app.active_sheet - -# ~ Cell A10 -celda = hoja[9,0] - -# ~ Range A1:C10 -rango = hoja[0:10,0:3] -``` - - -### iter - -Iterar cada celda de un rango. - -```python -hoja = app.active_sheet -rango = hoja['B10:C15'] - -for celda in rango: - app.debug(celda) -``` - - -### contains - -Verificar si un rango esta dentro de otro. - -```python -hoja = app.active_sheet - -celda = hoja['C5'] -rango = hoja['A1:E10'] - -resultado = celda in rango -app.debug(resultado) - -celda = hoja['C50'] -resultado = celda in rango -app.debug(resultado) -``` diff --git a/doc/content/es/calc/cells/methods/_index.md b/doc/content/es/calc/cells/methods/_index.md deleted file mode 100644 index c73bf4a..0000000 --- a/doc/content/es/calc/cells/methods/_index.md +++ /dev/null @@ -1,23 +0,0 @@ -+++ -title = "Métodos" -weight = 2 -+++ - - -### clear - -Limpia el rango. Por default solo borra datos. Mire [API CellFlags][1] para más información. - -```python -rango.clear() -``` - -Para borrar todo. - -```python -rango.clear(app.ALL) -``` - - - -[1]: https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1sheet_1_1CellFlags.html diff --git a/doc/content/es/calc/cells/properties/_index.md b/doc/content/es/calc/cells/properties/_index.md deleted file mode 100644 index 62bf54d..0000000 --- a/doc/content/es/calc/cells/properties/_index.md +++ /dev/null @@ -1,344 +0,0 @@ -+++ -title = "Propiedades" -weight = 1 -+++ - - -### is_cell - -Verdadero (True) si el rango es de una sola celda. - -```python -hoja = app.active_sheet - -celda = hoja['A1'] -app.debug(celda.is_cell) - -rango = hoja['A1:C5'] -app.debug(rango.is_cell) -``` - - -### name - -Devuelve la dirección de la celda o rango como texto. - -```python -hoja = app.active_sheet - -celda = hoja['A1'] -app.debug(celda.name) - -rango = hoja['A1:C5'] -app.debug(rango.name) -``` - - -### address - -Devuelve la dirección de la celda como una estructura: `com.sun.star.table.CellAddress` - -```python -hoja = app.active_sheet - -celda = hoja['A1'] -if celda.is_cell: - app.debug(celda.address) -``` - - -### range_address - -Devuelve la dirección del rango como una estructura: `com.sun.star.table.CellRangeAddress` - -```python -hoja = app.active_sheet - -rango = hoja['A1:C5'] -if not rango.is_cell: - app.debug(rango.range_address) -``` - - -### filas y columnas - -Devolver el tamaño del rango en filas y columnas. - -```python -hoja = app.active_sheet - -rango = hoja['A1:E100'] -filas = len(rango) -columnas = rango.len_columns -app.debug(filas, columnas) -``` - - -### sheet - -Devuelve la hoja padre. - -```python -rango = hoja['A1:C5'] - -hoja = rango.sheet -app.debug(hoja) -``` - - -### doc - -Devuelve el documento padre. - -```python -rango = hoja['A1:C5'] - -doc = rango.doc -app.debug(doc) -``` - - -### style - -Devuelve o aplica el estilo de celda. - -```python -rango = hoja['A1:C5'] -rango.style = 'Good' -``` - - -### current_region - -Devuelve la región actual. - -```python -celda = hoja['A1'] -rango = celda.current_region -app.debug(rango) -``` - - -### range_data - -Devuelve la región actual del rango excepto la primer fila. - -```python -celda = hoja['A1'] -rango = celda.range_data -app.debug(rango) -``` - - -### back_color - -Devuelve o aplica el color de fondo del rango. - -```python -rango = hoja['A1:E10'] -rango.back_color = 'red' -``` - -### type - -Devuelve el tipo de contenido de la celda: texto, número o formula. - -```python -celda = hoja['A1'] -app.debug(celda.type) -``` - -### error - -Si la celda tiene una formula con error, devuelve el número de error. - -```python -celda = hoja['A1'] -app.debug(celda.error) -``` - - -### string - -Devuelve o establece el contenido de la celda como texto. - -```python -celda = hoja['A1'] -celda.string = 'Maldito Mundo' -app.debug(celda.type, celda.string) - -celda = hoja['A2'] -celda.string = 12345 -app.debug(celda.type, celda.string) -``` - - -### float - -Devuelve o establece el contenido de la celda como valor. - -```python -celda = hoja['A1'] -celda.float = 12345 -app.debug(celda.type, celda.float) -``` - - -### formula - -Devuelve o establece la formula de la celda. - -```python -celda = hoja['A1'] -celda.formula = '=RAND()' -app.debug(celda.type, celda.formula) -``` - - -### date - -Devuelve o establece el contenido de la celda como fecha. - -```python -celda = hoja['A1'] -celda.date = app.dates.date(1974, 1, 15) -app.debug(type(celda.date), celda.date) -``` - -``` -20/08/2022 18:38:53 - DEBUG - 1974-01-15 -``` - -### time - -Devuelve o establece el contenido de la celda como tiempo. - -```python -celda = hoja['A1'] -celda.time = app.dates.time(10, 11, 12) -app.debug(type(celda.time), celda.time) -``` - - -### datetime - -Devuelve o establece el contenido de la celda como fecha y tiempo. - -```python -celda = hoja['A1'] -celda.datetime = app.dates.datetime(1974, 1, 15, 10, 11, 12) -app.debug(type(celda.datetime), celda.datetime) -``` - -### value - -Devuelve o establece el valor de la celda, estableciendo el tipo de dato automáticamente. - -```python -hoja = app.active_sheet - -celda = hoja['A1'] -celda.value = 'Soy Texto' -app.debug(celda.type, celda.value) - -celda = hoja['A2'] -celda.value = 12345 -app.debug(celda.type, celda.value) - -celda = hoja['A3'] -celda.value = '=RAND()' -app.debug(celda.type, celda.value) - -celda = hoja['A4'] -celda.value = app.dates.date(1974, 1, 15) -app.debug(celda.type, celda.value) -``` - - -### data_array - -Devuelve o establece los datos de un rango. Es un alias de DataArray. - -```python -rango = app.selection -datos = rango.data_array -app.debug(datos) -rango.data_array = datos -``` - -{{% notice warning %}} -El tamaño de los datos, debe ser **exactamente** del tamaño del rango destino. De lo contrario obtendrá un error. -{{% /notice %}} - - -### formula_array - -Devuelve o establece los datos de un rango. Es un alias de FormulaArray. - -```python -rango = app.selection - -datos = rango.data_array -app.debug(datos) -datos = rango.formula_array -app.debug(datos) -rango.formula_array = datos -``` - -{{% notice tip %}} -**data_array** devolverá los resultados de las celdas con formulas. **formula_array** devolverá las formulas en dichas celdas. -{{% /notice %}} - - -### data - -Alias de `data_array` al obtener los datos. Al establecer los datos, si es un rango se comporta como `data_array`, pero si es una celda, se autoajusta al tamaño de los datos. - -```python -hoja = app.active_sheet -celda = hoja['A1'] -datos = ( - (1, 'Uno'), - (2, 'Dos'), - (3, 'Tres'), -) - -celda.data = datos -app.debug(celda.current_region.data) -``` - -{{% notice tip %}} -Siempre valide que haya suficientes celdas libres para los datos para evitar sobreescribirlos. -{{% /notice %}} - - -### dict - -Devuelve o establece los datos como diccionarios. - -```python -hoja = app.active_sheet -celda = hoja['A1'] - -datos = ( - {'No': 1, 'Nombre': 'Ingrid'}, - {'No': 2, 'Nombre': 'Sophia'}, - {'No': 3, 'Nombre': 'Scarlette'}, -) - -celda.dict = datos -app.debug(celda.current_region.dict) -``` - - -### next_free - -Devuelve la siguiente celda libre después de la región actual. - -```python -hoja = app.active_sheet -celda = hoja['A1'] - -celda_libre = celda.next_free -app.debug(celda_libre) -``` diff --git a/doc/content/es/calc/ranges/_index.md b/doc/content/es/calc/ranges/_index.md deleted file mode 100644 index 75f8852..0000000 --- a/doc/content/es/calc/ranges/_index.md +++ /dev/null @@ -1,83 +0,0 @@ -+++ -title = "Conjuntos de Rangos" -weight = 2 -+++ - -#### Trabajar con conjuntos de rangos - -### Selección - -Obtener una referencia desde la selección actual. Deben de estar seleccionados más de un rango de celdas. - -```python -doc = app.active -seleccion = doc.selection -app.debug(seleccion) -``` - -``` -20/08/2022 13:21:17 - DEBUG - Ranges: ('Sheet1.A5:C8', 'Sheet1.E11:F14') -``` - - -### len - -Contar los rangos. - -```python -doc = app.active -contar = len(doc.selection) -app.debug(contar) -``` - - -### iter - -Iterar entre los rangos. - -```python -doc = app.active -for rango in doc.selection: - app.debug(rango) -``` - -``` -20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$B$4:$D$7 -20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$G$10:$H$14 -``` - - -### index - -Referencia a un rango por índice. - -```python -doc = app.active -rangos = doc.selection - -rango = rangos[1] -app.debug(rango) -``` - -### address - -Referencia a un rango por su dirección. - -```python -rango = rangos['Hoja1.A1:B5'] -app.debug(rango) -``` - - -### contain - -Verificar si un rango esta en la colección. - -```python -doc = app.active -hoja = doc.active -rangos = doc.selection - -resultado = hoja['D5:F10'] in rangos -app.debug(resultado) -``` diff --git a/doc/content/es/calc/ranges/methods/_index.md b/doc/content/es/calc/ranges/methods/_index.md deleted file mode 100644 index dc3b4d6..0000000 --- a/doc/content/es/calc/ranges/methods/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -+++ -title = "Métodos" -weight = 2 -+++ - - -### ranges - -Crear un nuevo contender de rangos vacío. - -```python -doc = app.active -rangos = doc.ranges() -app.debug(rangos) -``` - - -### add - -```python -doc = app.active -hoja = doc.active - -rangos = doc.ranges() -rangos.add(hoja['A1:B2']) -rangos.add(hoja['D5:F10']) -app.debug(rangos) -``` - - -### remove - -```python -rangos.remove(hoja['A1:B2']) -``` - - -### get_ranges - -```python -``` - diff --git a/doc/content/es/calc/ranges/properties/_index.md b/doc/content/es/calc/ranges/properties/_index.md deleted file mode 100644 index e55e4a0..0000000 --- a/doc/content/es/calc/ranges/properties/_index.md +++ /dev/null @@ -1,46 +0,0 @@ -+++ -title = "Propiedades" -weight = 1 -+++ - - -# names - -Devolver las direcciones de los rangos. - -```python -doc = app.active -rangos = doc.selection - -nombres = rangos.names -app.debug(nombres) -``` - - -### data - -Devolver y establecer datos. - -```python -doc = app.active -rangos = doc.selection - -datos = rangos.data -app.debug(datos) -rangos.data = datos -``` - -{{% notice warning %}} -Cada rango debe tener exactamente el mismo tamaño. -{{% /notice %}} - - -### style - -Establecer el estilo de todos los rangos. - -```python -doc = app.active -rangos = doc.selection -rangos.style = 'Good' -``` diff --git a/doc/content/es/calc/sheets/_index.md b/doc/content/es/calc/sheets/_index.md deleted file mode 100644 index f1e1e83..0000000 --- a/doc/content/es/calc/sheets/_index.md +++ /dev/null @@ -1,56 +0,0 @@ -+++ -title = "Hojas" -weight = 1 -+++ - - -#### Trabajar con hojas - -### Referencia por índice - -```python -doc = app.active -hoja = doc[0] -app.debug(hoja.name) -``` - - -### Referencia por nombre - -```python -doc = app.active -hoja = doc['datos'] -app.debug(hoja.name) -``` - -### in - -Verificar por nombre si una hoja existe. - -```python -doc = app.active -existe = 'Hoja2' in doc -app.debug(existe) -``` - -### len - -Contar la cantidad de hojas en el documento. - -```python -doc = app.active -contar = len(doc) -app.debug(contar) -``` - -### iter - -Recorrer todas las hojas. - -```python - doc = app.active - for hoja in doc: - app.debug(hoja) -``` - - diff --git a/doc/content/es/calc/sheets/events/_index.md b/doc/content/es/calc/sheets/events/_index.md deleted file mode 100644 index 5d86f89..0000000 --- a/doc/content/es/calc/sheets/events/_index.md +++ /dev/null @@ -1,48 +0,0 @@ -+++ -title = "Eventos" -weight = 3 -+++ - - -#### Eventos de la hoja. - - -Obtener una tupla con los eventos soportados por la hoja. - -```python -hoja = app.active.active -nombres = hoja.events.names -app.debug(nombres) -``` - -#### Asignar una macro a un evento. - -```python -def on_select(source): - app.debug(source.AbsoluteName) - return - - -def main(): - doc = app.active - hoja = doc.active - - if 'OnSelect' in hoja.events: - macro = {'library': 'test', 'name': 'on_select'} - hoja.events['OnSelect'] = macro - - return -``` - -#### Eliminar la asignación del evento. - -```python -hoja.events['OnSelect'] = {} -``` - -O - -```python -hoja.events.remove('OnFocus') -``` - diff --git a/doc/content/es/calc/sheets/methods/_index.md b/doc/content/es/calc/sheets/methods/_index.md deleted file mode 100644 index 957d013..0000000 --- a/doc/content/es/calc/sheets/methods/_index.md +++ /dev/null @@ -1,101 +0,0 @@ -+++ -title = "Métodos" -weight = 2 -+++ - -### unprotect - -Quitar contraseña. - -```python -hoja = app.active.active - -hoja.password = 'siscaloburropanzon' -app.msgbox(hoja.is_protected) - -hoja.unprotect('siscaloburropanzon') -app.msgbox(hoja.is_protected) -``` - - -### activate - -Pasar el foco a la hoja. - -```python -doc = app.active -hoja = doc[-1] -hoja.activate() -``` - - -### move - -Mover a la última posición. - -```python -doc = app.active -hoja = doc[0] -hoja.move() -``` - -Mover a una posición especifica. - -```python -doc = app.active -hoja = doc[0] -hoja.move(3) -``` - -### remove - -Remover hoja. - -```python -sheet = app.active.active -sheet.remove() -``` - -{{% notice warning %}} -Siempre debe existir al menos una hoja. -{{% /notice %}} - - -### copy - -{{% notice tip %}} -Siempre valida que no exista el nuevo nombre. -{{% /notice %}} - -```python -doc = app.active -hoja = doc[0] - -nuevo_nombre = f'{hoja.name}_2' -if not nuevo_nombre in doc: - hoja.copy(nuevo_nombre) -``` - -Si no se establece el nuevo nombre, se generá de forma automática: `nombre + índice`. - -```python -hoja.copy() -``` - -### copy_to - -Copiar la hoja a otro documento. Se usa el mismo nombre. - -```python -doc = app.active -hoja = doc.active - -documento_nuevo = app.docs.new() -hoja.copy_to(documento_nuevo) -``` - -Usar un nuevo nombre. - -```python -hoja.copy_to(documento_nuevo, 'Nuevo nombre') -``` diff --git a/doc/content/es/calc/sheets/properties/_index.md b/doc/content/es/calc/sheets/properties/_index.md deleted file mode 100644 index 2e94532..0000000 --- a/doc/content/es/calc/sheets/properties/_index.md +++ /dev/null @@ -1,113 +0,0 @@ -+++ -title = "Propiedades" -weight = 1 -+++ - -### doc - -Devuelve al documento Calc donde esta la hoja. - -```python -doc = app.active -hoja = doc.active - -doc = hoja.doc -app.debug(doc.title) -``` - - -### name - -Nombre visible y editable por el usuario. - -```python -doc = app.active -hoja = doc.active - -app.msgbox(hoja.name) -hoja.name = 'Nuevo Nombre' -app.msgbox(hoja.name) -``` - -### code_name - -Nombre editable y accesible solo por código. - -```python -doc = app.active -hoja = doc.active - -app.msgbox(hoja.code_name) -hoja.code_name = 'datos' -app.msgbox(hoja.code_name) -``` - - -### visible - -Muestra u oculta la hoja - -```python -hoja = app.active.active - -app.msgbox(hoja.visible) -hoja.visible = not hoja.visible -app.msgbox(hoja.visible) -hoja.visible = not hoja.visible -``` - -{{% notice tip %}} -Solo funcionará con dos o más hojas, por que debe haber al menos una visible. -{{% /notice %}} - - -### color - -Color de la pestaña. - -```python -hoja = app.active.active -app.msgbox(hoja.color) - -hoja.color = 'red' -app.msgbox(hoja.color) - -# RGB -hoja.color = (125, 200, 10) -app.msgbox(hoja.color) -``` - - -### used_area - -Referencia al área de usuario actual. - -```python -hoja = app.active.active - -rango = hoja.used_area -app.debug(rango) -``` - - -### is_protected - -Devuelve verdadero (True) si la hoja esta protegida - -```python -hoja = app.active.active - -esta_protegida = hoja.is_protected -app.debug(esta_protegida) -``` - - -### password - -Establecer una contraseña. - -```python -hoja = app.active.active -hoja.password = 'siscaloburropanzon' -app.debug(hoja.is_protected) -``` diff --git a/doc/content/es/dialog/_index.md b/doc/content/es/dialog/_index.md deleted file mode 100644 index 0360246..0000000 --- a/doc/content/es/dialog/_index.md +++ /dev/null @@ -1,76 +0,0 @@ -+++ -title = "Cuadros de diálogo" -weight = 20 -+++ - -#### Trabajar con cuadros de diálogo - -### create - -##### Desde archivo - -Crear un cuadro de diálogo desde un archivo `xdl` previamente creado desde el editor de cuadros de diálogo dentro de LibreOffice y exportado a un archivo. - -```python -def crear_cuadro_de_dialogo(): - path = '/home/mau/Desktop/Dialog1.xdl' - propiedades = {'Path': path} - - dialog = app.dialog.create(propiedades) - dialog.open() - return -``` - - -##### Desde mis macros - -Si el cuadro de diálogo esta en la librería `Standard`. - -```python -def crear_cuadro_de_dialogo(): - propiedades = { - 'Location': 'user', - 'Name': 'Dialog1', - } - dialog = app.dialog.create(propiedades) - dialog.open() - return -``` - -Si el cuadro de diálogo esta en otra librería. - -```python -def crear_cuadro_de_dialogo(): - propiedades = { - 'Location': 'user', - 'Library': 'MiAplicacion', - 'Name': 'Dialog2', - } - dialog = app.dialog.create(propiedades) - dialog.open() - return -``` - -Si el cuadro de diálogo esta en el documento activo en la librería `Standard`. - -```python -def crear_cuadro_de_dialogo(): - propiedades = { - 'Location': 'document', - 'Name': 'miApp', - } - dialog = app.dialog.create(propiedades) - dialog.open() - return -``` - -##### Crear dinámicamente - -Crear un cuadro de diálogo vacío. - -```python -def crear_cuadro_de_dialogo(): - dialog = app.dialog.create() - dialog.open() - return -``` diff --git a/doc/content/es/documents/_index.md b/doc/content/es/documents/_index.md deleted file mode 100644 index 6410e7c..0000000 --- a/doc/content/es/documents/_index.md +++ /dev/null @@ -1,67 +0,0 @@ -+++ -title = "Documentos" -weight = 5 -+++ - -#### Trabajar con Documentos - -### active - -Documento activo. - -```python -doc = app.active -app.msgbox(doc.title) -``` - - -### iteration - -Iterar en todos los documentos abiertos. - -```python -for doc in app.docs: - app.debug(doc.type, doc.title) -``` - - -### count - -Contar los documentos abiertos. - -```python -cuantos = len(app.docs) -app.debug(cuantos) -``` - - -### contain - -Verificar si un documento esta en la colección. - -```python -resultado = 'mi_archivo.ods' in app.docs -app.debug(resultado) -``` - - -### index - -Devolver por índice. - -```python -doc = app.docs[1] -app.debug(doc.type, doc.title) -``` - - -### name - -Devolver por nombre. - -```python -nombre = 'mi_archivo.ods' -if nombre in app.docs: - doc = app.docs[nombre] - app.debug(doc.type, doc.title) -``` diff --git a/doc/content/es/documents/methods/_index.md b/doc/content/es/documents/methods/_index.md deleted file mode 100644 index 4b3fa0b..0000000 --- a/doc/content/es/documents/methods/_index.md +++ /dev/null @@ -1,244 +0,0 @@ -+++ -title = "Métodos" -weight = 2 -+++ - -### new - -Crear nuevo documento, la aplicación predeterminada es Calc. - -```python -doc = app.docs.new() -app.debug(doc.type) -``` - -Para un nuevo documento `writer`. - -```python -doc = app.docs.new('writer') -app.debug(doc.type) -``` - -Otros documentos. - -```python -doc = app.docs.new('draw') -app.debug(doc.type) - -doc = app.docs.new('impress') -app.debug(doc.type) - -doc = app.docs.new('math') -app.debug(doc.type) -``` - -Crear con argumentos. - -```python -propiedades = {'Hidden': True} -doc = app.docs.new('writer', propiedades) -mensaje = f'{doc.type} - {doc.title}' -app.msgbox(mensaje) -doc.visible = True -``` - -{{% notice tip %}} -No es necesario que el documento este visible para manipularse. -{{% /notice %}} - - -### open - -Abrir archivos. - -```python -ruta = '/home/mau/Mi_archivo.ods' -doc = app.docs.open(ruta) -``` - -{{% notice tip %}} -No es necesario pasar las rutas en formato URL. -{{% /notice %}} - - -Puede abrir cualquier archivo que sea soportado por LibreOffice. - -```python -ruta = '/home/mau/ejemplo.xlsx' -doc = app.docs.open(ruta) -``` - -Abrir con argumentos. - -```python -ruta = '/home/mau/ejemplo.ods' -argumentos = {'Password': 'siscaloburropanzon'} -doc = app.docs.open(ruta, argumentos) -``` - - -### save - -Guardar un nuevo documento. - -```python -path = '/home/mau/nuevo_documento.ods' -doc = app.docs.new() -doc.save(path) -``` - -Cualquier archivo, previamente guardado, que sea modificado puede ser guardado con: - -```python -doc.save() -``` - -Abrir un archivo existente y guardarlo con otro nombre. - -```python -ruta = '/home/mau/ejemplo.ods' -doc = app.docs.open(ruta) -nueva_ruta = '/home/mau/otro_nombre.ods' -doc.save(nueva_ruta) -``` - - -### close - -Cerrar un archivo. - -```python -doc = app.docs.new() -app.msgbox(doc.title) -doc.close() -``` - - -### to_pdf - -Exportar a PDF. - -```python -doc = app.active -ruta = '/home/mau/ejemplo.pdf' -doc.to_pdf(ruta) -``` - -Si no se establece una ruta, se devuelve el PDF en memoria. - -```python -doc = app.active -pdf = doc.to_pdf() -app.debug(pdf) -``` - - -Mire las [opciones del filtro de exportación a PDF][1], puede pasarlas como un diccionario como segundo argumento de este método. - - -### export - -Exportar a otros formatos. - -```python -doc = app.docs.new() -ruta = '/home/mau/miarchivo.xlsx' -filtro = 'xlsx' -doc.export(ruta, filtro) - -ruta = '/home/mau/miarchivo.xls' -filtro = 'xls' -doc.export(ruta, filtro) - -doc = app.docs.new('writer') -ruta = '/home/mau/miarchivo.docx' -filtro = 'docx' -doc.export(ruta, filtro) - -ruta = '/home/mau/miarchivo.doc' -filtro = 'doc' -doc.export(ruta, filtro) - -ruta = '/home/mau/miarchivo.rtf' -filtro = 'rtf' -doc.export(ruta, filtro) -``` - -Exportar en memoria. - -```python -doc = app.docs.new() -filtro = 'xlsx' -excel_doc = doc.export(filter_name=filtro) -``` - - -### set_focus - -Enviar el foco al documento. - -```python -for doc in app.docs: - app.debug(doc.title) - doc.set_focus() - app.sleep(1) -``` - - -### copy - -Copiar la selección activa al portapapeles. - -```python -doc = app.active -doc.copy() -``` - - -### paste - -Copiar el contenido del portapapeles, en la selección actual. - -```python -doc = app.active -doc.paste() -``` - - -### paste_special - -Mostrar el cuadro de diálogo `Pegado Especial`. - -{{% notice tip %}} -Solo se mostrará si existe contenido en el portapapeles. -{{% /notice %}} - -```python -doc = app.active -doc.paste_special() -``` - - -### paste_values - -Pegar solo los valores. - -```python -doc = app.active -doc.paste_values() -``` - -Si el destino no esta vacío, el usuario verá el cuadro de mensaje de confirmación. - - -### clear_undo - -La mayoría de las acciones realizadas por código, quedan en el historial de acciones, por lo que el usuario puede deshacerlas. Para eviar esto se puede limpiar este historial. - -```python -doc = app.active -doc.clear_undo() -``` - - -[1]: https://wiki.documentfoundation.org/Macros/Python_Guide/PDF_export_filter_data diff --git a/doc/content/es/documents/properties/_index.md b/doc/content/es/documents/properties/_index.md deleted file mode 100644 index aaeb286..0000000 --- a/doc/content/es/documents/properties/_index.md +++ /dev/null @@ -1,189 +0,0 @@ -+++ -title = "Propiedades" -weight = 1 -+++ - -#### Propiedades comúnes a todos los documentos. - -### obj - -**Solo lectura**. Devolver el objeto original pyUNO. - -```python -doc = app.active -app.debug(type(doc)) -app.debug(type(doc.obj)) -``` - -``` -18/08/2022 21:59:05 - DEBUG - -18/08/2022 21:59:05 - DEBUG - -``` - - -### title - -Título del documento. - -```python -doc = app.active -app.debug(doc.title) -doc.title = 'Nuevo Titulo' -app.debug(doc.title) -``` - - -### type - -**Solo lectura**. Devolver el tipo de documento: calc, writer, etc. - -```python -doc = app.active -app.debug(doc.type) -``` - - -### uid - -**Solo lectura**. Devolver el valor interno RuntimeUID del documento. - -```python -doc = app.active -app.debug(doc.uid) -``` - - -### is_saved - -**Solo lectura**. Si el documento ya ha sido guardado en disco. - -```python -doc = app.active -app.debug(doc.is_saved) -``` - -### is_modified - -**Solo lectura**. Si el documento ha sido modificado. - -```python -doc = app.active -app.debug(doc.is_modified) -``` - - -### is_read_only - -**Solo lectura**. Si el documento es de solo lectura. - -```python -doc = app.active -app.debug(doc.is_read_only) -``` - - -### path - -**Solo lectura**. Devolver la ruta en disco del documento. - -```python -doc = app.active -app.debug(doc.path) -``` - - -### dir - -**Solo lectura**. Devolver solo el directorio de la ruta en disco del documento. - -```python -doc = app.active -app.debug(doc.dir) -``` - - -### file_name - -**Solo lectura**. Devolver el nombre con extensión de la ruta del documento. - -```python -doc = app.active -app.debug(doc.file_name) -``` - - -### name - -**Solo lectura**. Devolver el nombre sin extensión de la ruta del documento. - -```python -doc = app.active -app.debug(doc.name) -``` - - -### visible - -Ocultar o mostrar un documento. - -```python -doc = app.active -doc.visible = False -app.msgbox(doc.visible) -doc.visible = True -``` - -{{% notice tip %}} -No es necesario que el documento este visible para manipularse. -{{% /notice %}} - - -### zoom - -Devolver o establecer el porcentaje de zoom del documento. - -```python -doc = app.active -zoom = doc.zoom -app.msgbox(zoom) -doc.zoom = zoom * 2 -app.msgbox(doc.zoom) -doc.zoom = zoom -``` - -### status_bar - -Controlar la barra de estado, es importante siempre actualizar en otro hilo. - -```python -@app.run_in_thread -def controlar_barra_estado(sb, texto, limite): - sb.start(texto, limite) - for i in range(limite): - sb.setValue(i) - app.sleep(1) - sb.end() - return - -def main(): - doc = app.active - controlar_barra_estado(doc.status_bar, 'Línea: ', 10) - return -``` - -Es importante siempre devolver el control de la barra de estado a la aplicación con el método `end`. - - -### selection - -Devolver la selección actual. - -```python -doc = app.active -selection = doc.selection -app.debug(selection) -``` - -{{% notice warning %}} -**Cuidado**, la selección actual pueden ser muchas cosas diferentes. -{{% /notice %}} diff --git a/doc/content/es/installation/install_01.png b/doc/content/es/installation/install_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/content/es/installation/install_01.png and /dev/null differ diff --git a/doc/content/es/tools/dates_and_time/_index.md b/doc/content/es/tools/dates_and_time/_index.md deleted file mode 100644 index 5d45bbc..0000000 --- a/doc/content/es/tools/dates_and_time/_index.md +++ /dev/null @@ -1,153 +0,0 @@ -+++ -title = "Fechas y tiempo" -weight = 2 -+++ - - -{{% notice tip %}} -La fecha inicial en Calc y en Python es diferente. -{{% /notice %}} - - -### today - -Obtener la fecha de hoy. - -```python -d = app.dates -app.msgbox(d.today) -``` - - -### now - -Obtener la fecha y hora actuales. - -```python -d = app.dates -app.msgbox(d.now) -``` - - -### time - -Obtener la hora actual. - -```python -d = app.dates -app.msgbox(d.now.time()) -``` - - -### epoch - -Obtener el [tiempo Unix][1] - -```python -d = app.dates -app.msgbox(d.epoch) -``` - - -### date - -Devolver una fecha - -```python -d = app.dates - -date = d.date(1974, 1, 15) -app.msgbox(date) -``` - - -### time - -Devolver un tiempo - -```python -d = app.dates - -time = d.time(10, 20, 15) -app.msgbox(time) -``` - - -### datetime - -Devolver fecha y hora - -```python -d = app.dates - -dt = d.datetime(1974, 1, 15, 10, 11, 12) -app.msgbox(dt) -``` - -### str_to_date - -Convertir una cadena en fecha. Mira este [excelente recurso][2] - -```python -d = app.dates - -cadena = '1974-01-15' -plantilla = '%Y-%m-%d' -fecha = d.str_to_date(cadena, plantilla) -app.msgbox(fecha) -app.msgbox(type(fecha)) -``` - -Para obtener un valor válido para establecer en una celda de Calc. - -```python -d = app.dates - -cadena = '1974-01-15' -plantilla = '%Y-%m-%d' -fecha = d.str_to_date(cadena, plantilla, True) -app.msgbox(fecha) -app.msgbox(type(fecha)) -``` - -### calc_to_date - -Convierte el valor de una celda en una fecha Python, por ejemplo, la fecha inicial configurada en Calc. - -```python -d = app.dates - -value_from_cell = 1 -fecha = d.calc_to_date(value_from_cell) -app.msgbox(fecha) -app.msgbox(type(fecha)) -``` - - -### start y end - -Medir tiempo en segundos. - -```python -d = app.dates - -d.start() -app.sleep(5) -seconds = d.end() -app.msgbox(seconds) -``` - -Regresar timedelta en vez de segundos. - -```python -d = app.dates - -d.start() -app.sleep(5) -td = d.end(False) -app.msgbox(td) -``` - - -[1]: https://en.wikipedia.org/wiki/Unix_time -[2]: https://strftime.org diff --git a/doc/content/es/tools/email/_index.md b/doc/content/es/tools/email/_index.md deleted file mode 100644 index cb6d3b4..0000000 --- a/doc/content/es/tools/email/_index.md +++ /dev/null @@ -1,109 +0,0 @@ -+++ -title = "Correo electrónico" -weight = 3 -+++ - -#### Enviar correo electrónico. - -{{% notice tip %}} -Siempre guarda las contraseñas de la forma más segura posible. -{{% /notice %}} - -### send - -Enviar un correo electrónico. - -```python -from conf import PASSWORD - -SERVER = dict( - server = 'mail.correo.net' , - port = 405, - ssl = True, - user = 'no-responder@pruebas.mx', - password = PASSWORD, -) - -body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales" - -message = dict( - to = 'ingrid@bergman.mx', - subject = 'Te amo...', - body = body, -) - -app.email.send(SERVER, message) -``` - -Puede usar los campos `cc` (Con Copia) y `bcc` (Con Copia Oculta), así como separar por comas las direcciones destino para enviar a más de un correo. - -```python -to = 'mail1@correo.com,mail2@correo.com,mail3@correo.com' -cc = 'otro@correo.com' -bcc = 'oculto@correo.com' -``` - -Podemos enviar más de un mensaje. - -```python -mensaje1 = dict( - to = 'ingrid@correo.net', - subject = 'Te amo...', - body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales", -) -mensaje2 = dict( - to = 'sophia@correo.net', - subject = 'A ti también...', - body = "Hola Sophia\n\n¿Como estas?\n\nSaludos cordiales", -) -mensajes = (mensaje1, mensaje2) - -app.email.send(SERVER, mensajes) -``` -``` -16/08/2022 13:01:49 - DEBUG - Connect to: mail.server.net -16/08/2022 13:01:50 - DEBUG - Email sent... -16/08/2022 13:01:51 - DEBUG - Email sent... -16/08/2022 13:01:51 - DEBUG - Close connection... -``` - -Enviar un archivo adjunto. - -```python -archivo = '/home/mau/temp.txt' -mensaje = dict( - to = 'ingrid@bergman.mx', - subject = 'Te amo...', - body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales", - files = archivo, -) - -app.email.send(SERVER, mensaje) -``` - -O varios. - -```python -archivos = ( - '/home/mau/temp.txt', - '/home/mau/datos.csv', -) -``` - -Si tu cliente de correo usa el formato `mbox`, puede guardar los correos enviados en una carpeta dentro de la configuración de su cliente de correo. - -```python -ruta = '/home/mau/.thunderbird/7iznrbyw.default/Mail/Local Folders/LibreOffice' -mensaje = dict( - to = 'ingrid@bergman.mx', - subject = 'Te amo...', - body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales", - path = ruta, -) - -app.email.send(SERVER, mensaje) -``` - -{{% notice tip %}} -Todos los correos se envían siempre en otro hilo de ejecución. -{{% /notice %}} diff --git a/doc/content/es/tools/macros/_index.md b/doc/content/es/tools/macros/_index.md deleted file mode 100644 index 1cd0c2d..0000000 --- a/doc/content/es/tools/macros/_index.md +++ /dev/null @@ -1,65 +0,0 @@ -+++ -title = "Ejecutar macros" -weight = 6 -+++ - -Ejecutar cualquier macro, de forma predeterminada se llaman a las macros en Python localizadas en el perfil de usuario. - -```python -import easymacro as app - - -def mostrar_info(): - app.msgbox(app.INFO_DEBUG) - return - - -def main(args=None): - macro = { - 'library': 'test', - 'name': 'mostrar_info', - } - app.macro.call(macro) - return -``` - -Ejecutar una macro compartida en LibreOffice Macros. - -```python -macro = { - 'library': 'HelloWorld', - 'name': 'HelloWorldPython', - 'location': 'share', -} -app.macro.call(macro) -``` - -Ejecutar una macro Basic. - -```vb -Sub mostrar_info() - MsgBox "Mejor usa Python :)" -End Sub -``` - -```python -macro = { - 'language': 'Basic', - 'library': 'Standard', - 'module': 'Module1', - 'name': 'mostrar_info', -} -app.macro.call(macro) -``` - -Cualquier macro se puede ejecutar en otro hilo. - -```python -app.macro.call(macro, True) -``` - - -Más información en: [Scripting Framework URI Specification][1] - - -[1]: https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification diff --git a/doc/content/es/tools/messages/_index.md b/doc/content/es/tools/messages/_index.md deleted file mode 100644 index c4496f5..0000000 --- a/doc/content/es/tools/messages/_index.md +++ /dev/null @@ -1,69 +0,0 @@ -+++ -title = "Mensajes" -weight = 1 -+++ - -#### Cuadros de mensaje - -### msgbox - -Mostrar mensaje estandar. - -```python -mensaje = 'Maldito Mundo' -titulo = 'Mi Macro' -app.msgbox(mensaje, titulo) -``` - - -### warning - -Mostrar mensaje con icono de advertencia. - -```python -mensaje = 'Cuidado, esta acción es peligrosa' -titulo = 'Mi Macro' -app.warning(mensaje, titulo) -``` - - -### errorbox - -Mostrar mensaje con icono de error. - -```python -mensaje = 'ERROR: contacte a soporte' -titulo = 'Mi Macro' -app.errorbox(mensaje, titulo) -``` - - -### question - -Hacer una pregunta mostrando el icono de interrogación y mostrando los botones de comando `Si` y `No`. La respuesta siempre es verdadera (`True`) si el usuario selecciona `si` y falsa (`False`) en caso contrario. - -```python -mensaje = '¿Es fácil Python?' -titulo = 'Mi Macro' -resultado = app.question(mensaje, titulo) -app.msgbox(resultado) -``` - -### inputbox - -Muestra un mensaje al usuario, permitiendo capturar una respuesta. - -```python -mensaje = 'Escribe tu nombre' -nombre = app.inputbox(mensaje) -app.msgbox(nombre) -``` - -Para ocultar solo en pantalla lo que captura el usuario, como contraseñas. - -```python -mensaje = 'Captura la contraseña' -echochar = '*' -contraseña = app.inputbox(mensaje, echochar=echochar) -app.msgbox(contraseña) -``` diff --git a/doc/content/es/tools/paths/_index.md b/doc/content/es/tools/paths/_index.md deleted file mode 100644 index 419ec49..0000000 --- a/doc/content/es/tools/paths/_index.md +++ /dev/null @@ -1,569 +0,0 @@ -+++ -title = "Rutas y archivos" -weight = 2 -+++ - -#### Trabajar con rutas y archivos. - -### path - -Obtener información de una ruta. - -```python -ruta_archivo = '/home/mau/mi_archivo.ods' -p = app.paths(ruta_archivo) - -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) -``` - -``` -15/08/2022 14:40:08 - DEBUG - /home/mau -15/08/2022 14:40:08 - DEBUG - mi_archivo.ods -15/08/2022 14:40:08 - DEBUG - mi_archivo -15/08/2022 14:40:08 - DEBUG - ods -15/08/2022 14:40:08 - DEBUG - 7011 -15/08/2022 14:40:08 - DEBUG - file:///home/mau/mi_archivo.ods -``` - -Obtener la misma información como un tupla. - -```python -ruta_archivo = '/home/mau/mi_archivo.ods' -p = app.paths(ruta_archivo) -app.debug(p.info) -``` - -``` -15/08/2022 14:43:01 - DEBUG - ('/home/mau', 'mi_archivo.ods', 'mi_archivo', 'ods', 7011, 'file:///home/mau/mi_archivo.ods') -``` - -O como diccionario. - -```python -ruta_archivo = '/home/mau/mi_archivo.ods' -p = app.paths(ruta_archivo) -app.debug(p.dict) -``` - -``` -15/08/2022 14:43:01 - DEBUG - {'path': '/home/mau', 'file_name': 'mi_archivo.ods', 'name': 'mi_archivo', 'ext': 'ods', 'size': 7011, 'url': 'file:///home/mau/mi_archivo.ods'} -``` - - -### home - -Obtener la carpeta de inicio del usuario. - -```python -p = app.paths -app.debug(p.home) -``` - - -### documents - -Obtener la carpeta Documentos del usuario. - -```python -p = app.paths -app.debug(p.documents) -``` - - -### user_profile - -Obtener la ruta del perfil de usuario. - -```python -p = app.paths -app.debug(p.user_profile) -``` - - -### user_config - -Obtener la ruta de la carpeta `config` en el perfil de usuario. - -```python -p = app.paths -app.debug(p.user_config) -``` - - -### python - -Obtener la ruta del ejecutable `python` - -```python -p = app.paths -app.debug(p.python) -``` - - -### to_system - -Pasar una ruta en formato URL al formato del sistema de archivos del SO. - -```python -p = app.paths -ruta_url = 'file:///home/mau/mi_archivo.ods' -ruta = p.to_system(ruta_url) -app.debug(ruta) -``` - - -### to_url - -Pasar una ruta del sistema de archivos del SO al formato URL. - -```python -p = app.paths -ruta = '/home/mau/mi_archivo.ods' -ruta_url = p.to_url(ruta) -app.debug(ruta_url) -``` - -### config - -Obtener rutas de la configuración de LibreOffice. Por default obtiene la ruta de `Documentos`, para otras ruta mire [Api XPathSettings][1] - -```python -p = app.paths -ruta = p.config() -app.debug(ruta) - -ruta = p.config('UserConfig') -app.debug(ruta) -``` - -{{% notice tip %}} -Algunas rutas pueden ser más de una, separados por `;`, en este caso, el resultado es una lista con las rutas. -{{% /notice %}} - - -### join - -Concatenar rutas. - -```python -p = app.paths -ruta = p.join('/home/mau', 'pruebas', 'archivo.ods') -app.debug(ruta) -``` - - -### exists - -Verificar si una ruta existe. - -```python -p = app.paths -resultado = p.exists('/home/mau/test/archivo.ods') -app.debug(resultado) -``` - -### exists_app - -Verificar si una aplicación existe. - -```python -p = app.paths - -resultado = p.exists_app('noexiste') -app.debug(resultado) - -resultado = p.exists_app('soffice') -app.debug(resultado) -``` - - -### is_dir - -Verificar si la ruta es un directorio. - -```python -p = app.paths -resultado = p.is_dir('/home/mau') -app.debug(resultado) -``` - - -### is_file - -Verificar si la ruta es un archivo. - -```python -p = app.paths -resultado = p.is_file('/home/mau/mi_archivo.ods') -app.debug(resultado) -``` - - -### temp_file - -Crear un archivo temporal, es borrado automáticamente al cerrarse. - -```python -p = app.paths - -f = p.temp_file() -f.write(app.INFO_DEBUG) -f.close() -``` - -Usado en `contexto`, se cierra automáticamente. - -```python -with p.temp_file() as f: - app.debug(f.name) - f.write('test') -``` - -### temp_dir - -Crear un directorio temporal, al salir del contexto, es eliminado junto con todo su contenido del sistema de archivos. - -```python -p = app.paths - -with p.temp_dir() as d: - app.debug(p.exists(d)) - app.debug(d) - -app.debug(p.exists(d)) -``` - -### get - -Permitir al usuario seleccionar archivos, devuelve solo la ruta. De forma predeterminada abre en la carpeta `Documentos`. - -```python -p = app.paths -ruta = p.get() -app.debug(ruta) -``` - -Establecer que abra en otro directorio. - -```python -ruta = p.get('/tmp') -app.debug(ruta) -``` - -Agregar un filtro. - -```python -ruta = p.get(filters='ods') -app.debug(ruta) -``` - -Agregar multiples filtros. - -```python -ruta = p.get(filters='xml,txt') -app.debug(ruta) -``` - -Permitir selecciones multiples. - -```python -ruta = p.get(filters='xml,txt', multiple=True) -app.debug(ruta) -``` - - -### get_dir - -Permitir al usuario seleccionar un directorio, devuelve solo la ruta. De forma predeterminada abre en la carpeta `Documentos`. - -```python -p = app.paths -ruta = p.get_dir() -app.debug(ruta) -``` - -Establecer que abra en otro directorio. - -```python -ruta = p.get_dir('/tmp') -app.debug(ruta) -``` - -### get_for_save - -Permitir seleccionar un directorio y capturar el nombre del archivo, devuelve la ruta completa. - -```python -p = app.paths -ruta = p.get_for_save() -app.debug(ruta) -``` - -Establecer que inicie en otro directorio. - -```python -ruta = p.get_for_save('/tmp') -app.debug(ruta) -``` - -Si se establece un filtro, automáticamente se agrega la extensión. - -```python -ruta = p.get_for_save(filters='txt') -app.debug(ruta) -``` - - -### files - -Obtener archivos de una ruta, no recursivamente. De forma predeterminada regresa todos, incluyendo archivos ocultos. - -```python -ruta = '/home/mau' - -p = app.paths -archivos = p.files(ruta) -for a in archivos: - app.debug(a) -``` - -Filtrar por tipo de archivo. - -```python -p = app.paths -archivos = p.files(ruta, '*.pdf') -``` - -Obtener archivos de forma recursiva. - -```python -p = app.paths -archivos = p.files(ruta, '**/*.xml') -``` - - -### walk - -Obtener archivos de forma recursiva. - -```python -p = app.paths -ruta = '/home/mau/Documents' -archivos = p.walk(ruta) -for a in archivos: - app.debug(a) -``` - -Con filtro. - -```python -archivos = p.walk(ruta, 'ods') -``` - -Con filtros. - -```python -archivos = p.walk(ruta, 'ods|odt') -``` - - -### dirs - -Obtener los directorios de una ruta, no recursivamente. - -```python -p = app.paths -ruta = '/home/mau/Documents' -folders = p.dirs(ruta) -for f in folders: - app.debug(f) -``` - - -### walk_dirs - -Obtener los directorios de una ruta, no recursivamente. - -```python -p = app.paths -ruta = '/home/mau/Documents' -folders = p.walk_dirs(ruta) -for f in folders: - app.debug(f) -``` - -Obtener información en una lista de tuplas: (ID_FOLDER, ID_PADRE, NOMBRE) - -```python -folders = p.walk_dirs(ruta, True) -``` - - -### extension - -Obtener la ruta de instalación de una extensión a partir de su ID. - -```python -p = app.paths -id_ext = 'net.elmau.zaz.talk' -ruta = p.extension(id_ext) -app.debug(ruta) -``` - -### replace_ext - -Reemplazar extensión de un archivo. - -```python -p = app.paths -ruta = '/home/mau/mi_archivo.ods' -ruta_nueva = p.replace_ext(ruta, 'pdf') -app.debug(ruta_nueva) -``` - - -### open - -Abrir cualquier archivo con el programas predeterminado del SO. - -```python -p = app.paths -ruta = '/home/mau/archivo.pdf' -p.open(ruta) - -ruta = '/home/mau/index.html' -p.open(ruta) -``` - -### save y read - -Guardar y leer datos, el encoding predeterminado es UTF8. - -```python -p = app.paths -datos = """¿Quieres saber quién eres? No preguntes. Actúa. -La acción te delineará y definirá. - -Thomas Jefferson -""" - -ruta = '/home/mau/temp.txt' -p.save(ruta, datos) - -datos = p.read(ruta) -app.msgbox(datos) -``` - -Cambiar el encoding. - -```python -app.paths.save(ruta, datos, 'iso-8859-1') -``` - - -### save_bin y read_bin - -Guardar y leer datos binarios. - -```python -p = app.paths -datos = b'Datos binarios' - -ruta = '/home/mau/temp.bin' -p.save_bin(ruta, datos) - -datos = p.read_bin(ruta) -app.msgbox(datos) -``` - - -### save_json y read_json - -Guardar y leer en formato json. - -```python -p = app.paths - -ruta = '/home/mau/datos.json' -datos = { - 'tipo': 'calc', - 'nombre': 'miarchivo.ods', -} -p.save_json(ruta, datos) - -datos = p.read_json(ruta) -app.msgbox(datos) -``` - - -### save_csv y read_csv - -Exportar e importar datos en formato CSV. Vea la documentación [CSV][2] para los argumentos que puede usar. - -```python -p = app.paths - -ruta = '/home/mau/datos.csv' -ahora = app.dates.now -datos = ( - (1, 'uno', ahora), - (2, 'dos', ahora), - (3, 'tres', ahora), -) -p.save_csv(ruta, datos) - -datos = p.read_csv(ruta) -app.msgbox(datos) -``` - - -### kill - -Borra archivos o directorios con todo su contenido. Devuelve verdadero (True) en caso de exito y falso (Falso) en cualquier otro caso. - -{{% notice warning %}} -Este proceso es destructivo, es buena practica siempre solicitar confirmación al usuario. -{{% /notice %}} - -```python -p = app.paths - -ruta = '/home/mau/temp.bin' -resultado = p.kill(ruta) -app.msgbox(resultado) -``` - - -### copy - -Copiar archivos. Devuelve la ruta completa final destino. - -De un origen a una carpeta destino - -```python -p = app.paths - -ruta_origen = '/home/mau/temp.txt' -ruta_destino = '/home/mau/Desktop' -ruta = p.copy(ruta_origen, ruta_destino) -app.debug(ruta) -``` - -Cambiar el nombre destino. - -```python -ruta_origen = '/home/mau/temp.txt' -ruta_destino = '/home/mau/Desktop' -nuevo_nombre = 'datos.csv' -ruta = p.copy(ruta_origen, ruta_destino, nuevo_nombre) -app.debug(ruta) -``` - - -[1]: http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XPathSettings.html -[2]: https://docs.python.org/3.7/library/csv.html diff --git a/doc/content/es/tools/tools_01.png b/doc/content/es/tools/tools_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/content/es/tools/tools_01.png and /dev/null differ diff --git a/doc/content/es/tools/url/_index.md b/doc/content/es/tools/url/_index.md deleted file mode 100644 index 776a1a6..0000000 --- a/doc/content/es/tools/url/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -+++ -title = "URL" -weight = 8 -+++ - -### get - -Método `get`. - -```python -def prueba_get(): - - url = 'https://api.ipify.org' - respuesta = app.url.get(url) - if respuesta.status_code == 200: - mi_ip = respuesta.body.decode() - app.debug(f'IP: {mi_ip}') - else: - app.debug(respuesta.status_code) - - return -``` - -``` -16/08/2022 22:14:13 - DEBUG - IP: 199.203.174.159 -``` - -Respuestas en formato json. - -```python -def prueba_get(): - - url = 'https://api.ipify.org/?format=json' - respuesta = app.url.get(url) - if respuesta.status_code == 200: - datos = respuesta.json() - app.debug(f'IP: {datos["ip"]}') - else: - app.debug(respuesta.status_code) - - return -``` diff --git a/doc/content/es/tools/utils/_index.md b/doc/content/es/tools/utils/_index.md deleted file mode 100644 index 23d975b..0000000 --- a/doc/content/es/tools/utils/_index.md +++ /dev/null @@ -1,198 +0,0 @@ -+++ -title = "Utilidades" -weight = 9 -+++ - -### dict_to_property - -Convertir diccionarios en PropertyValue - - -```python -datos = { - 'Hidden': True, - 'Password': 'letmein', -} -propiedades = app.dict_to_property(datos) - -app.msgbox(propiedades) -``` - - -### data_to_dict - -Convertir `PropertyValue` en diccionarios - -```python -datos = app.data_to_dict(propiedades) -app.msgbox(datos) -``` - -Convertir `tuplas` a diccionario. - -```python -tupla_de_tuplas = ( - ('Hidden', True), - ('Password', 'letmein'), -) -datos = app.data_to_dict(tupla_de_tuplas) -app.msgbox(datos) -``` - -Convertir `listas` a diccionario. - -```python -lista_de_listas = [ - ['Hidden', True], - ['Password', 'letmein'], -] -datos = app.data_to_dict(lista_de_listas) -app.msgbox(datos) -``` - -### sleep - -Hacer una pausa de X segundos. - -```python -app.sleep(5) -``` - -### render - -Reemplazar variables en cadenas de texto. - -```python -plantilla = """Hola $nombre - -Te envío este archivo: $archivo - -Saludos cordiales -""" - -datos = { - 'nombre': 'Ingrid Bergman', - 'archivo': 'carta_de_amor.odt' -} - -resultado = app.render(plantilla, datos) - -app.msgbox(resultado) -``` - -### run - -Ejecutar un programa. - -```python -nombre_aplicacion = 'gnome-calculator' -app.shell.run(nombre_aplicacion) -``` - -Ejecutar comandos shell y capturar la salida. - -```python -comandos = 'ls -lh ~' -resultado = app.shell.run(comandos, True) -app.debug(resultado) -``` - -``` -drwxr-xr-x 4 mau mau 4.0K Aug 15 23:36 Desktop -drwxr-xr-x 6 mau mau 4.0K Jun 9 23:32 Documents -drwxr-xr-x 5 mau mau 4.0K Aug 16 13:09 Downloads -drwxr-xr-x 3 mau mau 4.0K Aug 14 15:19 Pictures -drwxr-xr-x 10 mau mau 4.0K Jun 19 19:36 Projects -drwxr-xr-x 2 mau mau 4.0K May 11 22:36 Templates -drwxr-xr-x 2 mau mau 4.0K Jul 19 13:37 Videos -``` - -Ejectuar comandos y capturar la salida línea a línea. - -```python -comandos = 'ls -lh /home/mau' -for line in app.shell.popen(comandos): - app.debug(line) -``` - -### digest - -Obtener hash. Por default se regresa en hexadecimal. - -```python - datos = 'LibreOffice con Python' - - digest = app.hash.digest('md5', datos) - app.debug('MD5 = ', digest) - - digest = app.hash.digest('sha1', datos) - app.debug('SHA1 = ', digest) - - digest = app.hash.digest('sha256', datos) - app.debug('SHA256 = ', digest) - - digest = app.hash.digest('sha512', datos) - app.debug('SHA512 = ', digest) -``` - -``` -16/08/2022 18:48:07 - DEBUG - MD5 = 3801759ead20abc3ce0d0095289bdcfd -16/08/2022 18:48:07 - DEBUG - SHA1 = 1df74aaae9658c21074aa5a2d4c2055dcf79f0db -16/08/2022 18:48:07 - DEBUG - SHA256 = 228e90b15b6259307e580677939b1f2f45e9317461e98f603af8fcac0f9a598f -16/08/2022 18:48:07 - DEBUG - SHA512 = 3ef45f79f3bfd2b251d250489c91b631306456405510397fb1a7ee37005d196376b7d6ca86a9895f4eb97eb74813965c24d6564a383f4bdb1360665c8fbb192a -``` - -Para obtener bytes. - -``` -digest = app.hash.digest('md5', datos, False) -app.debug('MD5 = ', digest) -``` - -``` -16/08/2022 18:48:07 - DEBUG - MD5 = b'8\x01u\x9e\xad \xab\xc3\xce\r\x00\x95(\x9b\xdc\xfd' -``` - - -### config - -Puede guardar datos de configuración de su macro o extensión dentro del perfil de usuario. - -```python -nombre = 'mi_extension' -datos = { - 'ruta': '/home/mau/pruebas', - 'guardar': True, -} - -if app.config.set(nombre, datos): - app.debug('Configuración guardada...') -``` - -Y recuperarlos en cualquier momento. - -``` -datos = app.config.get(nombre) -app.debug(datos) -``` - - -### color - -Puede ver los colores que puede usar en Wikipedia [Colores Web][1] - -```python -color_nombre = 'darkblue' -color = app.color(color_nombre) -app.debug(color) - -color_rgb = (125, 200, 10) -color = app.color(color_rgb) -app.debug(color) - -color_html = '#008080' -color = app.color(color_html) -app.debug(color) -``` - -[1]: https://es.wikipedia.org/wiki/Colores_web diff --git a/doc/content/es/tools_debug/tools_01.png b/doc/content/es/tools_debug/tools_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/content/es/tools_debug/tools_01.png and /dev/null differ diff --git a/doc/content/fr/_index.md b/doc/content/fr/_index.md deleted file mode 100644 index 3b4a749..0000000 --- a/doc/content/fr/_index.md +++ /dev/null @@ -1,8 +0,0 @@ -# Bienvenue dans la documentation easymacro! - - -**easymacro** est une bibliothèque permettant de développer facilement des macros LibreOffice avec Python. Il s'agit d'une couche d'abstraction entre l'API étendue et complexe de LibreOffice UNO et votre code. - -Vous serez probablement plus heureux si vous l'utilisez :) - -Vous pouvez utiliser **easymacro** avec n'importe quelle extension ou directement dans vos macros. diff --git a/doc/content/pt/_index.md b/doc/content/pt/_index.md deleted file mode 100644 index db5b011..0000000 --- a/doc/content/pt/_index.md +++ /dev/null @@ -1,8 +0,0 @@ -# Bem-vindo à documentação easymacro! - - -**easymacro*** é uma biblioteca para desenvolver facilmente macros en LibreOffice con Python. É uma camada de abstração entre o extenso e complexo LibreOffice API UNO e seu código. - -Provavelmente, você ficará mais feliz se o utilizar :) - -Você pode usar **easymacro** com qualquer extensão ou diretamente em suas macros. diff --git a/doc/content/pt/installation/_index.md b/doc/content/pt/installation/_index.md deleted file mode 100644 index 3bbbbfb..0000000 --- a/doc/content/pt/installation/_index.md +++ /dev/null @@ -1,52 +0,0 @@ -+++ -title = "Instalação" -weight = 1 -+++ - -## Clonar repositorio - -Clone el repositorio en su directorio de proyectos favorito. - -``` -git clone https://git.cuates.net/elmau/easymacro -``` - -y copie la librería dentro de la carpeta **pythonpath** en la carpeta de macros Python dentro de su perfil de usuario. Reemplace **USUARIO** por su usuario real. - -``` -/home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath/easymacro.py -``` - -o use un vínculo duro. Reemplace **RUTA_ABSOLUTA** por la ruta absoluta donde se localice **easymacro.py** en su sistema de archivos y **USUARIO** por su nombre de usuario. - -``` -ln `RUTA_ABSOLUTA`/easymacro/source/easymacro.py /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath/ -``` - - -## Probar - -En su archivo de macros favorito, por ejemplo **mismacros.py**: - -``` -vim /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/mismacros.py -``` - -Copie el siguiente código: - -```python -import easymacro as app - -def main(): - app.msgbox(app.INFO_DEBUG) - return -``` - -Ejecute la macro **main** desde LibreOffice, si ve un cuadro de mensaje con información similar a la siguiente, !felicidades¡ - -![Test instalation](install_01.png) - -Esta listo para desarrollar macros con **easymacro.py**. - - -!Feliz programación! diff --git a/doc/content/pt/installation/install_01.png b/doc/content/pt/installation/install_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/content/pt/installation/install_01.png and /dev/null differ diff --git a/doc/docs/app/index.md b/doc/docs/app/index.md new file mode 100644 index 0000000..cbea4e7 --- /dev/null +++ b/doc/docs/app/index.md @@ -0,0 +1,162 @@ +--- +title: Aplicación +--- + +### **fonts** + +Devolver todas las fuentes visibles en LibreOffice. Mire [FontDescriptor][1] + +```py + fuentes = app.fonts() + for f in fuentes: + app.debug(f'Nombre: {f.Name} - Estilo: {f.StyleName}') +``` + +
+ +### **filters** + +Devolver todos los filtros soportados en LibreOffice. Mire la [ayuda][2] y en [API FilterFactory][3] para más detalles. + +```py + filtros = app.filters() + for f in filtros: + info = f"Nombre UI: {f['UIName']} - Nombre: {f['Name']} - Tipo: {f['Type']}" + app.debug(info) +``` + +
+ +### **dispatch** + +Ejecutar cualquier comando `UNO` de LibreOffice, mire la [lista de comandos][4] y [API dispatch][5]. + +Este método automáticamente agrega el prefijo necesario: `.uno:` + +```py + doc = app.active + comando = 'Gallery' + app.dispatch(doc, comando) +``` + +!!! tip "Recomendación" + + Use este método solamente si no hay un método equivalente en `easymacro` o directamente en el API de LibreOffice. + +
+ +### **clipboard** + +#### **set** + +Envíar contenido (solo texto) al portapapeles. + +```py + app.clipboard.set('Los 7 samuráis') +``` + +#### **get** + +Recuperar contenido del portapapeles. + +```py + content = app.clipboard.get() + app.debug(content) +``` + +
+ +### **comandos** + +!!! warning "Cuidado" + + En este momento, en LibreOffice 7.4, este comando provoca el cierre de la aplicación. + +#### **disable** + +Deshabilitar un comando. Para una lista de comandos mire [DispatchCommands][4]. + +```py + comando = 'OpenFromCalc' + resultado = app.cmd.disable(comando) + app.debug(resultado) +``` + +`OpenFromCalc` es la opción para abrir documentos en Calc, deshabilita o habilita la entrada del menú y el icono en la barra de herramientas. + +
+ +#### **enabled** + +Habilitar un comando. + +```py + comando = 'OpenFromCalc' + resultado = app.cmd.enabled(comando) + app.debug(resultado) +``` + +
+ +### **Configuración** + +#### **get_config** + +Obtener valores de la configuración de LibreOffice. + +```py + nombre_node = '/org.openoffice.Office.Common/Help' + clave = 'System' + valor = app.get_config(nombre_node, clave) + app.debug(valor) + + nombre_node = '/org.openoffice.Office.Common/Misc/' + clave = 'FirstRun' + valor = app.get_config(nombre_node, clave) + app.debug(valor) + + clave = 'UseSystemFileDialog' + valor = app.get_config(nombre_node, clave) + app.debug(valor) +``` + +``` +17/08/2022 14:14:12 - DEBUG - UNIX +17/08/2022 14:14:12 - DEBUG - False +17/08/2022 14:14:12 - DEBUG - True +``` + +
+ +#### **set_config** + +Establece un nuevo valor en la configuración de LibreOffice. + +```py + nombre_nodo = '/org.openoffice.Office.UI/ColorScheme' + clave = 'CurrentColorScheme' + nuevo_valor = 'LibreOffice Dark' + resultado = app.set_config(nombre_nodo, clave, nuevo_valor) + app.debug(resultado) +``` + +
+ +Algunos nodos y claves interesantes: + +* `/org.openoffice.Office.Common/Save/Document` + * AutoSave + * AutoSaveTimeIntervall + + +!!! warning "Atención" + + No todos los valores de los nodos se pueden cambiar, algunos valores son de solo lectura. + +
+ +[1]: https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1awt_1_1FontDescriptor.html +[2]: https://help.libreoffice.org/latest/en-US/text/shared/guide/convertfilters.html +[3]: https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1document_1_1FilterFactory.html +[4]: https://wiki.documentfoundation.org/Development/DispatchCommands +[5]: https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1frame_1_1XDispatch.html#a42beb1ea2ddae35c076b6e65867025ea diff --git a/doc/content/es/application/menus/_index.md b/doc/docs/app/menus.md similarity index 56% rename from doc/content/es/application/menus/_index.md rename to doc/docs/app/menus.md index b41322a..9bebb5a 100644 --- a/doc/content/es/application/menus/_index.md +++ b/doc/docs/app/menus.md @@ -1,9 +1,5 @@ -+++ -title = "Menús" -weight = 2 -+++ -### insert +### **insert** Insertar nuevo menú en Calc. @@ -11,93 +7,102 @@ En la propiedad `CommandURL` es posible establecer tanto un comando UNO de Libre El nombre del menú es importante para cuando se quiera eliminar. -```python -nombre_menu = 'zaz.my.menu' -menu = { - 'Label': 'My menu', - 'CommandURL': nombre_menu, - 'Submenu': [ - { - 'Label': 'Open Macros Dialog...', - 'CommandURL': 'MacroDialog', - }, - { - 'Label': '-', - }, - { - 'Label': 'My macro', - 'CommandURL': {'library': 'test', 'name': 'hola'}, - }, - { - 'Label': 'Execute macro...', - 'CommandURL': 'RunMacro', - 'ShortCut': 'Shift+Ctrl+Alt+E', - }, - ] -} +```py + nombre_menu = 'zaz.my.menu' + menu = { + 'Label': 'My menu', + 'CommandURL': nombre_menu, + 'Submenu': [ + { + 'Label': 'Open Macros Dialog...', + 'CommandURL': 'MacroDialog', + }, + { + 'Label': '-', + }, + { + 'Label': 'My macro', + 'CommandURL': {'library': 'test', 'name': 'hola'}, + }, + { + 'Label': 'Execute macro...', + 'CommandURL': 'RunMacro', + 'ShortCut': 'Shift+Ctrl+Alt+E', + }, + ] + } -menus_calc = app.menus['calc'] -menus_calc.insert(menu) + menus_calc = app.menus['calc'] + menus_calc.insert(menu) ``` +!!! tip -### remove + Para controlar los menús de las demás aplicaciones, solo hay que cambiar el nombre de la aplicación. + +
+ +### **remove** Eliminar un menú existente. -```python -nombre_menu = 'zaz.my.menu' -menus_calc = app.menus['calc'] -menus_calc.remove(nombre_menu) +```py + nombre_menu = 'zaz.my.menu' + menus_calc = app.menus['calc'] + menus_calc.remove(nombre_menu) ``` -#### Insertar nuevo menú en uno existente. +
+ +### **Insertar en menú existente** Dentro del menú Herramientas (`tools`), después de la opción `Macros...` -```python -menu = app.menus['calc']['tools'] +```py + menu = app.menus['calc']['tools'] -menu_nombre = 'zaz.my.menu' -menu_nuevo = { - 'Label': 'My menu', - 'CommandURL': menu_nombre, - 'Submenu': [ - { - 'Label': 'Open Macros Dialog...', - 'CommandURL': 'MacroDialog', - }, - { - 'Label': '-', - }, - { - 'Label': 'My macro', - 'CommandURL': {'library': 'test', 'name': 'hello'}, - }, - { - 'Label': 'Execute macro...', - 'CommandURL': 'RunMacro', - 'ShortCut': 'Shift+Ctrl+Alt+E', - }, - ] -} + menu_nombre = 'zaz.my.menu' + menu_nuevo = { + 'Label': 'My menu', + 'CommandURL': menu_nombre, + 'Submenu': [ + { + 'Label': 'Open Macros Dialog...', + 'CommandURL': 'MacroDialog', + }, + { + 'Label': '-', + }, + { + 'Label': 'My macro', + 'CommandURL': {'library': 'test', 'name': 'hello'}, + }, + { + 'Label': 'Execute macro...', + 'CommandURL': 'RunMacro', + 'ShortCut': 'Shift+Ctrl+Alt+E', + }, + ] + } -if menu_nombre in menu: - menu.remove(menu_nombre) -else: - menu.insert(menu_nuevo, '.uno:MacrosMenu') + if menu_nombre in menu: + menu.remove(menu_nombre) + else: + menu.insert(menu_nuevo, '.uno:MacrosMenu') ``` -### debug +
+ +### **debug** Para saber los nombres de cualquier menú. -```python -menu = app.menus['calc']['tools'] -menu.debug() +```py + menu = app.menus['calc']['tools'] + menu.debug() ``` -``` +```sh (0) .uno:SpellDialog (1) .uno:SpellOnline (2) .uno:ThesaurusDialog @@ -169,3 +174,5 @@ menu.debug() (27) .uno:ConfigureDialog (28) .uno:OptionsTreeDialog ``` + +
\ No newline at end of file diff --git a/doc/docs/app/shortcuts.md b/doc/docs/app/shortcuts.md new file mode 100644 index 0000000..855747e --- /dev/null +++ b/doc/docs/app/shortcuts.md @@ -0,0 +1,126 @@ + +### **Globales** + +Iterar en todos los accesos directos. Accesos directos disponibles para todas las aplicaciones. + +```py + for acceso_directo, comando in app.shortcuts: + app.debug(acceso_directo, comando) +``` + +Devolver una lista de tuplas con toda la información. + +```py + datos = app.shortcuts.get_all() + app.debug(datos) +``` + +Verificar si un acceso directo esta asignado. + +```py + acceso_directo = 'Shift+Ctrl+Alt+T' + app.debug(acceso_directo in app.shortcuts) +``` + +
+ +### **set** + +Establecer un acceso directo a un comando. + +```py + sc = app.shortcuts + acceso_directo = 'Shift+Ctrl+Alt+T' + comando = 'MacroDialog' + sc.set(acceso_directo, comando) +``` + +Establecer un acceso directo a una macro. + +!!! tip inline end + + Para la asignación de una macros, aplican las mismas reglas de: [ejecutar macros](../../tools/macros/) + +```py + sc = app.shortcuts + acceso_directo = 'Shift+Ctrl+Alt+M' + macro = {'library': 'test', 'name': 'pruebas'} + sc.set(acceso_directo, macro) +``` + +
+ +### **get_by_shortcut** + +Devolver el comando asociado a un acceso directo. + +```py + sc = app.shortcuts + acceso_directo = 'Shift+Ctrl+Alt+M' + comando = sc.get_by_shortcut(acceso_directo) + app.debug(comando) +``` + +
+ +### **get_by_command** + +Devolver el acceso directo asociado a un comando. Puede haber más de uno. + +```py + sc = app.shortcuts + comando = 'MacroDialog' + acceso_directo = sc.get_by_command(comando) + app.debug(acceso_directo) +``` + +
+ +### **remove_by_shortcut** + +Eliminar por acceso directo. + +```py + sc = app.shortcuts + acceso_directo = 'Shift+Ctrl+Alt+T' + sc.remove_by_shortcut(acceso_directo) +``` + +
+ +### **remove_by_command** + +Eliminar por comando. + +```py + sc = app.shortcuts + macro = {'library': 'test', 'name': 'pruebas'} + sc.remove_by_command(macro) +``` + +
+ +### **reset** + +Reiniciar todas las modificaciones. + +```py + app.shortcuts.reset() +``` +
+ +### **Por aplicación** + +Modificar accesos directos, solo en una aplicación. + +Por ejemplo Calc. + +```py + sc = app.shortcuts['calc'] +``` + +Los métodos son los mismos que los globales. + +Para las demas aplicaciones: `writer`, `draw`, `impress`, `math`. + +
\ No newline at end of file diff --git a/doc/content/es/tools_debug/_index.md b/doc/docs/debug.md similarity index 77% rename from doc/content/es/tools_debug/_index.md rename to doc/docs/debug.md index 54d0c87..a5107ae 100644 --- a/doc/content/es/tools_debug/_index.md +++ b/doc/docs/debug.md @@ -1,15 +1,14 @@ -+++ -title = "Herramientas para depurar" -weight = 2 -+++ +## Herramientas para depurar -### INFO_DEBUG +
+ +### **INFO_DEBUG** Mostrar información de depuración en un cuadro de mensaje. Si tiene cualquier problema en su código durante el desarrollo de sus macros, puede [abrir un ticket][1] de soporte en el sistema de ticket de este proyecto. Siempre copie la información de depuración mostrada en este mensaje. -```python +```py import easymacro as app def info(): @@ -17,14 +16,14 @@ def info(): return ``` -![Info debug](tools_01.png) +![Info debug](img/install_01.png) -### debug +### **debug** Mostrar información en la terminal. -```python +```py import easymacro as app def test_debug(): @@ -33,16 +32,23 @@ def test_debug(): return ``` +Para ver este mensaje, es necesario iniciar LibreOffice desde la línea de comandos: ``` -11/08/2022 18:15:45 - DEBUG - Verificar esta información... +soffice --calc ``` +Después de ejecutar la macro anterior, debe de ver: +``` +21/04/2023 17:04:49 - DEBUG - Verificar esta información... +``` -### info +
+ +### **info** Mostrar mensajes informativos en la terminal. -```python +```py import easymacro as app def test_info(): @@ -55,12 +61,13 @@ def test_info(): 11/08/2022 18:23:53 - INFO - Iniciando proceso... ``` +
-### error +### **error** Mostrar mensajes de error en la terminal. -```python +```py import easymacro as app def test_error(): @@ -73,12 +80,13 @@ def test_error(): 11/08/2022 18:27:34 - ERROR - Error 505 ``` +
-### save_log +### **save_log** Guardar registro en un archivo, automáticamente se agrega la fecha y hora. -```python +```py import easymacro as app def test_save_log(): @@ -95,12 +103,15 @@ cat ~/log.txt 2022-08-11 18:30:11 - 'Maldito Mundo' ``` +
-### msgbox +### **msgbox** Mostrar cualquier información en un cuadro de mensaje. ```python +import easymacro as app + def message(): msg = 'Por favor, consume menos.' @@ -117,11 +128,19 @@ def message(): return ``` -### catch_exception +
+ +### **catch_exception** Capturar cualquier error que se produzca al ejecutar una macro. -```python +!!! warning inline end "Cuidado" + + Usa este método solo en tiempo de desarrollo. **No la use en producción**. + +```py +import easymacro as app + @app.catch_exception def test_capturar_error(): r = 1 / 0 @@ -138,28 +157,30 @@ Traceback (most recent call last): ZeroDivisionError: division by zero ``` -{{% notice warning %}} -Usa este método solo en tiempo de desarrollo. No la uses en producción. -{{% /notice %}} +
- -### mri +### **mri** [MRI][2] es la mejor extensión para inspeccionar cualquier objeto UNO de LibreOffice. Necesita instalarla primero para poder llamarla. +```py +import easymacro as app -```python def inspeccionar_objeto(): obj = app.active app.mri(obj) return ``` -### inspect +
+ +### **inspect** Inspeccionar un objeto. -```python +```py +import easymacro as app + def inspeccionar_objeto(): doc = app.active data = app.inspect(doc) @@ -170,7 +191,7 @@ def inspeccionar_objeto(): return ``` -Vaciar en una hoja de calculo. +Vaciar la información del objeto en una hoja de calculo. ```python def inspeccionar_objeto(): diff --git a/doc/docs/docs/index.md b/doc/docs/docs/index.md new file mode 100644 index 0000000..c1c1964 --- /dev/null +++ b/doc/docs/docs/index.md @@ -0,0 +1,75 @@ +--- +title: Documentos +--- + +## Trabajar con Documentos + +
+ +### **active** + +Devuelve el documento activo. + +```py + doc = app.active + app.msgbox(doc.title) +``` + +
+ +### **iteration** + +Iterar en todos los documentos abiertos. + +```py + for doc in app.docs: + app.debug(doc.type, doc.title) +``` + +
+ +### **count** + +Contar los documentos abiertos. + +```py + cuantos = len(app.docs) + app.debug(cuantos) +``` + +
+ +### **contain** + +Verificar si un documento esta en la colección. + +```py + resultado = 'mi_archivo.ods' in app.docs + app.debug(resultado) +``` + +
+ +### **index** + +Devolver por índice. + +```py + doc = app.docs[1] + app.debug(doc.type, doc.title) +``` + +
+ +### **name** + +Devolver por nombre. + +```py + nombre = 'mi_archivo.ods' + if nombre in app.docs: + doc = app.docs[nombre] + app.debug(doc.type, doc.title) +``` + +
\ No newline at end of file diff --git a/doc/docs/docs/methods.md b/doc/docs/docs/methods.md new file mode 100644 index 0000000..460070a --- /dev/null +++ b/doc/docs/docs/methods.md @@ -0,0 +1,263 @@ + +## Métodos comúnes a todos los documentos. + +
+ +### **clear_undo** + +La mayoría de las acciones realizadas por código, quedan en el historial de acciones, por lo que el usuario puede deshacerlas. Para evitar esto se puede limpiar este historial. + +```py + doc = app.active + doc.clear_undo() +``` + +
+ +### **close** + +Cerrar un archivo. + +```py + doc = app.docs.new() + app.msgbox(doc.title) + doc.close() +``` + +
+ +### **copy** + +Copiar la selección activa al portapapeles. + +```py + doc = app.active + doc.copy() +``` + +
+ +### **export** + +Exportar a otros formatos. + +```py + doc = app.docs.new() + ruta = '/home/elmau/miarchivo.xlsx' + filtro = 'xlsx' + doc.export(ruta, filtro) + + ruta = '/home/elmau/miarchivo.xls' + filtro = 'xls' + doc.export(ruta, filtro) + + doc = app.docs.new('writer') + ruta = '/home/elmau/miarchivo.docx' + filtro = 'docx' + doc.export(ruta, filtro) + + ruta = '/home/elmau/miarchivo.doc' + filtro = 'doc' + doc.export(ruta, filtro) + + ruta = '/home/elmau/miarchivo.rtf' + filtro = 'rtf' + doc.export(ruta, filtro) +``` + +Exportar en memoria. + +```python +doc = app.docs.new() +filtro = 'xlsx' +excel_doc = doc.export(filter_name=filtro) +``` + +
+ +### **new** + +Crear nuevo documento, la aplicación predeterminada es Calc. + +```py + doc = app.docs.new() + app.debug(doc.type) +``` + +Para un nuevo documento `writer`. + +```py + doc = app.docs.new('writer') + app.debug(doc.type) +``` + +Otros documentos. + +```py + doc = app.docs.new('draw') + app.debug(doc.type) + + doc = app.docs.new('impress') + app.debug(doc.type) + + doc = app.docs.new('math') + app.debug(doc.type) +``` + +Crear con argumentos. + +```py + propiedades = {'Hidden': True} + doc = app.docs.new('writer', propiedades) + mensaje = f'{doc.type} - {doc.title}' + app.msgbox(mensaje) + doc.visible = True +``` + +!!! tip + + No es necesario que un documento este visible para manipularse. + +
+ +### **open** + +Abrir archivos. + +```py + ruta = '/home/elmau/mi_archivo.ods' + doc = app.docs.open(ruta) +``` + +!!! tip "Consejo" + + No es necesario pasar las rutas en formato URL. + +Puede abrir cualquier archivo que sea soportado por LibreOffice. + +```py + ruta = '/home/elmau/ejemplo.xlsx' + doc = app.docs.open(ruta) +``` + +Abrir con argumentos. + +```py + ruta = '/home/elmau/ejemplo.ods' + argumentos = {'Password': 'siscaloburropanzon'} + doc = app.docs.open(ruta, argumentos) +``` + +
+ +### **paste** + +Copiar el contenido del portapapeles, en la selección actual. + +```py + doc = app.active + doc.paste() +``` + +
+ +### **paste_special** + +Mostrar el cuadro de diálogo `Pegado Especial`. + +!!! tip "Consejo" + + Solo se mostrará si existe contenido en el portapapeles. + +```py + doc = app.active + doc.paste_special() +``` + +
+ +### **paste_values** + +Pegar solo los valores. + +```py + doc = app.active + doc.paste_values() +``` + +Si el destino no esta vacío, el usuario verá el cuadro de mensaje de confirmación. + +
+ +### **save** + +Guardar un nuevo documento. + +```py + path = '/home/elmau/nuevo_documento.ods' + doc = app.docs.new() + doc.save(path) +``` + +Cualquier archivo, previamente guardado, que sea modificado puede ser guardado con: + +```python + doc.save() +``` + +Abrir un archivo existente y guardarlo con otro nombre. + +```py + ruta = '/home/mau/ejemplo.ods' + doc = app.docs.open(ruta) + nueva_ruta = '/home/mau/otro_nombre.ods' + doc.save(nueva_ruta) +``` + +
+ +### **set_focus** + +Enviar el foco al documento. + +```py + for doc in app.docs: + app.debug(doc.title) + doc.set_focus() + app.sleep(1) +``` + +
+ +### **to_pdf** + +Exportar a PDF. + +```py + doc = app.active + ruta = '/home/elmau/ejemplo.pdf' + doc.to_pdf(ruta) +``` + +Si no se establece una ruta, se devuelve el PDF en memoria. + +```py + doc = app.active + pdf = doc.to_pdf() + app.debug(pdf) +``` + +Mire las [opciones del filtro de exportación a PDF][1], puede pasarlas como un diccionario como segundo argumento de este método. + +Por ejemplo, exportar solo las páginas 2 a 4: + +```py + doc = app.active + ruta = '/home/elmau/ejemplo.pdf' + opciones = {'PageRange': '2-4'} + doc.to_pdf(ruta, opciones) +``` + +
+ +[1]: https://wiki.documentfoundation.org/Macros/Python_Guide/PDF_export_filter_data diff --git a/doc/docs/docs/properties.md b/doc/docs/docs/properties.md new file mode 100644 index 0000000..376d498 --- /dev/null +++ b/doc/docs/docs/properties.md @@ -0,0 +1,220 @@ + + +## Propiedades comúnes a todos los documentos. + +
+ +Recordemos, el documento activo lo referenciamos con: + +```py + doc = app.active +``` + +
+ +### **dir** + +**Solo lectura**. Devolver solo el directorio de la ruta en disco del documento. + +```py + doc = app.active + app.debug(doc.dir) +``` + +
+ +### **file_name** + +**Solo lectura**. Devolver el nombre con extensión de la ruta del documento. + +```py + doc = app.active + app.debug(doc.file_name) +``` + +
+ +### **is_modified** + +**Solo lectura**. Si el documento ha sido modificado. + +```py + doc = app.active + app.debug(doc.is_modified) +``` + +
+ +### **is_read_only** + +**Solo lectura**. Si el documento es de solo lectura. + +```py + doc = app.active + app.debug(doc.is_read_only) +``` + +
+ +### **is_saved** + +**Solo lectura**. Si el documento ya ha sido guardado en disco. + +```py + doc = app.active + app.debug(doc.is_saved) +``` + +
+ +### **name** + +**Solo lectura**. Devolver el nombre sin extensión de la ruta del documento. + +```py + doc = app.active + app.debug(doc.name) +``` + +
+ +### **obj** + +**Solo lectura**. Devolver el objeto original pyUNO. + +```py + doc = app.active + app.debug(type(doc)) + app.debug(type(doc.obj)) +``` + +```sh +18/08/2022 21:59:05 - DEBUG - +18/08/2022 21:59:05 - DEBUG - +``` + +
+ +### **path** + +**Solo lectura**. Devolver la ruta en disco del documento. + +```py + doc = app.active + app.debug(doc.path) +``` + +
+ +### **selection** + +Devolver la selección actual. + +```py + doc = app.active + selection = doc.selection + app.debug(selection) +``` + +
+ +!!! warning "Cuidado" + + La selección actual pueden ser muchas cosas diferentes. + +
+ +### **status_bar** + +Controlar la barra de estado, es importante siempre actualizar en otro hilo. + +```py +@app.run_in_thread +def controlar_barra_estado(sb, texto, limite): + sb.start(texto, limite) + for i in range(limite): + sb.setValue(i) + app.sleep(1) + sb.end() + return + +def main(): + doc = app.active + controlar_barra_estado(doc.status_bar, 'Línea: ', 10) + return +``` + +Es importante siempre devolver el control de la barra de estado a la aplicación con el método `end`. + +
+ +### **title** + +Título del documento. + +```py + doc = app.active + app.debug(doc.title) + doc.title = 'Nuevo Titulo' + app.debug(doc.title) +``` + +!!! tip "Consejo" + + El cambio no es permanente, solo mientras el documento esta abierto. + +
+ +### **type** + +**Solo lectura**. Devolver el tipo de documento: calc, writer, etc. + +```py + doc = app.active + app.debug(doc.type) +``` + +
+ +### **uid** + +**Solo lectura**. Devolver el valor interno RuntimeUID del documento. + +```py + doc = app.active + app.debug(doc.uid) +``` + +
+ +### **visible** + +Ocultar o mostrar un documento. + +```py + doc = app.active + doc.visible = False + app.msgbox(doc.visible) + doc.visible = True +``` + +!!! tip "Consejo" + + No es necesario que el documento este visible para manipularse. + +
+ +### **zoom** + +Devolver o establecer el porcentaje de zoom del documento. + +```py + doc = app.active + zoom = doc.zoom + app.msgbox(zoom) + doc.zoom = zoom * 2 + app.msgbox(doc.zoom) + doc.zoom = zoom +``` + +
diff --git a/doc/docs/img/favicon.ico b/doc/docs/img/favicon.ico new file mode 100644 index 0000000..563a626 Binary files /dev/null and b/doc/docs/img/favicon.ico differ diff --git a/doc/docs/img/install_01.png b/doc/docs/img/install_01.png new file mode 100644 index 0000000..3783237 Binary files /dev/null and b/doc/docs/img/install_01.png differ diff --git a/doc/docs/img/logo.png b/doc/docs/img/logo.png new file mode 100644 index 0000000..88c98f1 Binary files /dev/null and b/doc/docs/img/logo.png differ diff --git a/doc/docs/index.md b/doc/docs/index.md new file mode 100644 index 0000000..7c6c277 --- /dev/null +++ b/doc/docs/index.md @@ -0,0 +1,29 @@ +# Bienvenido a la documentación para EasyMacro + +**Software Libre, no software gratis** + +
+ +**easymacro** es una librería para desarrollar más fácilmente macros en LibreOffice con Python. Es una capa de abstracción entre la extensa y compleja API UNO de LibreOffice y tu código. + +Probablemente, será más feliz si la usa :) + +Puede utilizar **easymacro** con cualquier extensión o directamente en sus macros. + +
+ +- Proyectos similiares o relacionados en Python: + * [python-ooo-dev-tools](https://python-ooo-dev-tools.readthedocs.io) + * [oooscript](https://oooscript.readthedocs.io) + * [python-ooouno-ex](https://github.com/Amourspirit/python-ooouno-ex) +- Proyectos similiares o relacionados en otros lenguajes: + * [Java LibreOffice Programming](https://flywire.github.io/lo-p/) + +
+ +Aportaciones: + +- en Moneda Libre Ğ1 (Junas):
+`A5DdXxCKPw3QKWVdDVs7CzkNugNUW1sHu5zDJFWxCU2h` + +
\ No newline at end of file diff --git a/doc/content/es/installation/_index.md b/doc/docs/install.md similarity index 61% rename from doc/content/es/installation/_index.md rename to doc/docs/install.md index e918db2..9b901dd 100644 --- a/doc/content/es/installation/_index.md +++ b/doc/docs/install.md @@ -1,8 +1,3 @@ -+++ -title = "Instalación" -weight = 1 -+++ - ## Clonar repositorio Clone el repositorio en su directorio de proyectos favorito. @@ -19,13 +14,13 @@ cd easymacro/source copie la carpeta `easymacro` a la carpeta **pythonpath** en la carpeta de macros Python dentro de su perfil de usuario. Reemplace **USUARIO** por su usuario real. ``` -/home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath +/home/USUARIO/.config/libreoffice/4/user/Scripts/python/pythonpath ``` -o use un vínculo simbólico. Reemplace **RUTA_ABSOLUTA** por la ruta absoluta donde se localice **easymacro** en su sistema de archivos y **USUARIO** por su nombre de usuario. +o use un vínculo simbólico (recomendado). Reemplace **RUTA_ABSOLUTA** por la ruta absoluta donde se localice **easymacro** en su sistema de archivos y **USUARIO** por su nombre de usuario. ``` -ln -s `RUTA_ABSOLUTA`/easymacro/source/easymacro /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath/ +ln -s RUTA_ABSOLUTA/easymacro/source/easymacro /home/USUARIO/.config/libreoffice/4/user/Scripts/python/pythonpath/ ``` @@ -34,12 +29,12 @@ ln -s `RUTA_ABSOLUTA`/easymacro/source/easymacro /home/`USUARIO`/.config/libreof En su archivo de macros favorito, por ejemplo **mismacros.py**. Use su editor de texto plano o IDE favorito. ``` -vim /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/mismacros.py +vim /home/USUARIO/.config/libreoffice/4/user/Scripts/python/mismacros.py ``` Copie el siguiente código: -```python +```py import easymacro as app def main(): @@ -49,7 +44,7 @@ def main(): Ejecute la macro **main** desde LibreOffice, si ve un cuadro de mensaje con información similar a la siguiente, !felicidades¡ -![Test instalation](install_01.png) +![Test instalation](img/install_01.png) Esta todo listo para empezar a desarrollar macros con **easymacro**. diff --git a/doc/docs/tools/datetime.md b/doc/docs/tools/datetime.md new file mode 100644 index 0000000..6d66fe4 --- /dev/null +++ b/doc/docs/tools/datetime.md @@ -0,0 +1,177 @@ + +!!! tip "Atención" + + La fecha inicial en Calc y en Python son diferentes. + +
+ +### **today** + +Obtener la fecha actual. + +```py + d = app.dates + app.msgbox(d.today) +``` + +
+ +### **now** + +Obtener la fecha y hora actuales. + +```py + d = app.dates + app.msgbox(d.now) +``` + +
+ +### **time** + +Obtener la hora actual. + +```py + d = app.dates + app.msgbox(d.now.time()) +``` + +
+ +### **epoch** + +Obtener el [tiempo Unix][1] + +```py + d = app.dates + app.msgbox(d.epoch) +``` + +
+ +### **date** + +Devolver una fecha + +```py + d = app.dates + + date = d.date(1974, 1, 15) + app.msgbox(date) +``` + +
+ +### **time** + +Devolver una hora + +```py + d = app.dates + + time = d.time(10, 20, 15) + app.msgbox(time) +``` + +
+ +### **datetime** + +Devolver fecha y hora + +```py + d = app.dates + + dt = d.datetime(1974, 1, 15, 10, 11, 12) + app.msgbox(dt) +``` + +
+ +### **str_to_date** + +Convertir una cadena en fecha. Mira este [excelente recurso][2] + +```py + d = app.dates + + cadena = '1974-01-15' + plantilla = '%Y-%m-%d' + fecha = d.str_to_date(cadena, plantilla) + app.msgbox(fecha) + app.msgbox(type(fecha)) +``` + +Para obtener un valor válido para establecer en una celda de Calc. + +```py + d = app.dates + + cadena = '1974-01-15' + plantilla = '%Y-%m-%d' + fecha = d.str_to_date(cadena, plantilla, True) + app.msgbox(fecha) + app.msgbox(type(fecha)) +``` + +
+ +### **calc_to_date** + +Convierte el valor de una celda en una fecha Python, por ejemplo, la fecha inicial configurada en Calc. + +```py + d = app.dates + + valor_en_celda = 0 + fecha = d.calc_to_date(valor_en_celda) + app.msgbox(fecha) + app.msgbox(type(fecha)) +``` + +
+ +### **sleep** + +Pausar la ejecución por X segundos. + +!!! tip inline end "Atención" + + La pausa es bloqueante. + +```py + d = app.dates + + app.sleep(3) + app.msgbox('Fin') +``` + +
+ +### **start** y **end** + +Medir tiempo en segundos. + +```py + d = app.dates + + d.start() + app.sleep(5) + seconds = d.end() + app.msgbox(seconds) +``` + +Regresar timedelta en vez de segundos. + +```py + d = app.dates + + d.start() + app.sleep(5) + td = d.end(False) + app.msgbox(td) +``` + + +[1]: https://es.wikipedia.org/wiki/Tiempo_Unix +[2]: https://strftime.org diff --git a/doc/docs/tools/email.md b/doc/docs/tools/email.md new file mode 100644 index 0000000..72cf660 --- /dev/null +++ b/doc/docs/tools/email.md @@ -0,0 +1,144 @@ +## Enviar correo electrónico. + +!!! tip "Cuidado" + + Siempre guarda las contraseñas de la forma más segura posible. + +!!! warning "Cuidado" + + Consulta con el proveedor de tu correo electrónico, la configuración "exacta" necesaria para conectarse a tu servidor. Algunos proveedores no permiten (o dificultan) la conexión desde fuera de su infraestructura. + +
+ +### **send** + +Enviar un correo electrónico. + +```py + from conf import PASSWORD + + SERVIDOR = dict( + server = 'mail.correo.net' , + port = 405, + ssl = True, + user = 'no-responder@pruebas.mx', + password = PASSWORD, + ) + + body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales" + + mensaje = dict( + to = 'ingrid@bergman.mx', + subject = 'Te amo...', + body = body, + ) + + app.email.send(SERVIDOR, mensaje) +``` + +Algunos servidores requieren activar también `starttls`: + +```py + from conf import PASSWORD + + SERVIDOR = dict( + server = 'mail.correo.net' , + port = 405, + ssl = True, + starttls = True, + user = 'no-responder@pruebas.mx', + password = PASSWORD, + ) +``` + +!!! tip "Importante" + + Todos los correos se envían siempre en otro hilo de ejecución. + +
+ +#### Enviar con copia y copia oculta + +Dentro de los datos del mensaje, puede usar los campos `cc` (Con Copia) y `bcc` (Con Copia Oculta), así como separar por comas las direcciones destino para enviar a más de un correo. + +```py + to = 'mail1@correo.com,mail2@correo.com,mail3@correo.com' + cc = 'otro@correo.com' + bcc = 'oculto@correo.com' +``` + +
+ +#### Envíar más de un mensaje + +```py + mensaje1 = dict( + to = 'ingrid@correo.net', + subject = 'Te amo...', + body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales", + ) + mensaje2 = dict( + to = 'sophia@correo.net', + subject = 'A ti también...', + body = "Hola Sophia\n\n¿Como estas?\n\nSaludos cordiales", + ) + mensajes = (mensaje1, mensaje2) + + app.email.send(SERVIDOR, mensajes) +``` + +```sh +16/08/2022 13:01:49 - DEBUG - Connect to: mail.server.net +16/08/2022 13:01:50 - DEBUG - Email sent... +16/08/2022 13:01:51 - DEBUG - Email sent... +16/08/2022 13:01:51 - DEBUG - Close connection... +``` + +
+ +#### Adjuntos + +Enviar un archivo adjunto. + +```py + archivo = '/home/mau/temp.txt' + mensaje = dict( + to = 'ingrid@bergman.mx', + subject = 'Te amo...', + body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales", + files = archivo, + ) + + app.email.send(SERVIDOR, mensaje) +``` + +O varios. + +```py + archivos = ( + '/home/mau/temp.txt', + '/home/mau/datos.csv', + ) +``` + +
+ +#### Guardar mensajes + +Si su cliente de correo usa el formato `mbox` (Thunderbird por ejemplo), puede guardar los correos enviados en una carpeta dentro de la configuración de su cliente de correo. + +```py + ruta = '/home/elmau/.thunderbird/7iznrbyw.default/Mail/Local Folders/LibreOffice' + mensaje = dict( + to = 'ingrid@bergman.mx', + subject = 'Te amo...', + body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales", + path = ruta, + ) + + app.email.send(SERVIDOR, mensaje) +``` + + + + diff --git a/doc/content/es/tools/_index.md b/doc/docs/tools/index.md similarity index 60% rename from doc/content/es/tools/_index.md rename to doc/docs/tools/index.md index cd82b8d..9b0f46b 100644 --- a/doc/content/es/tools/_index.md +++ b/doc/docs/tools/index.md @@ -1,103 +1,114 @@ -+++ -title = "Herramientas" -weight = 3 -+++ +--- +title: Información +--- -Recuerda, es necesario importar la librería. +Recuerda, es necesario importar primero la librería. -```python +```py import easymacro as app ``` -#### Información sobre la PC +
-### OS +## Información sobre la PC + +### **OS** Obtener el sistema operativo. -```python +```py app.msgbox(app.OS) ``` +
-### DESKTOP +### **DESKTOP** Obtener el tipo de escritorio, solo en GNU/Linux. -```python +```py app.msgbox(app.DESKTOP) ``` +
-### PC +### **PC** Obtener el nombre de la computadora. -```python +```py app.msgbox(app.PC) ``` +
-### USER +### **USER** Obtener el nombre de usuario. -```python +```py app.msgbox(app.USER) ``` +
-### IS_WIN +### **IS_WIN** Saber si estamos en Windows. -```python +```py app.msgbox(app.IS_WIN) ``` +
-### IS_MAC +### **IS_MAC** -Saber si estamos en OSX. +Saber si estamos en OS X. -```python +```py app.msgbox(app.IS_MAC) ``` -#### Información sobre LibreOffice +
-### NAME +## Información sobre LibreOffice + +### **NAME** Nombre de la aplicación. -```python +```py app.msgbox(app.NAME) ``` +
-### VERSION +### **VERSION** Versión de la aplicación. -```python +```py app.msgbox(app.VERSION) ``` +
-### LANG +### **LANG** Lenguaje de la aplicación. -```python +```py app.msgbox(app.LANG) ``` +
-### LANGUAGE +### **LANGUAGE** Lenguaje con variante. -```python +```py app.msgbox(app.LANGUAGE) ``` diff --git a/doc/docs/tools/macros.md b/doc/docs/tools/macros.md new file mode 100644 index 0000000..55b2d9a --- /dev/null +++ b/doc/docs/tools/macros.md @@ -0,0 +1,90 @@ +Podemos ejecutar cualquier macro disponible en LibreOffice. De forma predeterminada se llaman a las macros en Python localizadas en el perfil de usuario. + +### **call** + +```py +import easymacro as app + + +def mostrar_info(): + app.msgbox(app.INFO_DEBUG) + return + + +def main(args=None): + macro = { + 'library': 'examples', + 'name': 'mostrar_info', + } + app.macro.call(macro) + return +``` + +
+ +#### Macros compartidas. + +Ejecutar una macro compartida en LibreOffice Macros. + +```py + macro = { + 'library': 'HelloWorld', + 'name': 'HelloWorldPython', + 'location': 'share', + } + app.macro.call(macro) +``` + +
+ +#### Macros en Basic + +Ejecutar una macro Basic. + +```vbscript +Sub mostrar_info() + MsgBox "Mejor usa Python :)" +End Sub +``` + +```py + macro = { + 'language': 'Basic', + 'library': 'Standard', + 'module': 'Module1', + 'name': 'mostrar_info', + } + app.macro.call(macro) +``` + +
+ +#### Macros en JavaScript + +Si ejecutas este ejempplo, asegurate de ejecutarlo con un documento Writer abierto, la macro de ejemplo en JavaScript esta disponible en LibreOffice. + +```py + macro = { + 'language': 'JavaScript', + 'library': 'HelloWorld', + 'name': 'helloworld.js', + 'location': 'share', + } + app.macro.call(macro) +``` + +
+ +Cualquier macro se puede ejecutar en otro hilo. + +```py + app.macro.call(macro, True) +``` + +
+ +Más información en: [Scripting Framework URI Specification][1] + +
+ +[1]: https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification diff --git a/doc/docs/tools/messages.md b/doc/docs/tools/messages.md new file mode 100644 index 0000000..2baeb6d --- /dev/null +++ b/doc/docs/tools/messages.md @@ -0,0 +1,69 @@ +## Cuadros de mensaje + +### **msgbox** + +Mostrar mensaje estandar. + +```py + mensaje = 'Maldito Mundo' + titulo = 'Mi Macro' + app.msgbox(mensaje, titulo) +``` + +
+ +### **warning** + +Mostrar mensaje con icono de advertencia. + +```py + mensaje = 'Cuidado, esta acción es peligrosa' + titulo = 'Mi Macro' + app.warning(mensaje, titulo) +``` + +
+ +### **errorbox** + +Mostrar mensaje con icono de error. + +```py + mensaje = 'ERROR: contacte a soporte' + titulo = 'Mi Macro' + app.errorbox(mensaje, titulo) +``` + +
+ +### **question** + +Hacer una pregunta mostrando el icono de interrogación y mostrando los botones de comando `Si` y `No`. La respuesta siempre es verdadera (`True`) si el usuario selecciona `si` y falsa (`False`) en caso contrario. + +```py + mensaje = '¿Es fácil Python?' + titulo = 'Mi Macro' + resultado = app.question(mensaje, titulo) + app.msgbox(resultado) +``` + +
+ +### **inputbox** + +Muestra un mensaje al usuario, permitiendo capturar una respuesta. + +```py + mensaje = 'Escribe tu nombre' + nombre = app.inputbox(mensaje) + app.msgbox(nombre) +``` + +Para ocultar solo en pantalla lo que captura el usuario, como contraseñas. + +```py + mensaje = 'Captura la contraseña' + echochar = '*' + contraseña = app.inputbox(mensaje, echochar=echochar) + app.msgbox(contraseña) +``` diff --git a/doc/docs/tools/paths.md b/doc/docs/tools/paths.md new file mode 100644 index 0000000..fba1146 --- /dev/null +++ b/doc/docs/tools/paths.md @@ -0,0 +1,678 @@ +## Trabajar con rutas y archivos. + +
+ +### **path** + +Obtener información de una ruta. + +```py + ruta_archivo = '/home/elmau/mi_archivo.ods' + p = app.paths(ruta_archivo) + + 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) +``` + +``` +15/08/2022 14:40:08 - DEBUG - /home/elmau +15/08/2022 14:40:08 - DEBUG - mi_archivo.ods +15/08/2022 14:40:08 - DEBUG - mi_archivo +15/08/2022 14:40:08 - DEBUG - ods +15/08/2022 14:40:08 - DEBUG - 7011 +15/08/2022 14:40:08 - DEBUG - file:///home/elmau/mi_archivo.ods +``` + +Obtener la misma información como un tupla. + +```py + ruta_archivo = '/home/elmau/mi_archivo.ods' + p = app.paths(ruta_archivo) + app.debug(p.info) +``` + +``` +15/08/2022 14:43:01 - DEBUG - ('/home/elmau', 'mi_archivo.ods', 'mi_archivo', 'ods', 7011, 'file:///home/mau/mi_archivo.ods') +``` + +O como diccionario. + +```py + ruta_archivo = '/home/elmau/mi_archivo.ods' + p = app.paths(ruta_archivo) + app.debug(p.dict) +``` + +``` +15/08/2022 14:43:01 - DEBUG - {'path': '/home/elmau', 'file_name': 'mi_archivo.ods', 'name': 'mi_archivo', 'ext': 'ods', 'size': 7011, 'url': 'file:///home/mau/mi_archivo.ods'} +``` + +
+ +### **home** + +Obtener la carpeta de inicio del usuario. + +```py + p = app.paths + app.debug(p.home) +``` + +
+ +### **documents** + +Obtener la carpeta Documentos del usuario. + +```py + p = app.paths + app.debug(p.documents) +``` + +
+ +### **user_profile** + +Obtener la ruta del perfil de usuario. + +```py + p = app.paths + app.debug(p.user_profile) +``` + +
+ +### **user_config** + +Obtener la ruta de la carpeta `config` en el perfil de usuario. + +```py + p = app.paths + app.debug(p.user_config) +``` + +
+ +### **python** + +Obtener la ruta del ejecutable `python` + +```py + p = app.paths + app.debug(p.python) +``` + +
+ +### **to_system** + +Pasar una ruta en formato URL al formato del sistema de archivos del SO. + +```py + p = app.paths + ruta_url = 'file:///home/elmau/mi_archivo.ods' + ruta = p.to_system(ruta_url) + app.debug(ruta) +``` + +
+ +### **to_url** + +Pasar una ruta del sistema de archivos del SO al formato URL. + +```py + p = app.paths + ruta = '/home/mau/mi_archivo.ods' + ruta_url = p.to_url(ruta) + app.debug(ruta_url) +``` + +
+ +### **config** + +Obtener rutas de la configuración de LibreOffice. Por default obtiene la ruta de `Documentos`, para otras ruta mire [Api XPathSettings][1] + +```py + p = app.paths + ruta = p.config() + app.debug(ruta) + + ruta = p.config('UserConfig') + app.debug(ruta) +``` + +!!! tip "Atención" + + Algunas rutas pueden ser más de una, separados por `;`, en este caso, el resultado es una lista con las rutas. + +
+ +### **join** + +Concatenar rutas. + +```py + p = app.paths + ruta = p.join('/home/mau', 'pruebas', 'archivo.ods') + app.debug(ruta) +``` + +
+ +### **exists** + +Verificar si una ruta existe. + +```py + p = app.paths + resultado = p.exists('/home/mau/test/archivo.ods') + app.debug(resultado) +``` + +
+ +### **exists_app** + +Verificar si una aplicación existe. + +```py + p = app.paths + + resultado = p.exists_app('noexiste') + app.debug(resultado) + + resultado = p.exists_app('soffice') + app.debug(resultado) +``` + +
+ +### **is_dir** + +Verificar si la ruta es un directorio. + +```py + p = app.paths + resultado = p.is_dir('/home/elmau') + app.debug(resultado) +``` + +
+ +### **is_file** + +Verificar si la ruta es un archivo. + +```py + p = app.paths + resultado = p.is_file('/home/elmau/mi_archivo.ods') + app.debug(resultado) +``` + +
+ +### **temp_file** + +Crear un archivo temporal, es borrado automáticamente al cerrarse. + +```python + p = app.paths + + f = p.temp_file() + f.write(app.INFO_DEBUG) + f.close() +``` + +Usado en `contexto`, se cierra automáticamente. + +```py + with p.temp_file() as f: + app.debug(f.name) + f.write('test') +``` + +
+ +### **temp_dir** + +Crear un directorio temporal, al salir del contexto, es eliminado junto con todo su contenido del sistema de archivos. + +```py + p = app.paths + + with p.temp_dir() as d: + app.debug(p.exists(d)) + app.debug(d) + + app.debug(p.exists(d)) +``` + +
+ +### **get** + +Permitir al usuario seleccionar archivos, devuelve solo la ruta. De forma predeterminada abre en la carpeta `Documentos`. + +```py + p = app.paths + ruta = p.get() + app.debug(ruta) +``` + +Establecer que abra en otro directorio. + +```py + ruta = p.get('/tmp') + app.debug(ruta) +``` + +Agregar un filtro. + +```py + ruta = p.get(filters='ods') + app.debug(ruta) +``` + +Agregar multiples filtros. + +```py + ruta = p.get(filters='xml,txt') + app.debug(ruta) +``` + +Permitir selecciones multiples. + +```py + rutas = p.get(filters='xml,txt', multiple=True) + app.debug(rutas) +``` + +
+ +### **get_dir** + +Permitir al usuario seleccionar un directorio, devuelve solo la ruta. De forma predeterminada abre en la carpeta `Documentos`. + +```py + p = app.paths + ruta = p.get_dir() + app.debug(ruta) +``` + +Establecer que abra en otro directorio. + +```py + ruta = p.get_dir('/tmp') + app.debug(ruta) +``` + +
+ +### **get_for_save** + +Permitir seleccionar un directorio y capturar el nombre del archivo, devuelve la ruta completa. + +```py + p = app.paths + ruta = p.get_for_save() + app.debug(ruta) +``` + +Establecer que inicie en otro directorio. + +```py + ruta = p.get_for_save('/tmp') + app.debug(ruta) +``` + +Si se establece un filtro, automáticamente se agrega la extensión. + +```python + ruta = p.get_for_save(filters='txt') + app.debug(ruta) +``` + +!!! tip "Atención" + + Si el archivo capturado existe, el usuario verá una advertencia de sobreescritura. + +
+ +### **files** + +Obtener archivos de una ruta, no recursivamente. De forma predeterminada regresa todos, incluyendo archivos ocultos. + +```py + ruta = '/home/elmau' + + p = app.paths + archivos = p.files(ruta) + for a in archivos: + app.debug(a) +``` + +Filtrar por tipo de archivo. + +```py + p = app.paths + archivos = p.files(ruta, '*.pdf') +``` + +Obtener archivos de forma recursiva. + +```py + p = app.paths + archivos = p.files(ruta, '**/*.xml') +``` + +!!! warning "Cuidado:" + + Dependiendo de la cantidad de archivo en la ruta origen, este proceso puede ser costoso en tiempo. + +
+ +### **walk** + +Obtener archivos de forma recursiva. + +```py + p = app.paths + + ruta = '/home/elmau/Documents' + archivos = p.walk(ruta) + for a in archivos: + app.debug(a) +``` + +Con filtro. + +```py + archivos = p.walk(ruta, 'ods') +``` + +Varios filtros. + +```py + archivos = p.walk(ruta, 'ods|odt') +``` + +
+ +### **dirs** + +Obtener los directorios de una ruta, no recursivamente. + +```py + p = app.paths + ruta = '/home/elmau/Documents' + folders = p.dirs(ruta) + for f in folders: + app.debug(f) +``` + +
+ +### **walk_dirs** + +Obtener los directorios de una ruta, recursivamente. + +```py + p = app.paths + ruta = '/home/elmau/Documents' + folders = p.walk_dirs(ruta) + for f in folders: + app.debug(f) +``` + +Obtener información en una lista de tuplas: (`ID_FOLDER`, `ID_PADRE`, `NOMBRE`) + +```py + folders = p.walk_dirs(ruta, True) +``` + +
+ +### **extension** + +Obtener la ruta de instalación de una extensión a partir de su ID. + +```py + p = app.paths + id_ext = 'net.elmau.zaz.talk' + ruta = p.extension(id_ext) + app.debug(ruta) +``` + +
+ +### **replace_ext** + +Reemplazar extensión de un archivo. El reemplazo es solo en la variable, no en el archivo físico. + +```py + p = app.paths + ruta = '/home/elmau/mi_archivo.ods' + ruta_nueva = p.replace_ext(ruta, 'pdf') + app.debug(ruta_nueva) +``` + +
+ +### **open** + +Abrir cualquier archivo con el programa predeterminado del SO. + +```py + p = app.paths + ruta = '/home/elmau/archivo.pdf' + p.open(ruta) + + ruta = '/home/elmau/index.html' + p.open(ruta) +``` + +
+ +### **save** y **read** + +Guardar y leer datos, el encoding predeterminado es UTF8. + +```py + p = app.paths + datos = """¿Quieres saber quién eres? No preguntes. Actúa. + La acción te delineará y definirá. + + Thomas Jefferson + """ + + ruta = '/home/elmau/temp.txt' + p.save(ruta, datos) + + datos = p.read(ruta) + app.msgbox(datos) +``` + +Cambiar el encoding. + +```py + app.paths.save(ruta, datos, 'iso-8859-1') +``` + +
+ +### **save_bin** y **read_bin** + +Guardar y leer datos binarios. + +```py + p = app.paths + datos = b'Datos binarios' + + ruta = '/home/elmau/temp.bin' + p.save_bin(ruta, datos) + + datos = p.read_bin(ruta) + app.msgbox(datos) +``` + +
+ +### **save_json** y **read_json** + +Guardar y leer en formato json. + +```py + p = app.paths + + ruta = '/home/elmau/datos.json' + datos = { + 'tipo': 'calc', + 'nombre': 'miarchivo.ods', + } + p.save_json(ruta, datos) + + datos = p.read_json(ruta) + app.msgbox(datos) +``` + +
+ +### **save_csv** y **read_csv** + +Exportar e importar datos en formato CSV. Vea la documentación [CSV][2] para los argumentos que puede usar. + +```py + p = app.paths + + ruta = '/home/elmau/datos.csv' + ahora = app.dates.now + datos = ( + (1, 'uno', ahora), + (2, 'dos', ahora), + (3, 'tres', ahora), + ) + p.save_csv(ruta, datos) + + datos = p.read_csv(ruta) + app.msgbox(datos) +``` + +
+ +### **kill** + +Borra archivos o directorios con todo su contenido. Devuelve verdadero (True) en caso de exito y falso (Falso) en cualquier otro caso. + +!!! warning inline end "Cuidado" + + Este proceso es destructivo, es buena practica siempre solicitar confirmación al usuario. + +```py + p = app.paths + + ruta = '/home/elmau/temp.bin' + resultado = p.kill(ruta) + app.msgbox(resultado) +``` + +
+ +### **copy** + +Copiar archivos. Devuelve la ruta completa final destino. + +De un archivo origen a una carpeta destino con el mismo nombre. + +```py + p = app.paths + + ruta_origen = '/home/elmau/temp.txt' + ruta_destino = '/home/elmau/Desktop' + ruta = p.copy(ruta_origen, ruta_destino) + app.debug(ruta) +``` + +Cambiando el nombre destino. + +```py + ruta_origen = '/home/elmau/temp.txt' + ruta_destino = '/home/elmau/Desktop' + nuevo_nombre = 'datos.csv' + ruta = p.copy(ruta_origen, ruta_destino, nuevo_nombre) + app.debug(ruta) +``` + +
+ +### **zip** + +Comprimir un archivo en el mismo directorio, lo comprime y le asigna el mismo nombre con extensión `zip`. + +```py + p = app.paths + origen = '/home/elmau/temp.txt' + destino = p.zip(origen) + app.debug(destino) +``` + +Comprimir varios archivos estableciendo ruta y nombre destino. + +```py + archivos = ( + '/home/elmau/temp.txt', + '/home/elmau/ids', + '/home/elmau/ids.ods') + destino = p.zip(archivos, '/home/elmau/destino.zip') + app.debug(destino) +``` + +Comprimir un directorio. + +```py + directorio = '/home/elmau/pruebas' + destino = p.zip(directorio, '/home/elmau/pruebas.zip') + app.debug(destino) +``` + +
+ +### **zip_content** + +Devuelve una lista con los nombres de los archivos contenidos en el archivo `zip`. + +```py + archivo = '/home/elmau/temp.zip' + contenido = p.zip_content(archivo) + app.debug(contenido) +``` + +
+ +### **unzip** + +Descomprime un archivo `zip` en el mismo directorio. + +```py + p = app.paths + + archivo = '/home/elmau/temp.zip' + p.unzip(archivo) +``` + +Descomprime un archivo `zip` en otro directorio. + +```py + archivo = '/home/elmau/temp.zip' + destino = '/home/elmau/Desktop' + p.unzip(archivo, destino) +``` + + +[1]: http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XPathSettings.html +[2]: https://docs.python.org/3.7/library/csv.html diff --git a/doc/docs/tools/request.md b/doc/docs/tools/request.md new file mode 100644 index 0000000..6e394f6 --- /dev/null +++ b/doc/docs/tools/request.md @@ -0,0 +1,76 @@ +Gracias a [mureq](https://github.com/slingamn/mureq) una sencilla librería para hacer peticiciones HTTP, similar a [requests](https://requests.readthedocs.io) pero más sencilla y en un solo archivo. + +### **get** + +Método `get`. + +```py +def prueba_get(): + + url = 'https://api.ipify.org' + respuesta = app.url.get(url) + if respuesta.status_code == 200: + mi_ip = respuesta.body.decode() + app.debug(f'IP: {mi_ip}') + else: + app.debug(respuesta.status_code) + + return +``` + +```sh +16/08/2022 22:14:13 - DEBUG - IP: 199.203.174.159 +``` + +
+ +#### **json** + +Respuestas en formato json. + +```py +def prueba_get(): + + url = 'https://api.ipify.org/?format=json' + respuesta = app.url.get(url) + if respuesta.status_code == 200: + datos = respuesta.json() + app.debug(f'IP: {datos["ip"]}') + else: + app.debug(respuesta.status_code) + + return +``` + +
+ +## **post** + +Método `post` + +```py +def prueba_post(): + + url = 'https://translate.terraprint.co/translate' + data = dict( + q = 'Hello World', + source = 'en', + target = 'es', + ) + respuesta = app.url.post(url, json=data) + if respuesta.status_code != 200: + app.debug(respuesta.status_code) + return + + datos = respuesta.json() + app.debug(datos) + + return +``` + +```sh +elmau@oficina ~> soffice --calc +22/04/2023 14:57:50 - DEBUG - {'translatedText': 'Hola Mundo'} +``` + +
\ No newline at end of file diff --git a/doc/content/es/tools/threads/_index.md b/doc/docs/tools/threads.md similarity index 67% rename from doc/content/es/tools/threads/_index.md rename to doc/docs/tools/threads.md index b78ac01..1350b1f 100644 --- a/doc/content/es/tools/threads/_index.md +++ b/doc/docs/tools/threads.md @@ -1,18 +1,12 @@ -+++ -title = "Hilos" -weight = 5 -+++ - -#### Ejecutar macros en otros hilos. +## Ejecutar macros en otros hilos. Las macros se ejecutan en un hilo que bloquea cualquier otro proceso dentro de la aplicación. Si ejecutas la siguiente macro `main`, nota que no puedes hacer algo más dentro de LibreOffice durante los 5 segundos que dura el proceso. -```python +```py import easymacro as app - def hacer_pausa(segundos): app.sleep(segundos) app.debug('He terminado') @@ -24,13 +18,15 @@ def main(): return ``` -Hasta que aparece el cuadro de mensaje con la palabra `Fin` y lo cierras, el usuario puede seguir usando la aplicación. +Hasta que aparece el cuadro de mensaje con la palabra `Fin` y lo cierras, el usuario puede seguir usando la aplicación. En algunos casos no queremos esto, para ello se usan los hilos de ejecución. -### run_in_thread +
+ +### **run_in_thread** Ahora ejecutamos la macro en otro hilo, "decorando" cualquier macro con `run_in_thread` -```python +```py @app.run_in_thread def hacer_pausa(segundos): app.sleep(segundos) @@ -45,6 +41,8 @@ def main(): Nota que ahora el mensaje aparece inmediatamente y no tras los 5 segundos. -{{% notice warning %}} -Ponga mucha atención en **no ejecutar macros en otros hilo** que dependen de algo suceptible de ser cambiado o interceptado por el usuario, por ejemplo, la celda activa. -{{% /notice %}} +!!! warning "Cuidado" + + Ponga mucha atención en **no ejecutar macros en otros hilos** que dependen de algo suceptible de ser cambiado o interceptado por el usuario, por ejemplo, la celda activa. + +
\ No newline at end of file diff --git a/doc/content/es/tools/timer/_index.md b/doc/docs/tools/timer.md similarity index 76% rename from doc/content/es/tools/timer/_index.md rename to doc/docs/tools/timer.md index 6d32858..63d4772 100644 --- a/doc/content/es/tools/timer/_index.md +++ b/doc/docs/tools/timer.md @@ -1,16 +1,15 @@ -+++ -title = "Timer" -weight = 7 -+++ El `timer` siempre se ejecuta en otro hilo. -### once +### **once** Ejecutar macro una sola vez en X segundos. +!!! tip "Atención" -```python + Asegurese siempre de establecer un nombre único para cada timer. + +```py import easymacro as app @@ -18,7 +17,7 @@ NOMBRE = 'reloj' def mostrar_hora(): - app.debug(app.dates.now_time) + app.debug(app.dates.now.time()) return @@ -37,14 +36,16 @@ def main(args=None): return ``` -### cancel +
+ +### **cancel** Cancelar ejecución, antes del tiempo establecido. -```python +```py def main(args=None): iniciar_conteo() - app.sleep(3) + app.sleep(2) detener_conteo() return @@ -53,21 +54,23 @@ def detener_conteo(): return ``` -``` -16/08/2022 21:18:50 - INFO - Event: "reloj", started... execute in 60 seconds +```sh +16/08/2022 21:18:50 - INFO - Event: "reloj", started... execute in 5 seconds 16/08/2022 21:18:55 - INFO - Cancel event: "reloj", ok... ``` -### start +
+ +### **start** Ejecutar macro cada X segundos. -```python +```py NOMBRE = 'reloj' def mostrar_hora(): - app.debug(app.dates.now_time) + app.debug(app.dates.now.time()) return @@ -80,22 +83,25 @@ def iniciar_reloj(): app.timer.start(NOMBRE, segundos, macro) return + def main(args=None): iniciar_reloj() return ``` -### stop +
+ +### **stop** Detener timer. -```python +```py def detener_reloj(): app.timer.stop(NOMBRE) return ``` -``` +```sh 16/08/2022 21:25:37 - INFO - Timer 'reloj' started, execute macro: 'mostrar_hora' 16/08/2022 21:25:38 - DEBUG - 21:25:38 16/08/2022 21:25:39 - DEBUG - 21:25:39 @@ -105,12 +111,10 @@ def detener_reloj(): 16/08/2022 21:25:48 - INFO - Timer stopped... ``` +
-{{% notice tip %}} -Asegurese siempre de establecer un nombre único para cada timer. -{{% /notice %}} +!!! warning "Cuidado" + Asegurese siempre de ejecutar macros que NO bloqueen la interfaz del usuario. -{{% notice warning %}} -Asegurese siempre de ejecutar macros que NO bloqueen la interfaz del usuario. -{{% /notice %}} +
\ No newline at end of file diff --git a/doc/docs/tools/utils.md b/doc/docs/tools/utils.md new file mode 100644 index 0000000..f1ae3d3 --- /dev/null +++ b/doc/docs/tools/utils.md @@ -0,0 +1,210 @@ + +### **dict_to_property** + +Convertir diccionarios en PropertyValue + +```py + datos = { + 'Hidden': True, + 'Password': 'letmein', + } + propiedades = app.dict_to_property(datos) + + app.msgbox(propiedades) +``` + +
+ +### **data_to_dict** + +Convertir `PropertyValue` en diccionarios + +```py + datos = app.data_to_dict(propiedades) + app.msgbox(datos) +``` + +Convertir `tuplas` a diccionario. + +```py + tupla_de_tuplas = ( + ('Hidden', True), + ('Password', 'letmein'), + ) + datos = app.data_to_dict(tupla_de_tuplas) + app.msgbox(datos) +``` + +Convertir `listas` a diccionario. + +```py + lista_de_listas = [ + ['Hidden', True], + ['Password', 'letmein'], + ] + datos = app.data_to_dict(lista_de_listas) + app.msgbox(datos) +``` + +
+ +### **sleep** + +Hacer una pausa de X segundos. + +```py + app.sleep(5) +``` + +
+ +### **render** + +Reemplazar variables en cadenas de texto. + +```py + plantilla = """Hola $nombre + + Te envío este archivo: $archivo + + Saludos cordiales + """ + + datos = { + 'nombre': 'Ingrid Bergman', + 'archivo': 'carta_de_amor.odt' + } + + resultado = app.render(plantilla, datos) + + app.msgbox(resultado) +``` + +
+ +### **run** + +Ejecutar un programa. + +```py + nombre_aplicacion = 'gnome-calculator' + app.shell.run(nombre_aplicacion) +``` + +Ejecutar comandos shell y capturar la salida. + +```py + comandos = 'ls -lh ~' + resultado = app.shell.run(comandos, True) + app.debug(resultado) +``` + +```sh +drwxr-xr-x 4 mau mau 4.0K Aug 15 23:36 Desktop +drwxr-xr-x 6 mau mau 4.0K Jun 9 23:32 Documents +drwxr-xr-x 5 mau mau 4.0K Aug 16 13:09 Downloads +drwxr-xr-x 3 mau mau 4.0K Aug 14 15:19 Pictures +drwxr-xr-x 10 mau mau 4.0K Jun 19 19:36 Projects +drwxr-xr-x 2 mau mau 4.0K May 11 22:36 Templates +drwxr-xr-x 2 mau mau 4.0K Jul 19 13:37 Videos +``` + +Ejectuar comandos y capturar la salida línea a línea. + +```py + comandos = 'ls -lh /home/elmau' + for linea in app.shell.popen(comandos): + app.debug(linea) +``` + +
+ +### **digest** + +Obtener hash. Por default se regresa en hexadecimal. + +```py + datos = 'LibreOffice con Python' + + digest = app.hash.digest('md5', datos) + app.debug('MD5 = ', digest) + + digest = app.hash.digest('sha1', datos) + app.debug('SHA1 = ', digest) + + digest = app.hash.digest('sha256', datos) + app.debug('SHA256 = ', digest) + + digest = app.hash.digest('sha512', datos) + app.debug('SHA512 = ', digest) +``` + +``` +16/08/2022 18:48:07 - DEBUG - MD5 = 3801759ead20abc3ce0d0095289bdcfd +16/08/2022 18:48:07 - DEBUG - SHA1 = 1df74aaae9658c21074aa5a2d4c2055dcf79f0db +16/08/2022 18:48:07 - DEBUG - SHA256 = 228e90b15b6259307e580677939b1f2f45e9317461e98f603af8fcac0f9a598f +16/08/2022 18:48:07 - DEBUG - SHA512 = 3ef45f79f3bfd2b251d250489c91b631306456405510397fb1a7ee37005d196376b7d6ca86a9895f4eb97eb74813965c24d6564a383f4bdb1360665c8fbb192a +``` + +Para obtener bytes. + +```py + digest = app.hash.digest('md5', datos, False) + app.debug('MD5 = ', digest) +``` + +```sh +16/08/2022 18:48:07 - DEBUG - MD5 = b'8\x01u\x9e\xad \xab\xc3\xce\r\x00\x95(\x9b\xdc\xfd' +``` + +
+ +### **config** + +Puede guardar datos de configuración de su macro o extensión dentro del perfil de usuario. + +```py + nombre = 'mi_extension' + datos = { + 'ruta': '/home/mau/pruebas', + 'guardar': True, + } + + if app.config.set(nombre, datos): + app.debug('Configuración guardada...') +``` + +Y recuperarlos en cualquier momento. + +```py + datos = app.config.get(nombre) + app.debug(datos) +``` + +!!! tip + + No olvide respaldar el perfil de usuario si quiere conservar esta información cuando se reinstala LibreOffice o falla el perfil de usuario. + +
+ +### **color** + +Puede ver los colores que puede usar en Wikipedia [Colores Web][1] + +```py + color_nombre = 'darkblue' + color = app.color(color_nombre) + app.debug(color) + + color_rgb = (125, 200, 10) + color = app.color(color_rgb) + app.debug(color) + + color_html = '#008080' + color = app.color(color_html) + app.debug(color) +``` + +
+ +[1]: https://es.wikipedia.org/wiki/Colores_web diff --git a/doc/layouts/partials/logo.html b/doc/layouts/partials/logo.html deleted file mode 100644 index fc67e09..0000000 --- a/doc/layouts/partials/logo.html +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/doc/mkdocs.yml b/doc/mkdocs.yml new file mode 100644 index 0000000..2ce9bd3 --- /dev/null +++ b/doc/mkdocs.yml @@ -0,0 +1,56 @@ +site_name: EasyMacro para LibreOffice +site_url: https://doc.cuates.net/easymacro/ +repo_url: https://git.cuates.net/elmau/easymacro/ +nav: + - Home: index.md + - Instalación: install.md + - Depurar: debug.md + - Herramientas: + - tools/index.md + - Mensajes: tools/messages.md + - Fechas y tiempo: tools/datetime.md + - Rutas y archivos: tools/paths.md + - Correo electrónico: tools/email.md + - Hilos: tools/threads.md + - Ejecutar macros: tools/macros.md + - Timer: tools/timer.md + - Peticiones HTTP: tools/request.md + - Utilidades: tools/utils.md + - LibreOffice: + - app/index.md + - Accesos directos: app/shortcuts.md + - Menús: app/menus.md + - Documentos: + - docs/index.md + - Propiedades: docs/properties.md + - Métodos: docs/methods.md +theme: + name: material + locale: es + font: false + highlightjs: true + palette: + primary: green + features: + - navigation.path + - content.code.copy + - content.code.select +markdown_extensions: + - admonition + - pymdownx.details + - pymdownx.superfences + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences +#~ extra: + #~ alternate: + #~ - name: Español + #~ link: / + #~ lang: es + #~ - name: English + #~ link: /en/ + #~ lang: en diff --git a/doc/public/404.html b/doc/public/404.html deleted file mode 100644 index ec988c9..0000000 --- a/doc/public/404.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - 404 Page not found - - - - - - - - - - - - - - - - - - -
-
-
-
-

Error

-

-

-

Woops. Looks like this page doesn't exist ¯\_(ツ)_/¯.

-

-

Go to homepage

-

Page not found!

-
-
- -
- - - diff --git a/doc/public/categories/index.html b/doc/public/categories/index.html deleted file mode 100644 index b6cb43b..0000000 --- a/doc/public/categories/index.html +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - - - - - - Categories :: EasyMacro's documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - category :: - - Categories -

- - - - - - - - -
    - -
- - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/categories/index.xml b/doc/public/categories/index.xml deleted file mode 100644 index 1ab2055..0000000 --- a/doc/public/categories/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Categories on EasyMacro's documentation - https://doc.cuates.net/easymacro/categories/ - Recent content in Categories on EasyMacro's documentation - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/css/atom-one-dark-reasonable.css b/doc/public/css/atom-one-dark-reasonable.css deleted file mode 100644 index fd41c99..0000000 --- a/doc/public/css/atom-one-dark-reasonable.css +++ /dev/null @@ -1,77 +0,0 @@ -/* - -Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage - -Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax - -*/ -.hljs { - display: block; - overflow-x: auto; - padding: 0.5em; - line-height: 1.3em; - color: #abb2bf; - background: #282c34; - border-radius: 5px; -} -.hljs-keyword, .hljs-operator { - color: #F92672; -} -.hljs-pattern-match { - color: #F92672; -} -.hljs-pattern-match .hljs-constructor { - color: #61aeee; -} -.hljs-function { - color: #61aeee; -} -.hljs-function .hljs-params { - color: #A6E22E; -} -.hljs-function .hljs-params .hljs-typing { - color: #FD971F; -} -.hljs-module-access .hljs-module { - color: #7e57c2; -} -.hljs-constructor { - color: #e2b93d; -} -.hljs-constructor .hljs-string { - color: #9CCC65; -} -.hljs-comment, .hljs-quote { - color: #b18eb1; - font-style: italic; -} -.hljs-doctag, .hljs-formula { - color: #c678dd; -} -.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst { - color: #e06c75; -} -.hljs-literal { - color: #56b6c2; -} -.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string { - color: #98c379; -} -.hljs-built_in, .hljs-class .hljs-title { - color: #e6c07b; -} -.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number { - color: #d19a66; -} -.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title { - color: #61aeee; -} -.hljs-emphasis { - font-style: italic; -} -.hljs-strong { - font-weight: bold; -} -.hljs-link { - text-decoration: underline; -} diff --git a/doc/public/css/auto-complete.css b/doc/public/css/auto-complete.css deleted file mode 100644 index ac6979a..0000000 --- a/doc/public/css/auto-complete.css +++ /dev/null @@ -1,47 +0,0 @@ -.autocomplete-suggestions { - text-align: left; - cursor: default; - border: 1px solid #ccc; - border-top: 0; - background: #fff; - box-shadow: -1px 1px 3px rgba(0,0,0,.1); - - /* core styles should not be changed */ - position: absolute; - display: none; - z-index: 9999; - max-height: 254px; - overflow: hidden; - overflow-y: auto; - box-sizing: border-box; - -} -.autocomplete-suggestion { - position: relative; - cursor: pointer; - padding: 7px; - line-height: 23px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - color: #333; -} - -.autocomplete-suggestion b { - font-weight: normal; - color: #1f8dd6; -} - -.autocomplete-suggestion.selected { - background: #333; - color: #fff; -} - -.autocomplete-suggestion:hover { - background: #444; - color: #fff; -} - -.autocomplete-suggestion > .context { - font-size: 12px; -} diff --git a/doc/public/css/custom.css b/doc/public/css/custom.css deleted file mode 100644 index 8b13789..0000000 --- a/doc/public/css/custom.css +++ /dev/null @@ -1 +0,0 @@ - diff --git a/doc/public/css/featherlight.min.css b/doc/public/css/featherlight.min.css deleted file mode 100644 index 058487f..0000000 --- a/doc/public/css/featherlight.min.css +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Featherlight - ultra slim jQuery lightbox - * Version 1.7.13 - http://noelboss.github.io/featherlight/ - * - * Copyright 2018, Noël Raoul Bossart (http://www.noelboss.com) - * MIT Licensed. -**/ -html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{html.with-featherlight>*>:not(.featherlight){display:none}} \ No newline at end of file diff --git a/doc/public/css/fontawesome-all.min.css b/doc/public/css/fontawesome-all.min.css deleted file mode 100644 index de56473..0000000 --- a/doc/public/css/fontawesome-all.min.css +++ /dev/null @@ -1 +0,0 @@ -.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-icicles:before{content:"\f7ad"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/doc/public/css/hugo-theme.css b/doc/public/css/hugo-theme.css deleted file mode 100644 index ae1fe79..0000000 --- a/doc/public/css/hugo-theme.css +++ /dev/null @@ -1,241 +0,0 @@ -/* Insert here special css for hugo theme, on top of any other imported css */ - - -/* Table of contents */ - -.progress ul { - list-style: none; - margin: 0; - padding: 0 15px; -} - -#TableOfContents { - font-size: 13px !important; - max-height: 85vh; - overflow: auto; - padding: 15px 5px !important; -} - -#TableOfContents > ul > li > a { - font-weight: bold; -} - -body { - font-size: 16px !important; - color: #323232 !important; -} - -#body a.highlight, #body a.highlight:hover, #body a.highlight:focus { - text-decoration: none; - outline: none; - outline: 0; -} -#body a.highlight { - line-height: 1.1; - display: inline-block; -} -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - background-color: #0082a7; /*#CE3B2F*/ - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; -} -#body a.highlight:hover:after, #body a.highlight:focus:after { - width: 100%; -} -.progress { - position:absolute; - background-color: rgba(246, 246, 246, 0.97); - width: auto; - border: thin solid #ECECEC; - display:none; - z-index:200; -} - -#toc-menu { - border-right: thin solid #DAD8D8 !important; - padding-right: 1rem !important; - margin-right: 0.5rem !important; -} - -#sidebar-toggle-span { - border-right: thin solid #DAD8D8 !important; - padding-right: 0.5rem !important; - margin-right: 1rem !important; -} - -.btn { - display: inline-block !important; - padding: 6px 12px !important; - margin-bottom: 0 !important; - font-size: 14px !important; - font-weight: normal !important; - line-height: 1.42857143 !important; - text-align: center !important; - white-space: nowrap !important; - vertical-align: middle !important; - -ms-touch-action: manipulation !important; - touch-action: manipulation !important; - cursor: pointer !important; - -webkit-user-select: none !important; - -moz-user-select: none !important; - -ms-user-select: none !important; - user-select: none !important; - background-image: none !important; - border: 1px solid transparent !important; - border-radius: 4px !important; - -webkit-transition: all 0.15s !important; - -moz-transition: all 0.15s !important; - transition: all 0.15s !important; -} -.btn:focus { - /*outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px;*/ - outline: none !important; -} -.btn:hover, -.btn:focus { - color: #2b2b2b !important; - text-decoration: none !important; -} - -.btn-default { - color: #333 !important; - background-color: #fff !important; - border-color: #ccc !important; -} -.btn-default:hover, -.btn-default:focus, -.btn-default:active { - color: #fff !important; - background-color: #9e9e9e !important; - border-color: #9e9e9e !important; -} -.btn-default:active { - background-image: none !important; -} - -/* anchors */ -.anchor { - color: #00bdf3; - font-size: 0.5em; - cursor:pointer; - visibility:hidden; - margin-left: 0.5em; - position: absolute; - margin-top:0.1em; -} - -h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { - visibility:visible; -} - -/* Redfines headers style */ - -h2, h3, h4, h5, h6 { - font-weight: 400; - line-height: 1.1; -} - -h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { - font-weight: inherit; -} - -h2 { - font-size: 2.5rem; - line-height: 110% !important; - margin: 2.5rem 0 1.5rem 0; -} - -h3 { - font-size: 2rem; - line-height: 110% !important; - margin: 2rem 0 1rem 0; -} - -h4 { - font-size: 1.5rem; - line-height: 110% !important; - margin: 1.5rem 0 0.75rem 0; -} - -h5 { - font-size: 1rem; - line-height: 110% !important; - margin: 1rem 0 0.2rem 0; -} - -h6 { - font-size: 0.5rem; - line-height: 110% !important; - margin: 0.5rem 0 0.2rem 0; -} - -p { - margin: 1rem 0; -} - -figcaption h4 { - font-weight: 300 !important; - opacity: .85; - font-size: 1em; - text-align: center; - margin-top: -1.5em; -} - -.select-style { - border: 0; - width: 150px; - border-radius: 0px; - overflow: hidden; - display: inline-flex; -} - -.select-style svg { - fill: #ccc; - width: 14px; - height: 14px; - pointer-events: none; - margin: auto; -} - -.select-style svg:hover { - fill: #e6e6e6; -} - -.select-style select { - padding: 0; - width: 130%; - border: none; - box-shadow: none; - background: transparent; - background-image: none; - -webkit-appearance: none; - margin: auto; - margin-left: 0px; - margin-right: -20px; -} - -.select-style select:focus { - outline: none; -} - -.select-style :hover { - cursor: pointer; -} - -@media only all and (max-width: 47.938em) { - #breadcrumbs .links, #top-github-link-text { - display: none; - } -} - -.is-sticky #top-bar { - box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.1); -} \ No newline at end of file diff --git a/doc/public/css/hybrid.css b/doc/public/css/hybrid.css deleted file mode 100644 index 29735a1..0000000 --- a/doc/public/css/hybrid.css +++ /dev/null @@ -1,102 +0,0 @@ -/* - -vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) - -*/ - -/*background color*/ -.hljs { - display: block; - overflow-x: auto; - padding: 0.5em; - background: #1d1f21; -} - -/*selection color*/ -.hljs::selection, -.hljs span::selection { - background: #373b41; -} - -.hljs::-moz-selection, -.hljs span::-moz-selection { - background: #373b41; -} - -/*foreground color*/ -.hljs { - color: #c5c8c6; -} - -/*color: fg_yellow*/ -.hljs-title, -.hljs-name { - color: #f0c674; -} - -/*color: fg_comment*/ -.hljs-comment, -.hljs-meta, -.hljs-meta .hljs-keyword { - color: #707880; -} - -/*color: fg_red*/ -.hljs-number, -.hljs-symbol, -.hljs-literal, -.hljs-deletion, -.hljs-link { - color: #cc6666 -} - -/*color: fg_green*/ -.hljs-string, -.hljs-doctag, -.hljs-addition, -.hljs-regexp, -.hljs-selector-attr, -.hljs-selector-pseudo { - color: #b5bd68; -} - -/*color: fg_purple*/ -.hljs-attribute, -.hljs-code, -.hljs-selector-id { - color: #b294bb; -} - -/*color: fg_blue*/ -.hljs-keyword, -.hljs-selector-tag, -.hljs-bullet, -.hljs-tag { - color: #81a2be; -} - -/*color: fg_aqua*/ -.hljs-subst, -.hljs-variable, -.hljs-template-tag, -.hljs-template-variable { - color: #8abeb7; -} - -/*color: fg_orange*/ -.hljs-type, -.hljs-built_in, -.hljs-builtin-name, -.hljs-quote, -.hljs-section, -.hljs-selector-class { - color: #de935f; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} diff --git a/doc/public/css/nucleus.css b/doc/public/css/nucleus.css deleted file mode 100644 index 1897fc5..0000000 --- a/doc/public/css/nucleus.css +++ /dev/null @@ -1,615 +0,0 @@ -*, *::before, *::after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; } - -@-webkit-viewport { - width: device-width; } -@-moz-viewport { - width: device-width; } -@-ms-viewport { - width: device-width; } -@-o-viewport { - width: device-width; } -@viewport { - width: device-width; } -html { - font-size: 100%; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; } - -body { - margin: 0; } - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; } - -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; } - -audio:not([controls]) { - display: none; - height: 0; } - -[hidden], -template { - display: none; } - -a { - background: transparent; - text-decoration: none; } - -a:active, -a:hover { - outline: 0; } - -abbr[title] { - border-bottom: 1px dotted; } - -b, -strong { - font-weight: bold; } - -dfn { - font-style: italic; } - -mark { - background: #FFFF27; - color: #333; } - -sub, -sup { - font-size: 0.8rem; - line-height: 0; - position: relative; - vertical-align: baseline; } - -sup { - top: -0.5em; } - -sub { - bottom: -0.25em; } - -img { - border: 0; - max-width: 100%; } - -svg:not(:root) { - overflow: hidden; } - -figure { - margin: 1em 40px; } - -hr { - height: 0; } - -pre { - overflow: auto; } - -button, -input, -optgroup, -select, -textarea { - color: inherit; - font: inherit; - margin: 0; } - -button { - overflow: visible; } - -button, -select { - text-transform: none; } - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; } - -button[disabled], -html input[disabled] { - cursor: default; } - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; } - -input { - line-height: normal; } - -input[type="checkbox"], -input[type="radio"] { - padding: 0; } - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; } - -input[type="search"] { - -webkit-appearance: textfield; } - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; } - -legend { - border: 0; - padding: 0; } - -textarea { - overflow: auto; } - -optgroup { - font-weight: bold; } - -table { - border-collapse: collapse; - border-spacing: 0; - table-layout: fixed; - width: 100%; } - -tr, td, th { - vertical-align: middle; } - -th, td { - padding: 0.425rem 0; } - -th { - text-align: left; } - -.container { - width: 75em; - margin: 0 auto; - padding: 0; } - @media only all and (min-width: 60em) and (max-width: 74.938em) { - .container { - width: 60em; } } - @media only all and (min-width: 48em) and (max-width: 59.938em) { - .container { - width: 48em; } } - @media only all and (min-width: 30.063em) and (max-width: 47.938em) { - .container { - width: 30em; } } - @media only all and (max-width: 30em) { - .container { - width: 100%; } } - -.grid { - display: -webkit-box; - display: -moz-box; - display: box; - display: -webkit-flex; - display: -moz-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-flow: row; - -moz-flex-flow: row; - flex-flow: row; - list-style: none; - margin: 0; - padding: 0; } - @media only all and (max-width: 47.938em) { - .grid { - -webkit-flex-flow: row wrap; - -moz-flex-flow: row wrap; - flex-flow: row wrap; } } - -.block { - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -moz-flex: 1; - -ms-flex: 1; - flex: 1; - min-width: 0; - min-height: 0; } - @media only all and (max-width: 47.938em) { - .block { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 100%; - -moz-flex: 0 100%; - -ms-flex: 0 100%; - flex: 0 100%; } } - -.content { - margin: 0.625rem; - padding: 0.938rem; } - -@media only all and (max-width: 47.938em) { - body [class*="size-"] { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 100%; - -moz-flex: 0 100%; - -ms-flex: 0 100%; - flex: 0 100%; } } - -.size-1-2 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 50%; - -moz-flex: 0 50%; - -ms-flex: 0 50%; - flex: 0 50%; } - -.size-1-3 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 33.33333%; - -moz-flex: 0 33.33333%; - -ms-flex: 0 33.33333%; - flex: 0 33.33333%; } - -.size-1-4 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 25%; - -moz-flex: 0 25%; - -ms-flex: 0 25%; - flex: 0 25%; } - -.size-1-5 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 20%; - -moz-flex: 0 20%; - -ms-flex: 0 20%; - flex: 0 20%; } - -.size-1-6 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 16.66667%; - -moz-flex: 0 16.66667%; - -ms-flex: 0 16.66667%; - flex: 0 16.66667%; } - -.size-1-7 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 14.28571%; - -moz-flex: 0 14.28571%; - -ms-flex: 0 14.28571%; - flex: 0 14.28571%; } - -.size-1-8 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 12.5%; - -moz-flex: 0 12.5%; - -ms-flex: 0 12.5%; - flex: 0 12.5%; } - -.size-1-9 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 11.11111%; - -moz-flex: 0 11.11111%; - -ms-flex: 0 11.11111%; - flex: 0 11.11111%; } - -.size-1-10 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 10%; - -moz-flex: 0 10%; - -ms-flex: 0 10%; - flex: 0 10%; } - -.size-1-11 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 9.09091%; - -moz-flex: 0 9.09091%; - -ms-flex: 0 9.09091%; - flex: 0 9.09091%; } - -.size-1-12 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 8.33333%; - -moz-flex: 0 8.33333%; - -ms-flex: 0 8.33333%; - flex: 0 8.33333%; } - -@media only all and (min-width: 48em) and (max-width: 59.938em) { - .size-tablet-1-2 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 50%; - -moz-flex: 0 50%; - -ms-flex: 0 50%; - flex: 0 50%; } - - .size-tablet-1-3 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 33.33333%; - -moz-flex: 0 33.33333%; - -ms-flex: 0 33.33333%; - flex: 0 33.33333%; } - - .size-tablet-1-4 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 25%; - -moz-flex: 0 25%; - -ms-flex: 0 25%; - flex: 0 25%; } - - .size-tablet-1-5 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 20%; - -moz-flex: 0 20%; - -ms-flex: 0 20%; - flex: 0 20%; } - - .size-tablet-1-6 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 16.66667%; - -moz-flex: 0 16.66667%; - -ms-flex: 0 16.66667%; - flex: 0 16.66667%; } - - .size-tablet-1-7 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 14.28571%; - -moz-flex: 0 14.28571%; - -ms-flex: 0 14.28571%; - flex: 0 14.28571%; } - - .size-tablet-1-8 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 12.5%; - -moz-flex: 0 12.5%; - -ms-flex: 0 12.5%; - flex: 0 12.5%; } - - .size-tablet-1-9 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 11.11111%; - -moz-flex: 0 11.11111%; - -ms-flex: 0 11.11111%; - flex: 0 11.11111%; } - - .size-tablet-1-10 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 10%; - -moz-flex: 0 10%; - -ms-flex: 0 10%; - flex: 0 10%; } - - .size-tablet-1-11 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 9.09091%; - -moz-flex: 0 9.09091%; - -ms-flex: 0 9.09091%; - flex: 0 9.09091%; } - - .size-tablet-1-12 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 8.33333%; - -moz-flex: 0 8.33333%; - -ms-flex: 0 8.33333%; - flex: 0 8.33333%; } } -@media only all and (max-width: 47.938em) { - @supports not (flex-wrap: wrap) { - .grid { - display: block; - -webkit-box-lines: inherit; - -moz-box-lines: inherit; - box-lines: inherit; - -webkit-flex-wrap: inherit; - -moz-flex-wrap: inherit; - -ms-flex-wrap: inherit; - flex-wrap: inherit; } - - .block { - display: block; - -webkit-box-flex: inherit; - -moz-box-flex: inherit; - box-flex: inherit; - -webkit-flex: inherit; - -moz-flex: inherit; - -ms-flex: inherit; - flex: inherit; } } } -.first-block { - -webkit-box-ordinal-group: 0; - -webkit-order: -1; - -ms-flex-order: -1; - order: -1; } - -.last-block { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; } - -.fixed-blocks { - -webkit-flex-flow: row wrap; - -moz-flex-flow: row wrap; - flex-flow: row wrap; } - .fixed-blocks .block { - -webkit-box-flex: inherit; - -moz-box-flex: inherit; - box-flex: inherit; - -webkit-flex: inherit; - -moz-flex: inherit; - -ms-flex: inherit; - flex: inherit; - width: 25%; } - @media only all and (min-width: 60em) and (max-width: 74.938em) { - .fixed-blocks .block { - width: 33.33333%; } } - @media only all and (min-width: 48em) and (max-width: 59.938em) { - .fixed-blocks .block { - width: 50%; } } - @media only all and (max-width: 47.938em) { - .fixed-blocks .block { - width: 100%; } } - -body { - font-size: 1.05rem; - line-height: 1.7; } - -h1, h2, h3, h4, h5, h6 { - margin: 0.85rem 0 1.7rem 0; - text-rendering: optimizeLegibility; } - -h1 { - font-size: 3.25rem; } - -h2 { - font-size: 2.55rem; } - -h3 { - font-size: 2.15rem; } - -h4 { - font-size: 1.8rem; } - -h5 { - font-size: 1.4rem; } - -h6 { - font-size: 0.9rem; } - -p { - margin: 1.7rem 0; } - -ul, ol { - margin-top: 1.7rem; - margin-bottom: 1.7rem; } - ul ul, ul ol, ol ul, ol ol { - margin-top: 0; - margin-bottom: 0; } - -blockquote { - margin: 1.7rem 0; - padding-left: 0.85rem; } - -cite { - display: block; - font-size: 0.925rem; } - cite:before { - content: "\2014 \0020"; } - -pre { - margin: 1.7rem 0; - padding: 0.938rem; } - -code { - vertical-align: bottom; } - -small { - font-size: 0.925rem; } - -hr { - border-left: none; - border-right: none; - border-top: none; - margin: 1.7rem 0; } - -fieldset { - border: 0; - padding: 0.938rem; - margin: 0 0 1.7rem 0; } - -input, -label, -select { - display: block; } - -label { - margin-bottom: 0.425rem; } - label.required:after { - content: "*"; } - label abbr { - display: none; } - -textarea, input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], select[multiple=multiple] { - -webkit-transition: border-color; - -moz-transition: border-color; - transition: border-color; - border-radius: 0.1875rem; - margin-bottom: 0.85rem; - padding: 0.425rem 0.425rem; - width: 100%; } - textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - outline: none; } - -textarea { - resize: vertical; } - -input[type="checkbox"], input[type="radio"] { - display: inline; - margin-right: 0.425rem; } - -input[type="file"] { - width: 100%; } - -select { - width: auto; - max-width: 100%; - margin-bottom: 1.7rem; } - -button, -input[type="submit"] { - cursor: pointer; - user-select: none; - vertical-align: middle; - white-space: nowrap; - border: inherit; } diff --git a/doc/public/css/perfect-scrollbar.min.css b/doc/public/css/perfect-scrollbar.min.css deleted file mode 100644 index ebd2cb4..0000000 --- a/doc/public/css/perfect-scrollbar.min.css +++ /dev/null @@ -1,2 +0,0 @@ -/* perfect-scrollbar v0.6.13 */ -.ps-container{-ms-touch-action:auto;touch-action:auto;overflow:hidden !important;-ms-overflow-style:none}@supports (-ms-overflow-style: none){.ps-container{overflow:auto !important}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.ps-container{overflow:auto !important}}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block;background-color:transparent}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;bottom:0px;height:15px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;bottom:2px;height:6px}.ps-container>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x,.ps-container>.ps-scrollbar-x-rail:active>.ps-scrollbar-x{height:11px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;right:0;width:15px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;right:2px;width:6px}.ps-container>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y,.ps-container>.ps-scrollbar-y-rail:active>.ps-scrollbar-y{width:11px}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999} diff --git a/doc/public/css/tabs.css b/doc/public/css/tabs.css deleted file mode 100644 index 2ad2728..0000000 --- a/doc/public/css/tabs.css +++ /dev/null @@ -1,43 +0,0 @@ -#body .tab-nav-button { - border-width: 1px 1px 1px 1px !important; - border-color: #ccc !important; - border-radius: 4px 4px 0 0 !important; - background-color: #ddd !important; - float: left; - display: block; - position: relative; - margin-left: 4px; - bottom: -1px; -} -#body .tab-nav-button:first-child { - margin-left: 0px; -} -#body .tab-nav-button.active { - background-color: #fff !important; - border-bottom-color: #fff !important; -} - -#body .tab-panel { - margin-top: 32px; - margin-bottom: 32px; -} -#body .tab-content { - display: block; - clear: both; - padding: 8px; - border-width: 1px; - border-style: solid; - border-color: #ccc; -} -#body .tab-content .tab-item{ - display: none; -} - -#body .tab-content .tab-item.active{ - display: block; -} - -#body .tab-item pre{ - margin-bottom: 0; - margin-top: 0; -} diff --git a/doc/public/css/tags.css b/doc/public/css/tags.css deleted file mode 100644 index 495d2f9..0000000 --- a/doc/public/css/tags.css +++ /dev/null @@ -1,49 +0,0 @@ -/* Tags */ - -#head-tags{ - margin-left:1em; - margin-top:1em; -} - -#body .tags a.tag-link { - display: inline-block; - line-height: 2em; - font-size: 0.8em; - position: relative; - margin: 0 16px 8px 0; - padding: 0 10px 0 12px; - background: #8451a1; - - -webkit-border-bottom-right-radius: 3px; - border-bottom-right-radius: 3px; - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; - - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); - box-shadow: 0 1px 2px rgba(0,0,0,0.2); - color: #fff; -} - -#body .tags a.tag-link:before { - content: ""; - position: absolute; - top:0; - left: -1em; - width: 0; - height: 0; - border-color: transparent #8451a1 transparent transparent; - border-style: solid; - border-width: 1em 1em 1em 0; -} - -#body .tags a.tag-link:after { - content: ""; - position: absolute; - top: 10px; - left: 1px; - width: 5px; - height: 5px; - -webkit-border-radius: 50%; - border-radius: 100%; - background: #fff; -} diff --git a/doc/public/css/theme-blue.css b/doc/public/css/theme-blue.css deleted file mode 100644 index 1ee1423..0000000 --- a/doc/public/css/theme-blue.css +++ /dev/null @@ -1,128 +0,0 @@ - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#1C90F3; /* Color of links */ - --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ - --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ - - --MENU-HOME-LINK-color: #323232; /* Color of the home button text */ - --MENU-HOME-LINK-HOVER-color: #5e5e5e; /* Color of the hovered home button text */ - - --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #20272b; /* Color of
separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-LINK-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - -#body .tags a.tag-link { - background-color: var(--MENU-HEADER-BG-color); -} - -#body .tags a.tag-link:before { - border-right-color: var(--MENU-HEADER-BG-color); -} - -#homelinks { - background: var(--MENU-HEADER-BG-color); - background-color: var(--MENU-HEADER-BORDER-color); - border-bottom-color: var(--MENU-HEADER-BORDER-color); -} - -#homelinks a { - color: var(--MENU-HOME-LINK-color); -} - -#homelinks a:hover { - color: var(--MENU-HOME-LINK-HOVERED-color); -} \ No newline at end of file diff --git a/doc/public/css/theme-green.css b/doc/public/css/theme-green.css deleted file mode 100644 index c074679..0000000 --- a/doc/public/css/theme-green.css +++ /dev/null @@ -1,128 +0,0 @@ - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#599a3e; /* Color of links */ - --MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */ - --MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */ - - --MENU-HOME-LINK-color: #323232; /* Color of the home button text */ - --MENU-HOME-LINK-HOVER-color: #5e5e5e; /* Color of the hovered home button text */ - - --MENU-HEADER-BG-color:#74b559; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #18211c; /* Color of
separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-LINK-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - -#body .tags a.tag-link { - background-color: var(--MENU-HEADER-BG-color); -} - -#body .tags a.tag-link:before { - border-right-color: var(--MENU-HEADER-BG-color); -} - -#homelinks { - background: var(--MENU-HEADER-BG-color); - background-color: var(--MENU-HEADER-BORDER-color); - border-bottom-color: var(--MENU-HEADER-BORDER-color); -} - -#homelinks a { - color: var(--MENU-HOME-LINK-color); -} - -#homelinks a:hover { - color: var(--MENU-HOME-LINK-HOVERED-color); -} \ No newline at end of file diff --git a/doc/public/css/theme-red.css b/doc/public/css/theme-red.css deleted file mode 100644 index c5f2674..0000000 --- a/doc/public/css/theme-red.css +++ /dev/null @@ -1,128 +0,0 @@ - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#f31c1c; /* Color of links */ - --MAIN-LINK-HOVER-color:#d01616; /* Color of hovered links */ - --MAIN-ANCHOR-color: #f31c1c; /* color of anchors on titles */ - - --MENU-HOME-LINK-color: #ccc; /* Color of the home button text */ - --MENU-HOME-LINK-HOVER-color: #e6e6e6; /* Color of the hovered home button text */ - - --MENU-HEADER-BG-color:#dc1010; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#e23131; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#b90000; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #ef2020; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #fda1a1; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#2b2020; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#312525; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #ff3333; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #2b2020; /* Color of
separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-LINK-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - -#body .tags a.tag-link { - background-color: var(--MENU-HEADER-BG-color); -} - -#body .tags a.tag-link:before { - border-right-color: var(--MENU-HEADER-BG-color); -} - -#homelinks { - background: var(--MENU-HEADER-BG-color); - background-color: var(--MENU-HEADER-BORDER-color); - border-bottom-color: var(--MENU-HEADER-BORDER-color); -} - -#homelinks a { - color: var(--MENU-HOME-LINK-color); -} - -#homelinks a:hover { - color: var(--MENU-HOME-LINK-HOVERED-color); -} \ No newline at end of file diff --git a/doc/public/css/theme.css b/doc/public/css/theme.css deleted file mode 100644 index 98a5584..0000000 --- a/doc/public/css/theme.css +++ /dev/null @@ -1,1143 +0,0 @@ -@charset "UTF-8"; - -/* Tags */ -@import "tags.css"; - -#top-github-link, #body #breadcrumbs { - position: relative; - top: 50%; - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); - -o-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); -} -.button, .button-secondary { - display: inline-block; - padding: 7px 12px; -} -.button:active, .button-secondary:active { - margin: 2px 0 -2px 0; -} -@font-face { - font-family: 'Novacento Sans Wide'; - src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot"); - src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff2") format("woff2"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff") format("woff"), url("../fonts/Novecentosanswide-UltraLight-webfont.ttf") format("truetype"), url("../fonts/Novecentosanswide-UltraLight-webfont.svg#novecento_sans_wideultralight") format("svg"); - font-style: normal; - font-weight: 200; -} -@font-face { - font-family: 'Work Sans'; - font-style: normal; - font-weight: 300; - src: url("../fonts/Work_Sans_300.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_300.woff") format("woff"), url("../fonts/Work_Sans_300.woff2") format("woff2"), url("../fonts/Work_Sans_300.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_300.ttf") format("truetype"); -} -@font-face { - font-family: 'Work Sans'; - font-style: normal; - font-weight: 500; - src: url("../fonts/Work_Sans_500.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_500.woff") format("woff"), url("../fonts/Work_Sans_500.woff2") format("woff2"), url("../fonts/Work_Sans_500.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_500.ttf") format("truetype"); -} -body { - background: #fff; - color: #777; -} -body #chapter h1 { - font-size: 3.5rem; -} -@media only all and (min-width: 48em) and (max-width: 59.938em) { - body #chapter h1 { - font-size: 3rem; - } -} -@media only all and (max-width: 47.938em) { - body #chapter h1 { - font-size: 2rem; - } -} -a { - color: #00bdf3; -} -a:hover { - color: #0082a7; -} -pre { - position: relative; - color: #ffffff; -} -.bg { - background: #fff; - border: 1px solid #eaeaea; -} -b, strong, label, th { - font-weight: 600; -} -.default-animation, #header #logo-svg, #header #logo-svg path, #sidebar, #sidebar ul, #body, #body .padding, #body .nav { - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - transition: all 0.5s ease; -} -#grav-logo { - max-width: 60%; -} -#grav-logo path { - fill: #fff !important; -} -#sidebar { - font-weight: 300 !important; -} -fieldset { - border: 1px solid #ddd; -} -textarea, input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], select[multiple=multiple] { - background-color: white; - border: 1px solid #ddd; - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); -} -textarea:hover, input[type="email"]:hover, input[type="number"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="tel"]:hover, input[type="text"]:hover, input[type="url"]:hover, input[type="color"]:hover, input[type="date"]:hover, input[type="datetime"]:hover, input[type="datetime-local"]:hover, input[type="month"]:hover, input[type="time"]:hover, input[type="week"]:hover, select[multiple=multiple]:hover { - border-color: #c4c4c4; -} -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: #00bdf3; - box-shadow: inset 0 1px 3px rgba(0,0,0,.06),0 0 5px rgba(0,169,218,.7) -} -#header-wrapper { - background: #8451a1; - color: #fff; - text-align: center; - border-bottom: 4px solid #9c6fb6; - padding: 1rem; -} -#header a { - display: inline-block; -} -#header #logo-svg { - width: 8rem; - height: 2rem; -} -#header #logo-svg path { - fill: #fff; -} -.searchbox { - margin-top: 1rem; - position: relative; - border: 1px solid #915eae; - background: #764890; - border-radius: 4px; -} -.searchbox label { - color: rgba(255, 255, 255, 0.8); - position: absolute; - left: 10px; - top: 3px; -} -.searchbox span { - color: rgba(255, 255, 255, 0.6); - position: absolute; - right: 10px; - top: 3px; - cursor: pointer; -} -.searchbox span:hover { - color: rgba(255, 255, 255, 0.9); -} -.searchbox input { - display: inline-block; - color: #fff; - width: 100%; - height: 30px; - background: transparent; - border: 0; - padding: 0 25px 0 30px; - margin: 0; - font-weight: 300; -} -.searchbox input::-webkit-input-placeholder { - color: rgba(255, 255, 255, 0.6); -} -.searchbox input::-moz-placeholder { - color: rgba(255, 255, 255, 0.6); -} -.searchbox input:-moz-placeholder { - color: rgba(255, 255, 255, 0.6); -} -.searchbox input:-ms-input-placeholder { - color: rgba(255, 255, 255, 0.6); -} -#sidebar-toggle-span { - display: none; -} -@media only all and (max-width: 47.938em) { - #sidebar-toggle-span { - display: inline; - } -} -#sidebar { - background-color: #322A38; - position: fixed; - top: 0; - width: 300px; - bottom: 0; - left: 0; - font-weight: 400; - font-size: 15px; -} -#sidebar a { - color: #ccc; -} -#sidebar a:hover { - color: #e6e6e6; -} -#sidebar a.subtitle { - color: rgba(204, 204, 204, 0.6); -} -#sidebar hr { - border-bottom: 1px solid #2a232f; -} -#sidebar a.padding { - padding: 0 1rem; -} -#sidebar h5 { - margin: 2rem 0 0; - position: relative; - line-height: 2; -} -#sidebar h5 a { - display: block; - margin-left: 0; - margin-right: 0; - padding-left: 1rem; - padding-right: 1rem; -} -#sidebar h5 i { - color: rgba(204, 204, 204, 0.6); - position: absolute; - right: 0.6rem; - top: 0.7rem; - font-size: 80%; -} -#sidebar h5.parent a { - background: #201b24; - color: #d9d9d9 !important; -} -#sidebar h5.active a { - background: #fff; - color: #777 !important; -} -#sidebar h5.active i { - color: #777 !important; -} -#sidebar h5 + ul.topics { - display: none; - margin-top: 0; -} -#sidebar h5.parent + ul.topics, #sidebar h5.active + ul.topics { - display: block; -} -#sidebar ul { - list-style: none; - padding: 0; - margin: 0; -} -#sidebar ul.searched a { - color: #999999; -} -#sidebar ul.searched .search-match a { - color: #e6e6e6; -} -#sidebar ul.searched .search-match a:hover { - color: white; -} -#sidebar ul.topics { - margin: 0 1rem; -} -#sidebar ul.topics.searched ul { - display: block; -} -#sidebar ul.topics ul { - display: none; - padding-bottom: 1rem; -} -#sidebar ul.topics ul ul { - padding-bottom: 0; -} -#sidebar ul.topics li.parent ul, #sidebar ul.topics > li.active ul { - display: block; -} -#sidebar ul.topics > li > a { - line-height: 2rem; - font-size: 1.1rem; -} -#sidebar ul.topics > li > a b { - opacity: 0.5; - font-weight: normal; -} -#sidebar ul.topics > li > a .fa { - margin-top: 9px; -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: #251f29; - margin-left: -1rem; - margin-right: -1rem; - padding-left: 1rem; - padding-right: 1rem; -} -#sidebar ul li.active > a { - background: #fff; - color: #777 !important; - margin-left: -1rem; - margin-right: -1rem; - padding-left: 1rem; - padding-right: 1rem; -} -#sidebar ul li { - padding: 0; -} -#sidebar ul li.visited + span { - margin-right: 16px; -} -#sidebar ul li a { - display: block; - padding: 2px 0; -} -#sidebar ul li a span { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - display: block; -} -#sidebar ul li > a { - padding: 4px 0; -} -#sidebar ul li.visited > a .read-icon { - color: #9c6fb6; - display: inline; -} -#sidebar ul li li { - padding-left: 1rem; - text-indent: 0.2rem; -} -#main { - background: #f7f7f7; - margin: 0 0 1.563rem 0; -} -#body { - position: relative; - margin-left: 300px; - min-height: 100%; -} -#body img, #body .video-container { - margin: 3rem auto; - display: block; - text-align: center; -} -#body img.border, #body .video-container.border { - border: 2px solid #e6e6e6 !important; - padding: 2px; -} -#body img.shadow, #body .video-container.shadow { - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); -} -#body img.inline { - display: inline !important; - margin: 0 !important; - vertical-align: bottom; -} -#body .bordered { - border: 1px solid #ccc; -} -#body .padding { - padding: 3rem 6rem; -} -@media only all and (max-width: 59.938em) { - #body .padding { - position: static; - padding: 15px 3rem; - } -} -@media only all and (max-width: 47.938em) { - #body .padding { - padding: 5px 1rem; - } -} -#body h1 + hr { - margin-top: -1.7rem; - margin-bottom: 3rem; -} -@media only all and (max-width: 59.938em) { - #body #navigation { - position: static; - margin-right: 0 !important; - width: 100%; - display: table; - } -} -#body .nav { - position: fixed; - top: 0; - bottom: 0; - width: 4rem; - font-size: 50px; - height: 100%; - cursor: pointer; - display: table; - text-align: center; -} -#body .nav > i { - display: table-cell; - vertical-align: middle; - text-align: center; -} -@media only all and (max-width: 59.938em) { - #body .nav { - display: table-cell; - position: static; - top: auto; - width: 50%; - text-align: center; - height: 100px; - line-height: 100px; - padding-top: 0; - } - #body .nav > i { - display: inline-block; - } -} -#body .nav:hover { - background: #F6F6F6; -} -#body .nav.nav-pref { - left: 0; -} -#body .nav.nav-next { - right: 0; -} -#body-inner { - margin-bottom: 5rem; -} -#chapter { - display: flex; - align-items: center; - justify-content: center; - height: 100%; - padding: 2rem 0; -} -#chapter #body-inner { - padding-bottom: 3rem; - max-width: 80%; -} -#chapter h3 { - font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - font-weight: 300; - text-align: center; -} -#chapter h1 { - font-size: 5rem; - border-bottom: 4px solid #F0F2F4; -} -#chapter p { - text-align: center; - font-size: 1.2rem; -} -#footer { - padding: 3rem 1rem; - color: #b3b3b3; - font-size: 13px; -} -#footer p { - margin: 0; -} -body { - font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - font-weight: 300; - line-height: 1.6; - font-size: 18px !important; -} -h2, h3, h4, h5, h6 { - font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - text-rendering: optimizeLegibility; - color: #5e5e5e; - font-weight: 400; - letter-spacing: -1px; -} -h1 { - font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - text-align: center; - text-transform: uppercase; - color: #222; - font-weight: 200; -} -blockquote { - border-left: 10px solid #F0F2F4; -} -blockquote p { - font-size: 1.1rem; - color: #999; -} -blockquote cite { - display: block; - text-align: right; - color: #666; - font-size: 1.2rem; -} -div.notices { - margin: 2rem 0; - position: relative; -} -div.notices p { - padding: 15px; - display: block; - font-size: 1rem; - margin-top: 0rem; - margin-bottom: 0rem; - color: #666; -} -div.notices p:first-child:before { - position: absolute; - top: 2px; - color: #fff; - font-family: "Font Awesome 5 Free"; - font-weight: 900; - content: "\f06a"; - left: 10px; -} -div.notices p:first-child:after { - position: absolute; - top: 2px; - color: #fff; - left: 2rem; -} -div.notices.info p { - border-top: 30px solid #F0B37E; - background: #FFF2DB; -} -div.notices.info p:first-child:after { - content: 'Info'; -} -div.notices.warning p { - border-top: 30px solid rgba(217, 83, 79, 0.8); - background: #FAE2E2; -} -div.notices.warning p:first-child:after { - content: 'Warning'; -} -div.notices.note p { - border-top: 30px solid #6AB0DE; - background: #E7F2FA; -} -div.notices.note p:first-child:after { - content: 'Note'; -} -div.notices.tip p { - border-top: 30px solid rgba(92, 184, 92, 0.8); - background: #E6F9E6; -} -div.notices.tip p:first-child:after { - content: 'Tip'; -} - -/* attachments shortcode */ - -section.attachments { - margin: 2rem 0; - position: relative; -} - -section.attachments label { - font-weight: 400; - padding-left: 0.5em; - padding-top: 0.2em; - padding-bottom: 0.2em; - margin: 0; -} - -section.attachments .attachments-files { - padding: 15px; - display: block; - font-size: 1rem; - margin-top: 0rem; - margin-bottom: 0rem; - color: #666; -} - -section.attachments.orange label { - color: #fff; - background: #F0B37E; -} - -section.attachments.orange .attachments-files { - background: #FFF2DB; -} - -section.attachments.green label { - color: #fff; - background: rgba(92, 184, 92, 0.8); -} - -section.attachments.green .attachments-files { - background: #E6F9E6; -} - -section.attachments.blue label { - color: #fff; - background: #6AB0DE; -} - -section.attachments.blue .attachments-files { - background: #E7F2FA; -} - -section.attachments.grey label { - color: #fff; - background: #505d65; -} - -section.attachments.grey .attachments-files { - background: #f4f4f4; -} - -/* Children shortcode */ - -/* Children shortcode */ -.children p { - font-size: small; - margin-top: 0px; - padding-top: 0px; - margin-bottom: 0px; - padding-bottom: 0px; -} -.children-li p { - font-size: small; - font-style: italic; - -} -.children-h2 p, .children-h3 p { - font-size: small; - margin-top: 0px; - padding-top: 0px; - margin-bottom: 0px; - padding-bottom: 0px; -} -.children h3,.children h2 { - margin-bottom: 0px; - margin-top: 5px; -} - -code, kbd, pre, samp { - font-family: "Consolas", menlo, monospace; - font-size: 92%; -} -code { - border-radius: 2px; - white-space: nowrap; - color: #5e5e5e; - background: #FFF7DD; - border: 1px solid #fbf0cb; - padding: 0px 2px; -} -code + .copy-to-clipboard { - margin-left: -1px; - border-left: 0 !important; - font-size: inherit !important; - vertical-align: middle; - height: 21px; - top: 0; -} -pre { - padding: 1rem; - margin: 2rem 0; - background: #282c34; - border: 0; - border-radius: 2px; - line-height: 1.15; -} -pre code { - color: whitesmoke; - background: inherit; - white-space: inherit; - border: 0; - padding: 0; - margin: 0; - font-size: 15px; -} -hr { - border-bottom: 4px solid #F0F2F4; -} -.page-title { - margin-top: -25px; - padding: 25px; - float: left; - clear: both; - background: #9c6fb6; - color: #fff; -} -#body a.anchor-link { - color: #ccc; -} -#body a.anchor-link:hover { - color: #9c6fb6; -} -#body-inner .tabs-wrapper.ui-theme-badges { - background: #1d1f21; -} -#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li { - font-size: 0.9rem; - text-transform: uppercase; -} -#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li a { - background: #35393c; -} -#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li.current a { - background: #4d5257; -} -#body-inner pre { - white-space: pre-wrap; -} -.tabs-wrapper pre { - margin: 1rem 0; - border: 0; - padding: 0; - background: inherit; -} -table { - border: 1px solid #eaeaea; - table-layout: auto; -} -th { - background: #f7f7f7; - padding: 0.5rem; -} -td { - padding: 0.5rem; - border: 1px solid #eaeaea; -} -.button { - background: #9c6fb6; - color: #fff; - box-shadow: 0 3px 0 #00a5d4; -} -.button:hover { - background: #00a5d4; - box-shadow: 0 3px 0 #008db6; - color: #fff; -} -.button:active { - box-shadow: 0 1px 0 #008db6; -} -.button-secondary { - background: #F8B450; - color: #fff; - box-shadow: 0 3px 0 #f7a733; -} -.button-secondary:hover { - background: #f7a733; - box-shadow: 0 3px 0 #f69b15; - color: #fff; -} -.button-secondary:active { - box-shadow: 0 1px 0 #f69b15; -} -.bullets { - margin: 1.7rem 0; - margin-left: -0.85rem; - margin-right: -0.85rem; - overflow: auto; -} -.bullet { - float: left; - padding: 0 0.85rem; -} -.two-column-bullet { - width: 50%; -} -@media only all and (max-width: 47.938em) { - .two-column-bullet { - width: 100%; - } -} -.three-column-bullet { - width: 33.33333%; -} -@media only all and (max-width: 47.938em) { - .three-column-bullet { - width: 100%; - } -} -.four-column-bullet { - width: 25%; -} -@media only all and (max-width: 47.938em) { - .four-column-bullet { - width: 100%; - } -} -.bullet-icon { - float: left; - background: #9c6fb6; - padding: 0.875rem; - width: 3.5rem; - height: 3.5rem; - border-radius: 50%; - color: #fff; - font-size: 1.75rem; - text-align: center; -} -.bullet-icon-1 { - background: #9c6fb6; -} -.bullet-icon-2 { - background: #00f3d8; -} -.bullet-icon-3 { - background: #e6f300; -} -.bullet-content { - margin-left: 4.55rem; -} -.tooltipped { - position: relative; -} -.tooltipped:after { - position: absolute; - z-index: 1000000; - display: none; - padding: 5px 8px; - font: normal normal 11px/1.5 "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - color: #fff; - text-align: center; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-wrap: break-word; - white-space: pre; - pointer-events: none; - content: attr(aria-label); - background: rgba(0, 0, 0, 0.8); - border-radius: 3px; - -webkit-font-smoothing: subpixel-antialiased; -} -.tooltipped:before { - position: absolute; - z-index: 1000001; - display: none; - width: 0; - height: 0; - color: rgba(0, 0, 0, 0.8); - pointer-events: none; - content: ""; - border: 5px solid transparent; -} -.tooltipped:hover:before, .tooltipped:hover:after, .tooltipped:active:before, .tooltipped:active:after, .tooltipped:focus:before, .tooltipped:focus:after { - display: inline-block; - text-decoration: none; -} -.tooltipped-s:after, .tooltipped-se:after, .tooltipped-sw:after { - top: 100%; - right: 50%; - margin-top: 5px; -} -.tooltipped-s:before, .tooltipped-se:before, .tooltipped-sw:before { - top: auto; - right: 50%; - bottom: -5px; - margin-right: -5px; - border-bottom-color: rgba(0, 0, 0, 0.8); -} -.tooltipped-se:after { - right: auto; - left: 50%; - margin-left: -15px; -} -.tooltipped-sw:after { - margin-right: -15px; -} -.tooltipped-n:after, .tooltipped-ne:after, .tooltipped-nw:after { - right: 50%; - bottom: 100%; - margin-bottom: 5px; -} -.tooltipped-n:before, .tooltipped-ne:before, .tooltipped-nw:before { - top: -5px; - right: 50%; - bottom: auto; - margin-right: -5px; - border-top-color: rgba(0, 0, 0, 0.8); -} -.tooltipped-ne:after { - right: auto; - left: 50%; - margin-left: -15px; -} -.tooltipped-nw:after { - margin-right: -15px; -} -.tooltipped-s:after, .tooltipped-n:after { - transform: translateX(50%); -} -.tooltipped-w:after { - right: 100%; - bottom: 50%; - margin-right: 5px; - transform: translateY(50%); -} -.tooltipped-w:before { - top: 50%; - bottom: 50%; - left: -5px; - margin-top: -5px; - border-left-color: rgba(0, 0, 0, 0.8); -} -.tooltipped-e:after { - bottom: 50%; - left: 100%; - margin-left: 5px; - transform: translateY(50%); -} -.tooltipped-e:before { - top: 50%; - right: -5px; - bottom: 50%; - margin-top: -5px; - border-right-color: rgba(0, 0, 0, 0.8); -} -.highlightable { - padding: 1rem 0 1rem; - overflow: auto; - position: relative; -} -.hljs::selection, .hljs span::selection { - background: #b7b7b7; -} -.lightbox-active #body { - overflow: visible; -} -.lightbox-active #body .padding { - overflow: visible; -} -#github-contrib i { - vertical-align: middle; -} -.featherlight img { - margin: 0 !important; -} -.lifecycle #body-inner ul { - list-style: none; - margin: 0; - padding: 2rem 0 0; - position: relative; -} -.lifecycle #body-inner ol { - margin: 1rem 0 1rem 0; - padding: 2rem; - position: relative; -} -.lifecycle #body-inner ol li { - margin-left: 1rem; -} -.lifecycle #body-inner ol strong, .lifecycle #body-inner ol label, .lifecycle #body-inner ol th { - text-decoration: underline; -} -.lifecycle #body-inner ol ol { - margin-left: -1rem; -} -.lifecycle #body-inner h3[class*='level'] { - font-size: 20px; - position: absolute; - margin: 0; - padding: 4px 10px; - right: 0; - z-index: 1000; - color: #fff; - background: #1ABC9C; -} -.lifecycle #body-inner ol h3 { - margin-top: 1rem !important; - right: 2rem !important; -} -.lifecycle #body-inner .level-1 + ol { - background: #f6fefc; - border: 4px solid #1ABC9C; - color: #16A085; -} -.lifecycle #body-inner .level-1 + ol h3 { - background: #2ECC71; -} -.lifecycle #body-inner .level-2 + ol { - background: #f7fdf9; - border: 4px solid #2ECC71; - color: #27AE60; -} -.lifecycle #body-inner .level-2 + ol h3 { - background: #3498DB; -} -.lifecycle #body-inner .level-3 + ol { - background: #f3f9fd; - border: 4px solid #3498DB; - color: #2980B9; -} -.lifecycle #body-inner .level-3 + ol h3 { - background: #34495E; -} -.lifecycle #body-inner .level-4 + ol { - background: #e4eaf0; - border: 4px solid #34495E; - color: #2C3E50; -} -.lifecycle #body-inner .level-4 + ol h3 { - background: #34495E; -} -#top-bar { - background: #F6F6F6; - border-radius: 2px; - padding: 0 1rem; - height: 0; - min-height: 3rem; -} -#top-github-link { - position: relative; - z-index: 1; - float: right; - display: block; -} -#body #breadcrumbs { - height: auto; - margin-bottom: 0; - padding-left: 0; - line-height: 1.4; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - width: 70%; - display: inline-block; - float: left; -} -#body #breadcrumbs span { - padding: 0 0.1rem; -} -@media only all and (max-width: 59.938em) { - #sidebar { - width: 230px; - } - #body { - margin-left: 230px; - } -} -@media only all and (max-width: 47.938em) { - #sidebar { - width: 230px; - left: -230px; - } - #body { - margin-left: 0; - width: 100%; - } - .sidebar-hidden { - overflow: hidden; - } - .sidebar-hidden #sidebar { - left: 0; - } - .sidebar-hidden #body { - margin-left: 230px; - overflow: hidden; - } - .sidebar-hidden #overlay { - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - z-index: 10; - background: rgba(255, 255, 255, 0.5); - cursor: pointer; - } -} -.copy-to-clipboard { - background-image: url(../images/clippy.svg); - background-position: 50% 50%; - background-size: 16px 16px; - background-repeat: no-repeat; - width: 27px; - height: 1.45rem; - top: -1px; - display: inline-block; - vertical-align: middle; - position: relative; - color: #5e5e5e; - background-color: #FFF7DD; - margin-left: -.2rem; - cursor: pointer; - border-radius: 0 2px 2px 0; - margin-bottom: 1px; -} -.copy-to-clipboard:hover { - background-color: #E8E2CD; -} -pre .copy-to-clipboard { - position: absolute; - right: 4px; - top: 4px; - background-color: #C1C4C6; - color: #ccc; - border-radius: 2px; -} -pre .copy-to-clipboard:hover { - background-color: #00bdf3; - color: #fff; -} -.parent-element { - -webkit-transform-style: preserve-3d; - -moz-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -#sidebar ul.topics > li > a .read-icon { - margin-top: 9px; -} - -#sidebar ul { - list-style: none; - padding: 0; - margin: 0; -} - -#sidebar #shortcuts li { - padding: 2px 0; - list-style: none; -} - -#sidebar ul li .read-icon { - display: none; - float: right; - font-size: 13px; - min-width: 16px; - margin: 4px 0 0 0; - text-align: right; -} -#sidebar ul li.visited > a .read-icon { - color: #00bdf3; - display: inline; -} - -#sidebar #shortcuts h3 { - font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - color: white ; - margin-top:1rem; - padding-left: 1rem; -} - -#homelinks { - background-color: #9c6fb6; - color: #fff; - padding: 7px 0; - border-bottom: 4px solid #9c6fb6; -} - -#searchResults { - text-align: left; -} - -option { - color: initial; -} diff --git a/doc/public/en/index.html b/doc/public/en/index.html deleted file mode 100644 index 5009a9a..0000000 --- a/doc/public/en/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - https://doc.cuates.net/easymacro - - - - - - diff --git a/doc/public/en/sitemap.xml b/doc/public/en/sitemap.xml deleted file mode 100644 index ad816f2..0000000 --- a/doc/public/en/sitemap.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - https://doc.cuates.net/easymacro/installation/ - - - - - https://doc.cuates.net/easymacro/tools_debug/ - - - - https://doc.cuates.net/easymacro/ - 0 - - - - - - https://doc.cuates.net/easymacro/categories/ - - - - - - https://doc.cuates.net/easymacro/tags/ - - - - - - diff --git a/doc/public/es/404.html b/doc/public/es/404.html deleted file mode 100644 index 01ddd40..0000000 --- a/doc/public/es/404.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - 404 Page not found - - - - - - - - - - - - - - - - - - -
-
-
-
-

Error

-

-

-

Ups. Parece que la página no existe ¯\_(ツ)_/¯.

-

-

Ir al inicio

-

Page not found!

-
-
- -
- - - diff --git a/doc/public/es/application/index.html b/doc/public/es/application/index.html deleted file mode 100644 index d86ae0e..0000000 --- a/doc/public/es/application/index.html +++ /dev/null @@ -1,1791 +0,0 @@ - - - - - - - - - - - - LibreOffice :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - LibreOffice -

- - - - - - -

fonts

-

Devolver todas las fuentes visibles en LibreOffice. Mire FontDescriptor

-
fonts = app.fonts()
-for f in fonts:
-    app.debug(f'Nombre: {f.Name} - Estilo: {f.StyleName}')
-

filters

-

Devolver todos los filtros soportados en LibreOffice. Mire la ayuda y en API FilterFactory para más detalles.

-
filtros = app.filters()
-for f in filtros:
-    info = f"Nombre UI: {f['UIName']} - Nombre: {f['Name']} - Tipo: {f['Type']}"
-    app.debug(info)
-

dispatch

-

Ejecutar cualquier comando UNO de LibreOffice, mire la lista de comandos y API dispatch.

-

Este método automáticamente agrega el prefijo necesario: .uno:

-
doc = app.active
-comando = 'Gallery'
-app.dispatch(doc, comando)
-
-

Use este método solamente si no hay un método equivalente en easymacro o directamente en el API de LibreOffice.

-
- -

clipboard

-

Envíar contenido al portapapeles.

-
app.clipboard.set('Los 7 samuráis')
-

Recuperar contenido del portapapeles.

-
content = app.clipboard.get()
-app.debug(content)
-

disable

-

Deshabilitar un comando. Para una lista de comandos mire DispatchCommands.

-
comando = 'OpenFromCalc'
-resultado = app.cmd.disable(comando)
-app.debug(resultado)
-

OpenFromCalc es la opción para abrir documentos en Calc, deshabilita o habilita la entrada del menú y el icono en la barra de herramientas.

-

enabled

-

Habilitar un comando.

-
comando = 'OpenFromCalc'
-resultado = app.cmd.enabled(comando)
-app.debug(resultado)
-

get_config

-

Obtener valores de la configuración de LibreOffice.

-
nombre_node = '/org.openoffice.Office.Common/Help'
-clave = 'System'
-valor = app.get_config(nombre_node, clave)
-app.debug(valor)
-
-nombre_node = '/org.openoffice.Office.Common/Misc/'
-clave = 'FirstRun'
-valor = app.get_config(nombre_node, clave)
-app.debug(valor)
-
-clave = 'UseSystemFileDialog'
-valor = app.get_config(nombre_node, clave)
-app.debug(valor)
-
17/08/2022 14:14:12 - DEBUG - UNIX
-17/08/2022 14:14:12 - DEBUG - False
-17/08/2022 14:14:12 - DEBUG - True
-

set_config

-

Establece un nuevo valor en la configuración de LibreOffice.

-
nombre_nodo = '/org.openoffice.Office.UI/ColorScheme'
-clave = 'CurrentColorScheme'
-nuevo_valor = 'LibreOffice Dark'
-resultado = app.set_config(nombre_nodo, clave, nuevo_valor)
-app.debug(resultado)
-

Algunos nodos y claves interesantes:

-
    -
  • /org.openoffice.Office.Common/Save/Document -
      -
    • AutoSave
    • -
    • AutoSaveTimeIntervall
    • -
    -
  • -
- -

No todos los valores de los nodos se pueden cambiar, algunos valores son de solo lectura.

-
- - - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/application/index.xml b/doc/public/es/application/index.xml deleted file mode 100644 index d53a722..0000000 --- a/doc/public/es/application/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - LibreOffice on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/application/ - Recent content in LibreOffice on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/application/menus/index.html b/doc/public/es/application/menus/index.html deleted file mode 100644 index 515b180..0000000 --- a/doc/public/es/application/menus/index.html +++ /dev/null @@ -1,1861 +0,0 @@ - - - - - - - - - - - - Menús :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Menús -

- - - - - - -

insert

-

Insertar nuevo menú en Calc.

-

En la propiedad CommandURL es posible establecer tanto un comando UNO de LibreOffice, como un diccionario con los datos de una macro.

-

El nombre del menú es importante para cuando se quiera eliminar.

-
nombre_menu = 'zaz.my.menu'
-menu = {
-    'Label': 'My menu',
-    'CommandURL': nombre_menu,
-    'Submenu': [
-        {
-            'Label': 'Open Macros Dialog...',
-            'CommandURL': 'MacroDialog',
-        },
-        {
-            'Label': '-',
-        },
-        {
-            'Label': 'My macro',
-            'CommandURL': {'library': 'test', 'name': 'hola'},
-        },
-        {
-            'Label': 'Execute macro...',
-            'CommandURL': 'RunMacro',
-            'ShortCut': 'Shift+Ctrl+Alt+E',
-        },
-    ]
-}
-
-menus_calc = app.menus['calc']
-menus_calc.insert(menu)
-

remove

-

Eliminar un menú existente.

-
nombre_menu = 'zaz.my.menu'
-menus_calc = app.menus['calc']
-menus_calc.remove(nombre_menu)
-

Insertar nuevo menú en uno existente.

-

Dentro del menú Herramientas (tools), después de la opción Macros...

-
menu = app.menus['calc']['tools']
-
-menu_nombre = 'zaz.my.menu'
-menu_nuevo = {
-    'Label': 'My menu',
-    'CommandURL': menu_nombre,
-    'Submenu': [
-        {
-            'Label': 'Open Macros Dialog...',
-            'CommandURL': 'MacroDialog',
-        },
-        {
-            'Label': '-',
-        },
-        {
-            'Label': 'My macro',
-            'CommandURL': {'library': 'test', 'name': 'hello'},
-        },
-        {
-            'Label': 'Execute macro...',
-            'CommandURL': 'RunMacro',
-            'ShortCut': 'Shift+Ctrl+Alt+E',
-        },
-    ]
-}
-
-if menu_nombre in menu:
-    menu.remove(menu_nombre)
-else:
-    menu.insert(menu_nuevo, '.uno:MacrosMenu')
-

debug

-

Para saber los nombres de cualquier menú.

-
menu = app.menus['calc']['tools']
-menu.debug()
-
(0) .uno:SpellDialog
-(1) .uno:SpellOnline
-(2) .uno:ThesaurusDialog
-(3) .uno:LanguageMenu
-  ├─ (0) .uno:SetLanguageAllTextMenu
-  ├─ (1) ----------
-  ├─ (2) .uno:Hyphenate
-  ├─ (3) .uno:ChineseConversion
-  ├─ (4) .uno:HangulHanjaConversion
-  ├─ (5) ----------
-  ├─ (6) .uno:MoreDictionaries
-(4) ----------
-(5) .uno:AutoCorrectDlg
-(6) .uno:AutoComplete
-(7) .uno:ImageMapDialog
-(8) ----------
-(9) .uno:RedactDoc
-(10) .uno:AutoRedactDoc
-(11) ----------
-(12) .uno:GoalSeekDialog
-(13) .uno:SolverDialog
-(14) .uno:AuditMenu
-  ├─ (0) .uno:ShowPrecedents
-  ├─ (1) .uno:ShowDependents
-  ├─ (2) ----------
-  ├─ (3) .uno:ClearArrows
-  ├─ (4) .uno:ClearArrowPrecedents
-  ├─ (5) .uno:ClearArrowDependents
-  ├─ (6) ----------
-  ├─ (7) .uno:ShowErrors
-  ├─ (8) .uno:RefreshArrows
-  ├─ (9) ----------
-  ├─ (10) .uno:AuditingFillMode
-  ├─ (11) .uno:AutoRefreshArrows
-  ├─ (12) .uno:ShowInvalid
-(15) .uno:ScenarioManager
-(16) ----------
-(17) .uno:ToolsFormsMenu
-  ├─ (0) .uno:SwitchControlDesignMode
-  ├─ (1) .uno:UseWizards
-  ├─ (2) ----------
-  ├─ (3) .uno:ControlProperties
-  ├─ (4) .uno:FormProperties
-  ├─ (5) ----------
-  ├─ (6) .uno:ShowFmExplorer
-  ├─ (7) .uno:TabDialog
-  ├─ (8) .uno:AddField
-  ├─ (9) ----------
-  ├─ (10) .uno:OpenReadOnly
-  ├─ (11) .uno:AutoControlFocus
-(18) ----------
-(19) .uno:ShareDocument
-(20) .uno:Protect
-(21) .uno:ToolProtectionDocument
-(22) ----------
-(23) .uno:MacrosMenu
-  ├─ (0) .uno:MacroRecorder
-  ├─ (1) .uno:RunMacro
-  ├─ (2) .uno:BasicIDEAppear
-  ├─ (3) .uno:ScriptOrganizer
-  ├─ (4) ----------
-  ├─ (5) .uno:MacroSignature
-  ├─ (6) .uno:MacroOrganizer?TabId:short=1
-  ├─ (7) ----------
-  ├─ (8) .uno:OpenXMLFilterSettings
-(24) .uno:DevelopmentToolsDockingWindow
-(25) ----------
-(26) service:com.sun.star.deployment.ui.PackageManagerDialog
-(27) .uno:ConfigureDialog
-(28) .uno:OptionsTreeDialog
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/application/menus/index.xml b/doc/public/es/application/menus/index.xml deleted file mode 100644 index 8d8a701..0000000 --- a/doc/public/es/application/menus/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Menús on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/application/menus/ - Recent content in Menús on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/application/shortcuts/index.html b/doc/public/es/application/shortcuts/index.html deleted file mode 100644 index de8d8b8..0000000 --- a/doc/public/es/application/shortcuts/index.html +++ /dev/null @@ -1,1772 +0,0 @@ - - - - - - - - - - - - Accesos directos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - - - - -
-
- -
- -
- -
- -

- - Accesos directos -

- - - - - - -

Globales

-

Iterar en todos los accesos directos. Accesos directos disponibles para todas las aplicaciones.

-
for acceso_directo, comando in app.shortcuts:
-    app.debug(acceso_directo, comando)
-

Devolver una lista de tuplas con toda la información.

-
datos = app.shortcuts.get_all()
-app.debug(datos)
-

Verificar si un acceso directo esta asignado.

-
acceso_directo = 'Shift+Ctrl+Alt+T'
-app.debug(acceso_directo in app.shortcuts)
-

set

-

Establecer un acceso directo a un comando.

-
sc = app.shortcuts
-acceso_directo = 'Shift+Ctrl+Alt+T'
-comando = 'MacroDialog'
-sc.set(acceso_directo, comando)
-

Establecer un acceso directo a una macro.

-
sc = app.shortcuts
-acceso_directo = 'Shift+Ctrl+Alt+M'
-macro = {'library': 'test', 'name': 'pruebas'}
-sc.set(acceso_directo, macro)
-

get_by_shortcut

-

Devolver el comando asociado a un acceso directo.

-
sc = app.shortcuts
-acceso_directo = 'Shift+Ctrl+Alt+M'
-comando = sc.get_by_shortcut(acceso_directo)
-app.debug(comando)
-

get_by_command

-

Devolver el acceso directo asociado a un comando. Puede haber más de uno.

-
sc = app.shortcuts
-comando = 'MacroDialog'
-acceso_directo = sc.get_by_command(comando)
-app.debug(acceso_directo)
-

remove_by_shortcut

-

Eliminar por acceso directo.

-
sc = app.shortcuts
-acceso_directo = 'Shift+Ctrl+Alt+T'
-sc.remove_by_shortcut(acceso_directo)
-

remove_by_command

-

Eliminar por comando.

-
sc = app.shortcuts
-macro = {'library': 'test', 'name': 'pruebas'}
-sc.remove_by_command(macro)
-

reset

-

Reiniciar todas las modificaciones.

-
app.shortcuts.reset()
-

Modificar accesos directos, solo en una aplicación.

-

Por ejemplo Calc.

-
sc = app.shortcuts['calc']
-

Los métodos son los mismos que los globales.

-

Para las demas aplicaciones: writer, draw, impress, math.

- - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/application/shortcuts/index.xml b/doc/public/es/application/shortcuts/index.xml deleted file mode 100644 index ced05fd..0000000 --- a/doc/public/es/application/shortcuts/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Accesos directos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/application/shortcuts/ - Recent content in Accesos directos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/cells/index.html b/doc/public/es/calc/cells/index.html deleted file mode 100644 index b702a8f..0000000 --- a/doc/public/es/calc/cells/index.html +++ /dev/null @@ -1,1769 +0,0 @@ - - - - - - - - - - - - Celdas y rangos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Celdas y rangos -

- - - - - - -

Trabajar con celdas y rangos

-

selection

-

Referencia por selección actual.

-
seleccion = app.selection
-app.debug(seleccion)
-
20/08/2022 15:32:36 - DEBUG - Cell: $Sheet1.$A$2
-20/08/2022 15:32:39 - DEBUG - Range: $Sheet1.$C$8:$D$11
-

address

-

Referencia por dirección.

-
hoja = app.active_sheet
-celda = hoja['A1']
-rango = hoja['C10:D15']
-
-app.debug(celda)
-app.debug(rango)
-

position

-

Referencia por posición.

-

Para celdas: HOJA[fila,columna]

-

Para rangos: HOJA[fila_inicial:fila_final, columna_inicial:columna_final]

-
hoja = app.active_sheet
-
-# ~ Cell A10
-celda = hoja[9,0]
-
-# ~ Range A1:C10
-rango = hoja[0:10,0:3]
-

iter

-

Iterar cada celda de un rango.

-
hoja = app.active_sheet
-rango = hoja['B10:C15']
-
-for celda in rango:
-    app.debug(celda)
-

contains

-

Verificar si un rango esta dentro de otro.

-
hoja = app.active_sheet
-
-celda = hoja['C5']
-rango = hoja['A1:E10']
-
-resultado = celda in rango
-app.debug(resultado)
-
-celda = hoja['C50']
-resultado = celda in rango
-app.debug(resultado)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/cells/index.xml b/doc/public/es/calc/cells/index.xml deleted file mode 100644 index 6d83b43..0000000 --- a/doc/public/es/calc/cells/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Celdas y rangos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/cells/ - Recent content in Celdas y rangos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/cells/methods/index.html b/doc/public/es/calc/cells/methods/index.html deleted file mode 100644 index 4ad7bca..0000000 --- a/doc/public/es/calc/cells/methods/index.html +++ /dev/null @@ -1,1733 +0,0 @@ - - - - - - - - - - - - Métodos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Métodos -

- - - - - - -

clear

-

Limpia el rango. Por default solo borra datos. Mire API CellFlags para más información.

-
rango.clear()
-

Para borrar todo.

-
rango.clear(app.ALL)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/cells/methods/index.xml b/doc/public/es/calc/cells/methods/index.xml deleted file mode 100644 index d64a5ac..0000000 --- a/doc/public/es/calc/cells/methods/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Métodos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/cells/methods/ - Recent content in Métodos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/cells/properties/index.html b/doc/public/es/calc/cells/properties/index.html deleted file mode 100644 index f27417c..0000000 --- a/doc/public/es/calc/cells/properties/index.html +++ /dev/null @@ -1,1940 +0,0 @@ - - - - - - - - - - - - Propiedades :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - - - - -
-
- -
- -
- -
- -

- - Propiedades -

- - - - - - -

is_cell

-

Verdadero (True) si el rango es de una sola celda.

-
hoja = app.active_sheet
-
-celda = hoja['A1']
-app.debug(celda.is_cell)
-
-rango = hoja['A1:C5']
-app.debug(rango.is_cell)
-

name

-

Devuelve la dirección de la celda o rango como texto.

-
hoja = app.active_sheet
-
-celda = hoja['A1']
-app.debug(celda.name)
-
-rango = hoja['A1:C5']
-app.debug(rango.name)
-

address

-

Devuelve la dirección de la celda como una estructura: com.sun.star.table.CellAddress

-
hoja = app.active_sheet
-
-celda = hoja['A1']
-if celda.is_cell:
-    app.debug(celda.address)
-

range_address

-

Devuelve la dirección del rango como una estructura: com.sun.star.table.CellRangeAddress

-
hoja = app.active_sheet
-
-rango = hoja['A1:C5']
-if not rango.is_cell:
-    app.debug(rango.range_address)
-

filas y columnas

-

Devolver el tamaño del rango en filas y columnas.

-
hoja = app.active_sheet
-
-rango = hoja['A1:E100']
-filas = len(rango)
-columnas = rango.len_columns
-app.debug(filas, columnas)
-

sheet

-

Devuelve la hoja padre.

-
rango = hoja['A1:C5']
-
-hoja = rango.sheet
-app.debug(hoja)
-

doc

-

Devuelve el documento padre.

-
rango = hoja['A1:C5']
-
-doc = rango.doc
-app.debug(doc)
-

style

-

Devuelve o aplica el estilo de celda.

-
rango = hoja['A1:C5']
-rango.style = 'Good'
-

current_region

-

Devuelve la región actual.

-
celda = hoja['A1']
-rango = celda.current_region
-app.debug(rango)
-

range_data

-

Devuelve la región actual del rango excepto la primer fila.

-
celda = hoja['A1']
-rango = celda.range_data
-app.debug(rango)
-

back_color

-

Devuelve o aplica el color de fondo del rango.

-
rango = hoja['A1:E10']
-rango.back_color = 'red'
-

type

-

Devuelve el tipo de contenido de la celda: texto, número o formula.

-
celda = hoja['A1']
-app.debug(celda.type)
-

error

-

Si la celda tiene una formula con error, devuelve el número de error.

-
celda = hoja['A1']
-app.debug(celda.error)
-

string

-

Devuelve o establece el contenido de la celda como texto.

-
celda = hoja['A1']
-celda.string = 'Maldito Mundo'
-app.debug(celda.type, celda.string)
-
-celda = hoja['A2']
-celda.string = 12345
-app.debug(celda.type, celda.string)
-

float

-

Devuelve o establece el contenido de la celda como valor.

-
celda = hoja['A1']
-celda.float = 12345
-app.debug(celda.type, celda.float)
-

formula

-

Devuelve o establece la formula de la celda.

-
celda = hoja['A1']
-celda.formula = '=RAND()'
-app.debug(celda.type, celda.formula)
-

date

-

Devuelve o establece el contenido de la celda como fecha.

-
celda = hoja['A1']
-celda.date = app.dates.date(1974, 1, 15)
-app.debug(type(celda.date), celda.date)
-
20/08/2022 18:38:53 - DEBUG - <class 'datetime.date'>   1974-01-15
-

time

-

Devuelve o establece el contenido de la celda como tiempo.

-
celda = hoja['A1']
-celda.time = app.dates.time(10, 11, 12)
-app.debug(type(celda.time), celda.time)
-

datetime

-

Devuelve o establece el contenido de la celda como fecha y tiempo.

-
celda = hoja['A1']
-celda.datetime = app.dates.datetime(1974, 1, 15, 10, 11, 12)
-app.debug(type(celda.datetime), celda.datetime)
-

value

-

Devuelve o establece el valor de la celda, estableciendo el tipo de dato automáticamente.

-
hoja = app.active_sheet
-
-celda = hoja['A1']
-celda.value = 'Soy Texto'
-app.debug(celda.type, celda.value)
-
-celda = hoja['A2']
-celda.value = 12345
-app.debug(celda.type, celda.value)
-
-celda = hoja['A3']
-celda.value = '=RAND()'
-app.debug(celda.type, celda.value)
-
-celda = hoja['A4']
-celda.value = app.dates.date(1974, 1, 15)
-app.debug(celda.type, celda.value)
-

data_array

-

Devuelve o establece los datos de un rango. Es un alias de DataArray.

-
rango = app.selection
-datos = rango.data_array
-app.debug(datos)
-rango.data_array = datos
-
-

El tamaño de los datos, debe ser exactamente del tamaño del rango destino. De lo contrario obtendrá un error.

-
- -

formula_array

-

Devuelve o establece los datos de un rango. Es un alias de FormulaArray.

-
rango = app.selection
-
-datos = rango.data_array
-app.debug(datos)
-datos = rango.formula_array
-app.debug(datos)
-rango.formula_array = datos
-
-

data_array devolverá los resultados de las celdas con formulas. formula_array devolverá las formulas en dichas celdas.

-
- -

data

-

Alias de data_array al obtener los datos. Al establecer los datos, si es un rango se comporta como data_array, pero si es una celda, se autoajusta al tamaño de los datos.

-
hoja = app.active_sheet
-celda = hoja['A1']
-datos = (
-    (1, 'Uno'),
-    (2, 'Dos'),
-    (3, 'Tres'),
-)
-
-celda.data = datos
-app.debug(celda.current_region.data)
-
-

Siempre valide que haya suficientes celdas libres para los datos para evitar sobreescribirlos.

-
- -

dict

-

Devuelve o establece los datos como diccionarios.

-
hoja = app.active_sheet
-celda = hoja['A1']
-
-datos = (
-    {'No': 1, 'Nombre': 'Ingrid'},
-    {'No': 2, 'Nombre': 'Sophia'},
-    {'No': 3, 'Nombre': 'Scarlette'},
-)
-
-celda.dict = datos
-app.debug(celda.current_region.dict)
-

next_free

-

Devuelve la siguiente celda libre después de la región actual.

-
hoja = app.active_sheet
-celda = hoja['A1']
-
-celda_libre = celda.next_free
-app.debug(celda_libre)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/cells/properties/index.xml b/doc/public/es/calc/cells/properties/index.xml deleted file mode 100644 index 1f89d74..0000000 --- a/doc/public/es/calc/cells/properties/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Propiedades on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/cells/properties/ - Recent content in Propiedades on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/index.html b/doc/public/es/calc/index.html deleted file mode 100644 index f190fb3..0000000 --- a/doc/public/es/calc/index.html +++ /dev/null @@ -1,1890 +0,0 @@ - - - - - - - - - - - - Calc :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - - - - -
-
- -
- -
- -
- -

- - Calc -

- - - - - - -

Trabajar con Calc

-

active

-
doc = app.active
-app.debug(doc.type)
-

Propiedades

-

headers

-

Mostrar u ocultar encabezados de filas y columnas.

-
doc = app.active
-app.msgbox(doc.headers)
-doc.headers = not doc.headers
-app.msgbox(doc.headers)
-doc.headers = not doc.headers
-

tabs

-

Mostrar u ocultar las pestañas de las hojas.

-
doc = app.active
-app.msgbox(doc.tabs)
-doc.tabs = not doc.tabs
-app.msgbox(doc.tabs)
-doc.tabs = not doc.tabs
-

selection

-

Devolver la selección activa.

-
doc = app.active
-seleccion = doc.selection
-app.debug(seleccion)
-
-

Cuidado, la selección actual pueden ser muchas cosas diferentes.

-
- -

names

-

Devolver una tupla con los nombres de todas las hojas.

-
doc = app.active
-nombres = doc.names
-app.debug(nombres)
-

active

-

Devuelve la hoja activa.

-
doc = app.active
-hoja = doc.active
-app.debug(hoja)
-

Métodos

-

activate

-

Activar hoja, argumento como objeto.

-
doc = app.active
-hoja = doc[-1]
-doc.activate(hoja)
-

Activar hoja por nombre.

-
doc = app.active
-doc.activate('Hoja3')
-

select

-

Seleccionar una celda o rango.

-
doc = app.active
-cell = doc[0]['A1']
-doc.select(cell)
-
-

NO es necesario seleccionar celdas o rangos para manipularlos.

-
- -

start_range_selection

-

Permitir al usuario seleccionar un rango. Es necesario pasarle una clase con el nombre que prefiera (Eventos es recomendable) con dos métodos para procesar la captura como en el siguiente ejemplo:

-
class Eventos():
-
-    def __init__(self, doc):
-        self.doc = doc
-
-    def range_selection_done(self, range_selection):
-        if range_selection:
-            app.debug(range_selection)
-        self.doc.remove_range_selection_listener()
-        return
-
-    def range_selection_aborted(self):
-        self.doc.remove_range_selection_listener()
-        return
-
-
-def main():
-    doc = app.active
-    doc.start_range_selection(Eventos)
-    return
-

insert

-

Inserta una nueva hoja.

-
doc = app.active
-hoja = doc.insert('OtraHoja')
-

Insertar varias hojas. Devolverá la última insertada.

-
nombres = ('Enero', 'Febrero', 'Marzo')
-hoja = doc.insert(nombres)
-app.debug(hoja)
-

Creando una nueva instancia y asignandola.

-
    doc = app.active
-    doc['NuevaHoja'] = doc.new_sheet()
-
-

Si la hoja existe, obtendrá un error, verifique siempre que no exista primero.

-
- -

move

-

Mover hojas.

-

Pasar la hoja como objeto, de forma predetermianda se mueve a la última posición.

-
doc = app.active
-hoja = doc[0]
-doc.move(hoja)
-

Pasar la hoja por nombre.

-
doc = app.active
-doc.move('Hoja1')
-

Especificar la posición destino.

-
doc = app.active
-hoja = doc[0]
-doc.move(hoja, 2)
-

remove

-

Eliminar hoja.

-
doc = app.active
-sheet = doc[0]
-
-doc.remove(sheet)
-

Eliminar por nombre.

-
doc.remove('Hoja2')
-

copy

-

Copiar hoja dentro del mismo documento.

-
doc = app.active
-hoja = doc[0]
-
-doc.copy_sheet(hoja, 'Otra hoja')
-

Por nombre.

-
doc.copy_sheet('Hoja1', 'Hoja2')
-

Si no se establece el nuevo nombre, se generá de forma automática: nombre + índice.

-
doc.copy_sheet(hoja)
-

copy_from

-

Copiar hojas de otro documento. Copiar con el mismo nombre.

-
doc = app.active
-documento_origen = app.docs['Contactos.ods']
-nombre_origen = 'Nombres'
-
-doc.copy_from(documento_origen, nombre_origen)
-

Copiar con un nuevo nombre.

-
doc.copy_from(documento_origen, nombre_origen, 'NuevoNombre')
-

Si solo se establece el documento origen, se copian todas las hojas.

-
doc.copy_from(documento_origen)
-

sort

-

Ordenar hojas en orden alfabetico.

-
doc = app.active
-doc.sort()
-

Ordenar de forma inversa.

-
doc = app.active
-doc.sort(True)
-

Eventos del documento.

-

Obtener una tupla con los eventos soportados por el documento.

-
doc = app.active
-nombres = doc.events.names
-app.debug(nombres)
-

Asignar una macro a un evento.

-
def doc_on_focus(event):
-    app.debug('Documento activado...')
-    return
-
-
-def main():
-    doc = app.active
-    events = doc.events
-    if 'OnFocus' in events:
-        macro = {'library': 'test', 'name': 'doc_on_focus'}
-        events['OnFocus'] = macro
-    return
-

Eliminar la asignación del evento.

-
doc = app.active
-doc.events['OnFocus'] = {}
-

O

-
doc = app.active
-doc.events.remove('OnFocus')
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/index.xml b/doc/public/es/calc/index.xml deleted file mode 100644 index a00c072..0000000 --- a/doc/public/es/calc/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Calc on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/ - Recent content in Calc on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/ranges/index.html b/doc/public/es/calc/ranges/index.html deleted file mode 100644 index 9fabdef..0000000 --- a/doc/public/es/calc/ranges/index.html +++ /dev/null @@ -1,1762 +0,0 @@ - - - - - - - - - - - - Conjuntos de Rangos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Conjuntos de Rangos -

- - - - - - -

Trabajar con conjuntos de rangos

-

Selección

-

Obtener una referencia desde la selección actual. Deben de estar seleccionados más de un rango de celdas.

-
doc = app.active
-seleccion = doc.selection
-app.debug(seleccion)
-
20/08/2022 13:21:17 - DEBUG - Ranges: ('Sheet1.A5:C8', 'Sheet1.E11:F14')
-

len

-

Contar los rangos.

-
doc = app.active
-contar = len(doc.selection)
-app.debug(contar)
-

iter

-

Iterar entre los rangos.

-
doc = app.active
-for rango in doc.selection:
-    app.debug(rango)
-
20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$B$4:$D$7
-20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$G$10:$H$14
-

index

-

Referencia a un rango por índice.

-
doc = app.active
-rangos = doc.selection
-
-rango = rangos[1]
-app.debug(rango)
-

address

-

Referencia a un rango por su dirección.

-
rango = rangos['Hoja1.A1:B5']
-app.debug(rango)
-

contain

-

Verificar si un rango esta en la colección.

-
doc = app.active
-hoja = doc.active
-rangos = doc.selection
-
-resultado = hoja['D5:F10'] in rangos
-app.debug(resultado)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/ranges/index.xml b/doc/public/es/calc/ranges/index.xml deleted file mode 100644 index a2974e5..0000000 --- a/doc/public/es/calc/ranges/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Conjuntos de Rangos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/ranges/ - Recent content in Conjuntos de Rangos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/ranges/methods/index.html b/doc/public/es/calc/ranges/methods/index.html deleted file mode 100644 index 138826c..0000000 --- a/doc/public/es/calc/ranges/methods/index.html +++ /dev/null @@ -1,1747 +0,0 @@ - - - - - - - - - - - - Métodos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Métodos -

- - - - - - -

ranges

-

Crear un nuevo contender de rangos vacío.

-
doc = app.active
-rangos = doc.ranges()
-app.debug(rangos)
-

add

-
doc = app.active
-hoja = doc.active
-
-rangos = doc.ranges()
-rangos.add(hoja['A1:B2'])
-rangos.add(hoja['D5:F10'])
-app.debug(rangos)
-

remove

-
rangos.remove(hoja['A1:B2'])
-

get_ranges

-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/ranges/methods/index.xml b/doc/public/es/calc/ranges/methods/index.xml deleted file mode 100644 index 110df53..0000000 --- a/doc/public/es/calc/ranges/methods/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Métodos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/ranges/methods/ - Recent content in Métodos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/ranges/properties/index.html b/doc/public/es/calc/ranges/properties/index.html deleted file mode 100644 index 8e46098..0000000 --- a/doc/public/es/calc/ranges/properties/index.html +++ /dev/null @@ -1,1750 +0,0 @@ - - - - - - - - - - - - Propiedades :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Propiedades -

- - - - - - -

names

-

Devolver las direcciones de los rangos.

-
doc = app.active
-rangos = doc.selection
-
-nombres = rangos.names
-app.debug(nombres)
-

data

-

Devolver y establecer datos.

-
doc = app.active
-rangos = doc.selection
-
-datos = rangos.data
-app.debug(datos)
-rangos.data = datos
-
-

Cada rango debe tener exactamente el mismo tamaño.

-
- -

style

-

Establecer el estilo de todos los rangos.

-
doc = app.active
-rangos = doc.selection
-rangos.style = 'Good'
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/ranges/properties/index.xml b/doc/public/es/calc/ranges/properties/index.xml deleted file mode 100644 index e30f32e..0000000 --- a/doc/public/es/calc/ranges/properties/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Propiedades on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/ranges/properties/ - Recent content in Propiedades on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/sheets/events/index.html b/doc/public/es/calc/sheets/events/index.html deleted file mode 100644 index e225298..0000000 --- a/doc/public/es/calc/sheets/events/index.html +++ /dev/null @@ -1,1749 +0,0 @@ - - - - - - - - - - - - Eventos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Eventos -

- - - - - - -

Eventos de la hoja.

-

Obtener una tupla con los eventos soportados por la hoja.

-
hoja = app.active.active
-nombres = hoja.events.names
-app.debug(nombres)
-

Asignar una macro a un evento.

-
def on_select(source):
-    app.debug(source.AbsoluteName)
-    return
-
-
-def main():
-    doc = app.active
-    hoja = doc.active
-
-    if 'OnSelect' in hoja.events:
-        macro = {'library': 'test', 'name': 'on_select'}
-        hoja.events['OnSelect'] = macro
-
-    return
-

Eliminar la asignación del evento.

-
hoja.events['OnSelect'] = {}
-

O

-
hoja.events.remove('OnFocus')
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/sheets/events/index.xml b/doc/public/es/calc/sheets/events/index.xml deleted file mode 100644 index c0fb17b..0000000 --- a/doc/public/es/calc/sheets/events/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Eventos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/sheets/events/ - Recent content in Eventos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/sheets/index.html b/doc/public/es/calc/sheets/index.html deleted file mode 100644 index 12ddea1..0000000 --- a/doc/public/es/calc/sheets/index.html +++ /dev/null @@ -1,1744 +0,0 @@ - - - - - - - - - - - - Hojas :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Hojas -

- - - - - - -

Trabajar con hojas

-

Referencia por índice

-
doc = app.active
-hoja = doc[0]
-app.debug(hoja.name)
-

Referencia por nombre

-
doc = app.active
-hoja = doc['datos']
-app.debug(hoja.name)
-

in

-

Verificar por nombre si una hoja existe.

-
doc = app.active
-existe = 'Hoja2' in doc
-app.debug(existe)
-

len

-

Contar la cantidad de hojas en el documento.

-
doc = app.active
-contar = len(doc)
-app.debug(contar)
-

iter

-

Recorrer todas las hojas.

-
    doc = app.active
-    for hoja in doc:
-        app.debug(hoja)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/sheets/index.xml b/doc/public/es/calc/sheets/index.xml deleted file mode 100644 index adbdf5b..0000000 --- a/doc/public/es/calc/sheets/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Hojas on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/sheets/ - Recent content in Hojas on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/sheets/methods/index.html b/doc/public/es/calc/sheets/methods/index.html deleted file mode 100644 index 2a82abd..0000000 --- a/doc/public/es/calc/sheets/methods/index.html +++ /dev/null @@ -1,1783 +0,0 @@ - - - - - - - - - - - - Métodos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Métodos -

- - - - - - -

unprotect

-

Quitar contraseña.

-
hoja = app.active.active
-
-hoja.password = 'siscaloburropanzon'
-app.msgbox(hoja.is_protected)
-
-hoja.unprotect('siscaloburropanzon')
-app.msgbox(hoja.is_protected)
-

activate

-

Pasar el foco a la hoja.

-
doc = app.active
-hoja = doc[-1]
-hoja.activate()
-

move

-

Mover a la última posición.

-
doc = app.active
-hoja = doc[0]
-hoja.move()
-

Mover a una posición especifica.

-
doc = app.active
-hoja = doc[0]
-hoja.move(3)
-

remove

-

Remover hoja.

-
sheet = app.active.active
-sheet.remove()
-
-

Siempre debe existir al menos una hoja.

-
- -

copy

- -

Siempre valida que no exista el nuevo nombre.

-
- -
doc = app.active
-hoja = doc[0]
-
-nuevo_nombre = f'{hoja.name}_2'
-if not nuevo_nombre in doc:
-    hoja.copy(nuevo_nombre)
-

Si no se establece el nuevo nombre, se generá de forma automática: nombre + índice.

-
hoja.copy()
-

copy_to

-

Copiar la hoja a otro documento. Se usa el mismo nombre.

-
doc = app.active
-hoja = doc.active
-
-documento_nuevo = app.docs.new()
-hoja.copy_to(documento_nuevo)
-

Usar un nuevo nombre.

-
hoja.copy_to(documento_nuevo, 'Nuevo nombre')
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/sheets/methods/index.xml b/doc/public/es/calc/sheets/methods/index.xml deleted file mode 100644 index 71bcaed..0000000 --- a/doc/public/es/calc/sheets/methods/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Métodos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/sheets/methods/ - Recent content in Métodos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/calc/sheets/properties/index.html b/doc/public/es/calc/sheets/properties/index.html deleted file mode 100644 index 53b2d5f..0000000 --- a/doc/public/es/calc/sheets/properties/index.html +++ /dev/null @@ -1,1792 +0,0 @@ - - - - - - - - - - - - Propiedades :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Propiedades -

- - - - - - -

doc

-

Devuelve al documento Calc donde esta la hoja.

-
doc = app.active
-hoja = doc.active
-
-doc = hoja.doc
-app.debug(doc.title)
-

name

-

Nombre visible y editable por el usuario.

-
doc = app.active
-hoja = doc.active
-
-app.msgbox(hoja.name)
-hoja.name = 'Nuevo Nombre'
-app.msgbox(hoja.name)
-

code_name

-

Nombre editable y accesible solo por código.

-
doc = app.active
-hoja = doc.active
-
-app.msgbox(hoja.code_name)
-hoja.code_name = 'datos'
-app.msgbox(hoja.code_name)
-

visible

-

Muestra u oculta la hoja

-
hoja = app.active.active
-
-app.msgbox(hoja.visible)
-hoja.visible = not hoja.visible
-app.msgbox(hoja.visible)
-hoja.visible = not hoja.visible
-
-

Solo funcionará con dos o más hojas, por que debe haber al menos una visible.

-
- -

color

-

Color de la pestaña.

-
hoja = app.active.active
-app.msgbox(hoja.color)
-
-hoja.color = 'red'
-app.msgbox(hoja.color)
-
-# RGB
-hoja.color = (125, 200, 10)
-app.msgbox(hoja.color)
-

used_area

-

Referencia al área de usuario actual.

-
hoja = app.active.active
-
-rango = hoja.used_area
-app.debug(rango)
-

is_protected

-

Devuelve verdadero (True) si la hoja esta protegida

-
hoja = app.active.active
-
-esta_protegida = hoja.is_protected
-app.debug(esta_protegida)
-

password

-

Establecer una contraseña.

-
hoja = app.active.active
-hoja.password = 'siscaloburropanzon'
-app.debug(hoja.is_protected)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/calc/sheets/properties/index.xml b/doc/public/es/calc/sheets/properties/index.xml deleted file mode 100644 index 1af3c81..0000000 --- a/doc/public/es/calc/sheets/properties/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Propiedades on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/calc/sheets/properties/ - Recent content in Propiedades on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/categories/index.html b/doc/public/es/categories/index.html deleted file mode 100644 index f78516a..0000000 --- a/doc/public/es/categories/index.html +++ /dev/null @@ -1,1746 +0,0 @@ - - - - - - - - - - - - Categories :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - category :: - - Categories -

- - - - - - - - -
    - -
- - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/categories/index.xml b/doc/public/es/categories/index.xml deleted file mode 100644 index 7c5fcbe..0000000 --- a/doc/public/es/categories/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Categories on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/categories/ - Recent content in Categories on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/dialog/index.html b/doc/public/es/dialog/index.html deleted file mode 100644 index 8d97d3b..0000000 --- a/doc/public/es/dialog/index.html +++ /dev/null @@ -1,1752 +0,0 @@ - - - - - - - - - - - - Cuadros de diálogo :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Cuadros de diálogo -

- - - - - - - -

create

-
Desde archivo
-

Crear un cuadro de diálogo desde un archivo xdl previamente creado desde el editor de cuadros de diálogo dentro de LibreOffice y exportado a un archivo.

-
def crear_cuadro_de_dialogo():
-    path = '/home/mau/Desktop/Dialog1.xdl'
-    propiedades = {'Path': path}
-
-    dialog = app.dialog.create(propiedades)
-    dialog.open()
-    return
-
Desde mis macros
-

Si el cuadro de diálogo esta en la librería Standard.

-
def crear_cuadro_de_dialogo():
-    propiedades = {
-        'Location': 'user',
-        'Name': 'Dialog1',
-    }
-    dialog = app.dialog.create(propiedades)
-    dialog.open()
-    return
-

Si el cuadro de diálogo esta en otra librería.

-
def crear_cuadro_de_dialogo():
-    propiedades = {
-        'Location': 'user',
-        'Library': 'MiAplicacion',
-        'Name': 'Dialog2',
-    }
-    dialog = app.dialog.create(propiedades)
-    dialog.open()
-    return
-

Si el cuadro de diálogo esta en el documento activo en la librería Standard.

-
def crear_cuadro_de_dialogo():
-    propiedades = {
-        'Location': 'document',
-        'Name': 'miApp',
-    }
-    dialog = app.dialog.create(propiedades)
-    dialog.open()
-    return
-
Crear dinámicamente
-

Crear un cuadro de diálogo vacío.

-
def crear_cuadro_de_dialogo():
-    dialog = app.dialog.create()
-    dialog.open()
-    return
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/dialog/index.xml b/doc/public/es/dialog/index.xml deleted file mode 100644 index 27ff43b..0000000 --- a/doc/public/es/dialog/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Cuadros de diálogo on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/dialog/ - Recent content in Cuadros de diálogo on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/documents/index.html b/doc/public/es/documents/index.html deleted file mode 100644 index 3e827d8..0000000 --- a/doc/public/es/documents/index.html +++ /dev/null @@ -1,1741 +0,0 @@ - - - - - - - - - - - - Documentos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Documentos -

- - - - - - -

Trabajar con Documentos

-

active

-

Documento activo.

-
doc = app.active
-app.msgbox(doc.title)
-

iteration

-

Iterar en todos los documentos abiertos.

-
for doc in app.docs:
-    app.debug(doc.type, doc.title)
-

count

-

Contar los documentos abiertos.

-
cuantos = len(app.docs)
-app.debug(cuantos)
-

contain

-

Verificar si un documento esta en la colección.

-
resultado = 'mi_archivo.ods' in app.docs
-app.debug(resultado)
-

index

-

Devolver por índice.

-
doc = app.docs[1]
-app.debug(doc.type, doc.title)
-

name

-

Devolver por nombre.

-
nombre = 'mi_archivo.ods'
-if nombre in app.docs:
-    doc = app.docs[nombre]
-    app.debug(doc.type, doc.title)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/documents/index.xml b/doc/public/es/documents/index.xml deleted file mode 100644 index 7bba374..0000000 --- a/doc/public/es/documents/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Documentos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/documents/ - Recent content in Documentos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/documents/methods/index.html b/doc/public/es/documents/methods/index.html deleted file mode 100644 index fca5284..0000000 --- a/doc/public/es/documents/methods/index.html +++ /dev/null @@ -1,1855 +0,0 @@ - - - - - - - - - - - - Métodos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Métodos -

- - - - - - -

new

-

Crear nuevo documento, la aplicación predeterminada es Calc.

-
doc = app.docs.new()
-app.debug(doc.type)
-

Para un nuevo documento writer.

-
doc = app.docs.new('writer')
-app.debug(doc.type)
-

Otros documentos.

-
doc = app.docs.new('draw')
-app.debug(doc.type)
-
-doc = app.docs.new('impress')
-app.debug(doc.type)
-
-doc = app.docs.new('math')
-app.debug(doc.type)
-

Crear con argumentos.

-
propiedades = {'Hidden': True}
-doc = app.docs.new('writer', propiedades)
-mensaje = f'{doc.type} - {doc.title}'
-app.msgbox(mensaje)
-doc.visible = True
-
-

No es necesario que el documento este visible para manipularse.

-
- -

open

-

Abrir archivos.

-
ruta = '/home/mau/Mi_archivo.ods'
-doc = app.docs.open(ruta)
-
-

No es necesario pasar las rutas en formato URL.

-
- -

Puede abrir cualquier archivo que sea soportado por LibreOffice.

-
ruta = '/home/mau/ejemplo.xlsx'
-doc = app.docs.open(ruta)
-

Abrir con argumentos.

-
ruta = '/home/mau/ejemplo.ods'
-argumentos = {'Password': 'siscaloburropanzon'}
-doc = app.docs.open(ruta, argumentos)
-

save

-

Guardar un nuevo documento.

-
path = '/home/mau/nuevo_documento.ods'
-doc = app.docs.new()
-doc.save(path)
-

Cualquier archivo, previamente guardado, que sea modificado puede ser guardado con:

-
doc.save()
-

Abrir un archivo existente y guardarlo con otro nombre.

-
ruta = '/home/mau/ejemplo.ods'
-doc = app.docs.open(ruta)
-nueva_ruta = '/home/mau/otro_nombre.ods'
-doc.save(nueva_ruta)
-

close

-

Cerrar un archivo.

-
doc = app.docs.new()
-app.msgbox(doc.title)
-doc.close()
-

to_pdf

-

Exportar a PDF.

-
doc = app.active
-ruta = '/home/mau/ejemplo.pdf'
-doc.to_pdf(ruta)
-

Si no se establece una ruta, se devuelve el PDF en memoria.

-
doc = app.active
-pdf = doc.to_pdf()
-app.debug(pdf)
-

Mire las opciones del filtro de exportación a PDF, puede pasarlas como un diccionario como segundo argumento de este método.

-

export

-

Exportar a otros formatos.

-
doc = app.docs.new()
-ruta = '/home/mau/miarchivo.xlsx'
-filtro = 'xlsx'
-doc.export(ruta, filtro)
-
-ruta = '/home/mau/miarchivo.xls'
-filtro = 'xls'
-doc.export(ruta, filtro)
-
-doc = app.docs.new('writer')
-ruta = '/home/mau/miarchivo.docx'
-filtro = 'docx'
-doc.export(ruta, filtro)
-
-ruta = '/home/mau/miarchivo.doc'
-filtro = 'doc'
-doc.export(ruta, filtro)
-
-ruta = '/home/mau/miarchivo.rtf'
-filtro = 'rtf'
-doc.export(ruta, filtro)
-

Exportar en memoria.

-
doc = app.docs.new()
-filtro = 'xlsx'
-excel_doc = doc.export(filter_name=filtro)
-

set_focus

-

Enviar el foco al documento.

-
for doc in app.docs:
-    app.debug(doc.title)
-    doc.set_focus()
-    app.sleep(1)
-

copy

-

Copiar la selección activa al portapapeles.

-
doc = app.active
-doc.copy()
-

paste

-

Copiar el contenido del portapapeles, en la selección actual.

-
doc = app.active
-doc.paste()
-

paste_special

-

Mostrar el cuadro de diálogo Pegado Especial.

- -

Solo se mostrará si existe contenido en el portapapeles.

-
- -
doc = app.active
-doc.paste_special()
-

paste_values

-

Pegar solo los valores.

-
doc = app.active
-doc.paste_values()
-

Si el destino no esta vacío, el usuario verá el cuadro de mensaje de confirmación.

-

clear_undo

-

La mayoría de las acciones realizadas por código, quedan en el historial de acciones, por lo que el usuario puede deshacerlas. Para eviar esto se puede limpiar este historial.

-
doc = app.active
-doc.clear_undo()
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/documents/methods/index.xml b/doc/public/es/documents/methods/index.xml deleted file mode 100644 index ebdfb1a..0000000 --- a/doc/public/es/documents/methods/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Métodos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/documents/methods/ - Recent content in Métodos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/documents/properties/index.html b/doc/public/es/documents/properties/index.html deleted file mode 100644 index 9aabc65..0000000 --- a/doc/public/es/documents/properties/index.html +++ /dev/null @@ -1,1823 +0,0 @@ - - - - - - - - - - - - Propiedades :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Propiedades -

- - - - - - -

Propiedades comúnes a todos los documentos.

-

obj

-

Solo lectura. Devolver el objeto original pyUNO.

-
doc = app.active
-app.debug(type(doc))
-app.debug(type(doc.obj))
-
18/08/2022 21:59:05 - DEBUG - <class 'easymacro.easycalc.LOCalc'>
-18/08/2022 21:59:05 - DEBUG - <class 'pyuno'>
-

title

-

Título del documento.

-
doc = app.active
-app.debug(doc.title)
-doc.title = 'Nuevo Titulo'
-app.debug(doc.title)
-

type

-

Solo lectura. Devolver el tipo de documento: calc, writer, etc.

-
doc = app.active
-app.debug(doc.type)
-

uid

-

Solo lectura. Devolver el valor interno RuntimeUID del documento.

-
doc = app.active
-app.debug(doc.uid)
-

is_saved

-

Solo lectura. Si el documento ya ha sido guardado en disco.

-
doc = app.active
-app.debug(doc.is_saved)
-

is_modified

-

Solo lectura. Si el documento ha sido modificado.

-
doc = app.active
-app.debug(doc.is_modified)
-

is_read_only

-

Solo lectura. Si el documento es de solo lectura.

-
doc = app.active
-app.debug(doc.is_read_only)
-

path

-

Solo lectura. Devolver la ruta en disco del documento.

-
doc = app.active
-app.debug(doc.path)
-

dir

-

Solo lectura. Devolver solo el directorio de la ruta en disco del documento.

-
doc = app.active
-app.debug(doc.dir)
-

file_name

-

Solo lectura. Devolver el nombre con extensión de la ruta del documento.

-
doc = app.active
-app.debug(doc.file_name)
-

name

-

Solo lectura. Devolver el nombre sin extensión de la ruta del documento.

-
doc = app.active
-app.debug(doc.name)
-

visible

-

Ocultar o mostrar un documento.

-
doc = app.active
-doc.visible = False
-app.msgbox(doc.visible)
-doc.visible = True
-
-

No es necesario que el documento este visible para manipularse.

-
- -

zoom

-

Devolver o establecer el porcentaje de zoom del documento.

-
doc = app.active
-zoom = doc.zoom
-app.msgbox(zoom)
-doc.zoom = zoom * 2
-app.msgbox(doc.zoom)
-doc.zoom = zoom
-

status_bar

-

Controlar la barra de estado, es importante siempre actualizar en otro hilo.

-
@app.run_in_thread
-def controlar_barra_estado(sb, texto, limite):
-    sb.start(texto, limite)
-    for i in range(limite):
-        sb.setValue(i)
-        app.sleep(1)
-    sb.end()
-    return
-
-def main():
-    doc = app.active
-    controlar_barra_estado(doc.status_bar, 'Línea: ', 10)
-    return
-

Es importante siempre devolver el control de la barra de estado a la aplicación con el método end.

-

selection

-

Devolver la selección actual.

-
doc = app.active
-selection = doc.selection
-app.debug(selection)
-
-

Cuidado, la selección actual pueden ser muchas cosas diferentes.

-
- - - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/documents/properties/index.xml b/doc/public/es/documents/properties/index.xml deleted file mode 100644 index 0404236..0000000 --- a/doc/public/es/documents/properties/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Propiedades on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/documents/properties/ - Recent content in Propiedades on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/index.html b/doc/public/es/index.html deleted file mode 100644 index 69d9edf..0000000 --- a/doc/public/es/index.html +++ /dev/null @@ -1,1703 +0,0 @@ - - - - - - - - - - - - :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
- -
- -
- - - - - - navigation - - - -

Documentación de easymacro!

-

Software Libre, no software gratis.

-

easymacro es una librería para desarrollar más fácilmente macros en LibreOffice con Python. Es una capa de abstracción entre la extensa y compleja API UNO de LibreOffice y tu código.

-

Probablemente, será más feliz si la usa :)

-

Puede utilizar easymacro con cualquier extensión o directamente en sus macros.

-

Aportaciones en Junas (G1)

-
A5DdXxCKPw3QKWVdDVs7CzkNugNUW1sHu5zDJFWxCU2h
-
-

Este proyecto esta en continuo desarrollo.

-
- - - - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/index.json b/doc/public/es/index.json deleted file mode 100644 index e0179b4..0000000 --- a/doc/public/es/index.json +++ /dev/null @@ -1,232 +0,0 @@ -[ -{ - "uri": "https://doc.cuates.net/easymacro/es/application/shortcuts/", - "title": "Accesos directos", - "tags": [], - "description": "", - "content": "Globales Iterar en todos los accesos directos. Accesos directos disponibles para todas las aplicaciones.\nfor acceso_directo, comando in app.shortcuts: app.debug(acceso_directo, comando) Devolver una lista de tuplas con toda la información.\ndatos = app.shortcuts.get_all() app.debug(datos) Verificar si un acceso directo esta asignado.\nacceso_directo = \u0026#39;Shift+Ctrl+Alt+T\u0026#39; app.debug(acceso_directo in app.shortcuts) set Establecer un acceso directo a un comando.\nsc = app.shortcuts acceso_directo = \u0026#39;Shift+Ctrl+Alt+T\u0026#39; comando = \u0026#39;MacroDialog\u0026#39; sc.set(acceso_directo, comando) Establecer un acceso directo a una macro.\nsc = app.shortcuts acceso_directo = \u0026#39;Shift+Ctrl+Alt+M\u0026#39; macro = {\u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;pruebas\u0026#39;} sc.set(acceso_directo, macro) get_by_shortcut Devolver el comando asociado a un acceso directo.\nsc = app.shortcuts acceso_directo = \u0026#39;Shift+Ctrl+Alt+M\u0026#39; comando = sc.get_by_shortcut(acceso_directo) app.debug(comando) get_by_command Devolver el acceso directo asociado a un comando. Puede haber más de uno.\nsc = app.shortcuts comando = \u0026#39;MacroDialog\u0026#39; acceso_directo = sc.get_by_command(comando) app.debug(acceso_directo) remove_by_shortcut Eliminar por acceso directo.\nsc = app.shortcuts acceso_directo = \u0026#39;Shift+Ctrl+Alt+T\u0026#39; sc.remove_by_shortcut(acceso_directo) remove_by_command Eliminar por comando.\nsc = app.shortcuts macro = {\u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;pruebas\u0026#39;} sc.remove_by_command(macro) reset Reiniciar todas las modificaciones.\napp.shortcuts.reset() Modificar accesos directos, solo en una aplicación. Por ejemplo Calc.\nsc = app.shortcuts[\u0026#39;calc\u0026#39;] Los métodos son los mismos que los globales.\nPara las demas aplicaciones: writer, draw, impress, math.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/sheets/", - "title": "Hojas", - "tags": [], - "description": "", - "content": "Trabajar con hojas Referencia por índice doc = app.active hoja = doc[0] app.debug(hoja.name) Referencia por nombre doc = app.active hoja = doc[\u0026#39;datos\u0026#39;] app.debug(hoja.name) in Verificar por nombre si una hoja existe.\ndoc = app.active existe = \u0026#39;Hoja2\u0026#39; in doc app.debug(existe) len Contar la cantidad de hojas en el documento.\ndoc = app.active contar = len(doc) app.debug(contar) iter Recorrer todas las hojas.\ndoc = app.active for hoja in doc: app.debug(hoja) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/installation/", - "title": "Instalación", - "tags": [], - "description": "", - "content": "Clonar repositorio Clone el repositorio en su directorio de proyectos favorito.\ngit clone https://git.cuates.net/elmau/easymacro Muévase al directorio\ncd easymacro/source copie la carpeta easymacro a la carpeta pythonpath en la carpeta de macros Python dentro de su perfil de usuario. Reemplace USUARIO por su usuario real.\n/home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath o use un vínculo simbólico. Reemplace RUTA_ABSOLUTA por la ruta absoluta donde se localice easymacro en su sistema de archivos y USUARIO por su nombre de usuario.\nln -s `RUTA_ABSOLUTA`/easymacro/source/easymacro /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath/ Probar En su archivo de macros favorito, por ejemplo mismacros.py. Use su editor de texto plano o IDE favorito.\nvim /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/mismacros.py Copie el siguiente código:\nimport easymacro as app def main(): app.msgbox(app.INFO_DEBUG) return Ejecute la macro main desde LibreOffice, si ve un cuadro de mensaje con información similar a la siguiente, !felicidades¡\nEsta todo listo para empezar a desarrollar macros con easymacro.\n!Feliz programación!\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/messages/", - "title": "Mensajes", - "tags": [], - "description": "", - "content": "Cuadros de mensaje msgbox Mostrar mensaje estandar.\nmensaje = \u0026#39;Maldito Mundo\u0026#39; titulo = \u0026#39;Mi Macro\u0026#39; app.msgbox(mensaje, titulo) warning Mostrar mensaje con icono de advertencia.\nmensaje = \u0026#39;Cuidado, esta acción es peligrosa\u0026#39; titulo = \u0026#39;Mi Macro\u0026#39; app.warning(mensaje, titulo) errorbox Mostrar mensaje con icono de error.\nmensaje = \u0026#39;ERROR: contacte a soporte\u0026#39; titulo = \u0026#39;Mi Macro\u0026#39; app.errorbox(mensaje, titulo) question Hacer una pregunta mostrando el icono de interrogación y mostrando los botones de comando Si y No. La respuesta siempre es verdadera (True) si el usuario selecciona si y falsa (False) en caso contrario.\nmensaje = \u0026#39;¿Es fácil Python?\u0026#39; titulo = \u0026#39;Mi Macro\u0026#39; resultado = app.question(mensaje, titulo) app.msgbox(resultado) inputbox Muestra un mensaje al usuario, permitiendo capturar una respuesta.\nmensaje = \u0026#39;Escribe tu nombre\u0026#39; nombre = app.inputbox(mensaje) app.msgbox(nombre) Para ocultar solo en pantalla lo que captura el usuario, como contraseñas.\nmensaje = \u0026#39;Captura la contraseña\u0026#39; echochar = \u0026#39;*\u0026#39; contraseña = app.inputbox(mensaje, echochar=echochar) app.msgbox(contraseña) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/cells/properties/", - "title": "Propiedades", - "tags": [], - "description": "", - "content": "is_cell Verdadero (True) si el rango es de una sola celda.\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] app.debug(celda.is_cell) rango = hoja[\u0026#39;A1:C5\u0026#39;] app.debug(rango.is_cell) name Devuelve la dirección de la celda o rango como texto.\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] app.debug(celda.name) rango = hoja[\u0026#39;A1:C5\u0026#39;] app.debug(rango.name) address Devuelve la dirección de la celda como una estructura: com.sun.star.table.CellAddress\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] if celda.is_cell: app.debug(celda.address) range_address Devuelve la dirección del rango como una estructura: com.sun.star.table.CellRangeAddress\nhoja = app.active_sheet rango = hoja[\u0026#39;A1:C5\u0026#39;] if not rango.is_cell: app.debug(rango.range_address) filas y columnas Devolver el tamaño del rango en filas y columnas.\nhoja = app.active_sheet rango = hoja[\u0026#39;A1:E100\u0026#39;] filas = len(rango) columnas = rango.len_columns app.debug(filas, columnas) sheet Devuelve la hoja padre.\nrango = hoja[\u0026#39;A1:C5\u0026#39;] hoja = rango.sheet app.debug(hoja) doc Devuelve el documento padre.\nrango = hoja[\u0026#39;A1:C5\u0026#39;] doc = rango.doc app.debug(doc) style Devuelve o aplica el estilo de celda.\nrango = hoja[\u0026#39;A1:C5\u0026#39;] rango.style = \u0026#39;Good\u0026#39; current_region Devuelve la región actual.\ncelda = hoja[\u0026#39;A1\u0026#39;] rango = celda.current_region app.debug(rango) range_data Devuelve la región actual del rango excepto la primer fila.\ncelda = hoja[\u0026#39;A1\u0026#39;] rango = celda.range_data app.debug(rango) back_color Devuelve o aplica el color de fondo del rango.\nrango = hoja[\u0026#39;A1:E10\u0026#39;] rango.back_color = \u0026#39;red\u0026#39; type Devuelve el tipo de contenido de la celda: texto, número o formula.\ncelda = hoja[\u0026#39;A1\u0026#39;] app.debug(celda.type) error Si la celda tiene una formula con error, devuelve el número de error.\ncelda = hoja[\u0026#39;A1\u0026#39;] app.debug(celda.error) string Devuelve o establece el contenido de la celda como texto.\ncelda = hoja[\u0026#39;A1\u0026#39;] celda.string = \u0026#39;Maldito Mundo\u0026#39; app.debug(celda.type, celda.string) celda = hoja[\u0026#39;A2\u0026#39;] celda.string = 12345 app.debug(celda.type, celda.string) float Devuelve o establece el contenido de la celda como valor.\ncelda = hoja[\u0026#39;A1\u0026#39;] celda.float = 12345 app.debug(celda.type, celda.float) formula Devuelve o establece la formula de la celda.\ncelda = hoja[\u0026#39;A1\u0026#39;] celda.formula = \u0026#39;=RAND()\u0026#39; app.debug(celda.type, celda.formula) date Devuelve o establece el contenido de la celda como fecha.\ncelda = hoja[\u0026#39;A1\u0026#39;] celda.date = app.dates.date(1974, 1, 15) app.debug(type(celda.date), celda.date) 20/08/2022 18:38:53 - DEBUG - \u0026lt;class \u0026#39;datetime.date\u0026#39;\u0026gt; 1974-01-15 time Devuelve o establece el contenido de la celda como tiempo.\ncelda = hoja[\u0026#39;A1\u0026#39;] celda.time = app.dates.time(10, 11, 12) app.debug(type(celda.time), celda.time) datetime Devuelve o establece el contenido de la celda como fecha y tiempo.\ncelda = hoja[\u0026#39;A1\u0026#39;] celda.datetime = app.dates.datetime(1974, 1, 15, 10, 11, 12) app.debug(type(celda.datetime), celda.datetime) value Devuelve o establece el valor de la celda, estableciendo el tipo de dato automáticamente.\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] celda.value = \u0026#39;Soy Texto\u0026#39; app.debug(celda.type, celda.value) celda = hoja[\u0026#39;A2\u0026#39;] celda.value = 12345 app.debug(celda.type, celda.value) celda = hoja[\u0026#39;A3\u0026#39;] celda.value = \u0026#39;=RAND()\u0026#39; app.debug(celda.type, celda.value) celda = hoja[\u0026#39;A4\u0026#39;] celda.value = app.dates.date(1974, 1, 15) app.debug(celda.type, celda.value) data_array Devuelve o establece los datos de un rango. Es un alias de DataArray.\nrango = app.selection datos = rango.data_array app.debug(datos) rango.data_array = datos El tamaño de los datos, debe ser exactamente del tamaño del rango destino. De lo contrario obtendrá un error.\nformula_array Devuelve o establece los datos de un rango. Es un alias de FormulaArray.\nrango = app.selection datos = rango.data_array app.debug(datos) datos = rango.formula_array app.debug(datos) rango.formula_array = datos data_array devolverá los resultados de las celdas con formulas. formula_array devolverá las formulas en dichas celdas.\ndata Alias de data_array al obtener los datos. Al establecer los datos, si es un rango se comporta como data_array, pero si es una celda, se autoajusta al tamaño de los datos.\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] datos = ( (1, \u0026#39;Uno\u0026#39;), (2, \u0026#39;Dos\u0026#39;), (3, \u0026#39;Tres\u0026#39;), ) celda.data = datos app.debug(celda.current_region.data) Siempre valide que haya suficientes celdas libres para los datos para evitar sobreescribirlos.\ndict Devuelve o establece los datos como diccionarios.\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] datos = ( {\u0026#39;No\u0026#39;: 1, \u0026#39;Nombre\u0026#39;: \u0026#39;Ingrid\u0026#39;}, {\u0026#39;No\u0026#39;: 2, \u0026#39;Nombre\u0026#39;: \u0026#39;Sophia\u0026#39;}, {\u0026#39;No\u0026#39;: 3, \u0026#39;Nombre\u0026#39;: \u0026#39;Scarlette\u0026#39;}, ) celda.dict = datos app.debug(celda.current_region.dict) next_free Devuelve la siguiente celda libre después de la región actual.\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] celda_libre = celda.next_free app.debug(celda_libre) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/ranges/properties/", - "title": "Propiedades", - "tags": [], - "description": "", - "content": "names Devolver las direcciones de los rangos.\ndoc = app.active rangos = doc.selection nombres = rangos.names app.debug(nombres) data Devolver y establecer datos.\ndoc = app.active rangos = doc.selection datos = rangos.data app.debug(datos) rangos.data = datos Cada rango debe tener exactamente el mismo tamaño.\nstyle Establecer el estilo de todos los rangos.\ndoc = app.active rangos = doc.selection rangos.style = \u0026#39;Good\u0026#39; " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/sheets/properties/", - "title": "Propiedades", - "tags": [], - "description": "", - "content": "doc Devuelve al documento Calc donde esta la hoja.\ndoc = app.active hoja = doc.active doc = hoja.doc app.debug(doc.title) name Nombre visible y editable por el usuario.\ndoc = app.active hoja = doc.active app.msgbox(hoja.name) hoja.name = \u0026#39;Nuevo Nombre\u0026#39; app.msgbox(hoja.name) code_name Nombre editable y accesible solo por código.\ndoc = app.active hoja = doc.active app.msgbox(hoja.code_name) hoja.code_name = \u0026#39;datos\u0026#39; app.msgbox(hoja.code_name) visible Muestra u oculta la hoja\nhoja = app.active.active app.msgbox(hoja.visible) hoja.visible = not hoja.visible app.msgbox(hoja.visible) hoja.visible = not hoja.visible Solo funcionará con dos o más hojas, por que debe haber al menos una visible.\ncolor Color de la pestaña.\nhoja = app.active.active app.msgbox(hoja.color) hoja.color = \u0026#39;red\u0026#39; app.msgbox(hoja.color) # RGB hoja.color = (125, 200, 10) app.msgbox(hoja.color) used_area Referencia al área de usuario actual.\nhoja = app.active.active rango = hoja.used_area app.debug(rango) is_protected Devuelve verdadero (True) si la hoja esta protegida\nhoja = app.active.active esta_protegida = hoja.is_protected app.debug(esta_protegida) password Establecer una contraseña.\nhoja = app.active.active hoja.password = \u0026#39;siscaloburropanzon\u0026#39; app.debug(hoja.is_protected) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/documents/properties/", - "title": "Propiedades", - "tags": [], - "description": "", - "content": "Propiedades comúnes a todos los documentos. obj Solo lectura. Devolver el objeto original pyUNO.\ndoc = app.active app.debug(type(doc)) app.debug(type(doc.obj)) 18/08/2022 21:59:05 - DEBUG - \u0026lt;class \u0026#39;easymacro.easycalc.LOCalc\u0026#39;\u0026gt; 18/08/2022 21:59:05 - DEBUG - \u0026lt;class \u0026#39;pyuno\u0026#39;\u0026gt; title Título del documento.\ndoc = app.active app.debug(doc.title) doc.title = \u0026#39;Nuevo Titulo\u0026#39; app.debug(doc.title) type Solo lectura. Devolver el tipo de documento: calc, writer, etc.\ndoc = app.active app.debug(doc.type) uid Solo lectura. Devolver el valor interno RuntimeUID del documento.\ndoc = app.active app.debug(doc.uid) is_saved Solo lectura. Si el documento ya ha sido guardado en disco.\ndoc = app.active app.debug(doc.is_saved) is_modified Solo lectura. Si el documento ha sido modificado.\ndoc = app.active app.debug(doc.is_modified) is_read_only Solo lectura. Si el documento es de solo lectura.\ndoc = app.active app.debug(doc.is_read_only) path Solo lectura. Devolver la ruta en disco del documento.\ndoc = app.active app.debug(doc.path) dir Solo lectura. Devolver solo el directorio de la ruta en disco del documento.\ndoc = app.active app.debug(doc.dir) file_name Solo lectura. Devolver el nombre con extensión de la ruta del documento.\ndoc = app.active app.debug(doc.file_name) name Solo lectura. Devolver el nombre sin extensión de la ruta del documento.\ndoc = app.active app.debug(doc.name) visible Ocultar o mostrar un documento.\ndoc = app.active doc.visible = False app.msgbox(doc.visible) doc.visible = True No es necesario que el documento este visible para manipularse.\nzoom Devolver o establecer el porcentaje de zoom del documento.\ndoc = app.active zoom = doc.zoom app.msgbox(zoom) doc.zoom = zoom * 2 app.msgbox(doc.zoom) doc.zoom = zoom status_bar Controlar la barra de estado, es importante siempre actualizar en otro hilo.\n@app.run_in_thread def controlar_barra_estado(sb, texto, limite): sb.start(texto, limite) for i in range(limite): sb.setValue(i) app.sleep(1) sb.end() return def main(): doc = app.active controlar_barra_estado(doc.status_bar, \u0026#39;Línea: \u0026#39;, 10) return Es importante siempre devolver el control de la barra de estado a la aplicación con el método end.\nselection Devolver la selección actual.\ndoc = app.active selection = doc.selection app.debug(selection) Cuidado, la selección actual pueden ser muchas cosas diferentes.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/ranges/", - "title": "Conjuntos de Rangos", - "tags": [], - "description": "", - "content": "Trabajar con conjuntos de rangos Selección Obtener una referencia desde la selección actual. Deben de estar seleccionados más de un rango de celdas.\ndoc = app.active seleccion = doc.selection app.debug(seleccion) 20/08/2022 13:21:17 - DEBUG - Ranges: (\u0026#39;Sheet1.A5:C8\u0026#39;, \u0026#39;Sheet1.E11:F14\u0026#39;) len Contar los rangos.\ndoc = app.active contar = len(doc.selection) app.debug(contar) iter Iterar entre los rangos.\ndoc = app.active for rango in doc.selection: app.debug(rango) 20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$B$4:$D$7 20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$G$10:$H$14 index Referencia a un rango por índice.\ndoc = app.active rangos = doc.selection rango = rangos[1] app.debug(rango) address Referencia a un rango por su dirección.\nrango = rangos[\u0026#39;Hoja1.A1:B5\u0026#39;] app.debug(rango) contain Verificar si un rango esta en la colección.\ndoc = app.active hoja = doc.active rangos = doc.selection resultado = hoja[\u0026#39;D5:F10\u0026#39;] in rangos app.debug(resultado) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/dates_and_time/", - "title": "Fechas y tiempo", - "tags": [], - "description": "", - "content": " La fecha inicial en Calc y en Python es diferente.\ntoday Obtener la fecha de hoy.\nd = app.dates app.msgbox(d.today) now Obtener la fecha y hora actuales.\nd = app.dates app.msgbox(d.now) time Obtener la hora actual.\nd = app.dates app.msgbox(d.now.time()) epoch Obtener el tiempo Unix\nd = app.dates app.msgbox(d.epoch) date Devolver una fecha\nd = app.dates date = d.date(1974, 1, 15) app.msgbox(date) time Devolver un tiempo\nd = app.dates time = d.time(10, 20, 15) app.msgbox(time) datetime Devolver fecha y hora\nd = app.dates dt = d.datetime(1974, 1, 15, 10, 11, 12) app.msgbox(dt) str_to_date Convertir una cadena en fecha. Mira este excelente recurso\nd = app.dates cadena = \u0026#39;1974-01-15\u0026#39; plantilla = \u0026#39;%Y-%m-%d\u0026#39; fecha = d.str_to_date(cadena, plantilla) app.msgbox(fecha) app.msgbox(type(fecha)) Para obtener un valor válido para establecer en una celda de Calc.\nd = app.dates cadena = \u0026#39;1974-01-15\u0026#39; plantilla = \u0026#39;%Y-%m-%d\u0026#39; fecha = d.str_to_date(cadena, plantilla, True) app.msgbox(fecha) app.msgbox(type(fecha)) calc_to_date Convierte el valor de una celda en una fecha Python, por ejemplo, la fecha inicial configurada en Calc.\nd = app.dates value_from_cell = 1 fecha = d.calc_to_date(value_from_cell) app.msgbox(fecha) app.msgbox(type(fecha)) start y end Medir tiempo en segundos.\nd = app.dates d.start() app.sleep(5) seconds = d.end() app.msgbox(seconds) Regresar timedelta en vez de segundos.\nd = app.dates d.start() app.sleep(5) td = d.end(False) app.msgbox(td) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools_debug/", - "title": "Herramientas para depurar", - "tags": [], - "description": "", - "content": "INFO_DEBUG Mostrar información de depuración en un cuadro de mensaje.\nSi tiene cualquier problema en su código durante el desarrollo de sus macros, puede abrir un ticket de soporte en el sistema de ticket de este proyecto. Siempre copie la información de depuración mostrada en este mensaje.\nimport easymacro as app def info(): app.msgbox(app.INFO_DEBUG) return debug Mostrar información en la terminal.\nimport easymacro as app def test_debug(): msg = \u0026#39;Verificar esta información...\u0026#39; app.debug(msg) return 11/08/2022 18:15:45 - DEBUG - Verificar esta información... info Mostrar mensajes informativos en la terminal.\nimport easymacro as app def test_info(): msg = \u0026#39;Iniciando proceso...\u0026#39; app.info(msg) return 11/08/2022 18:23:53 - INFO - Iniciando proceso... error Mostrar mensajes de error en la terminal.\nimport easymacro as app def test_error(): msg = \u0026#39;Error 505\u0026#39; app.error(msg) return 11/08/2022 18:27:34 - ERROR - Error 505 save_log Guardar registro en un archivo, automáticamente se agrega la fecha y hora.\nimport easymacro as app def test_save_log(): app.save_log(\u0026#39;/home/mau/log.txt\u0026#39;, \u0026#39;PyUNO\u0026#39;) app.save_log(\u0026#39;/home/mau/log.txt\u0026#39;, \u0026#39;Maldito Mundo\u0026#39;) return cat ~/log.txt 2022-08-11 18:30:11 - \u0026#39;PyUNO\u0026#39; 2022-08-11 18:30:11 - \u0026#39;Maldito Mundo\u0026#39; msgbox Mostrar cualquier información en un cuadro de mensaje.\ndef message(): msg = \u0026#39;Por favor, consume menos.\u0026#39; app.msgbox(msg) msg = (\u0026#39;uno\u0026#39;, 2, \u0026#39;tres\u0026#39;) app.msgbox(msg) msg = {\u0026#39;nombre\u0026#39;: \u0026#39;Teresa\u0026#39;} app.msgbox(msg) app.msgbox(app) return catch_exception Capturar cualquier error que se produzca al ejecutar una macro.\n@app.catch_exception def test_capturar_error(): r = 1 / 0 return 11/08/2022 18:44:36 - ERROR - test_capturar_error Traceback (most recent call last): File \u0026#34;/home/mau/.config/libreoffice/4/user/Scripts/python/pythonpath/easymacro/easytools.py\u0026#34;, line 115, in func return f(*args, **kwargs) File \u0026#34;/home/mau/.config/libreoffice/4/user/Scripts/python/test.py\u0026#34;, line 18, in test_capturar_error r = 1 / 0 ZeroDivisionError: division by zero Usa este método solo en tiempo de desarrollo. No la uses en producción.\nmri MRI es la mejor extensión para inspeccionar cualquier objeto UNO de LibreOffice. Necesita instalarla primero para poder llamarla.\ndef inspeccionar_objeto(): obj = app.active app.mri(obj) return inspect Inspeccionar un objeto.\ndef inspeccionar_objeto(): doc = app.active data = app.inspect(doc) for p in data.properties: app.debug(p) for m in data.methods: app.debug(m) return Vaciar en una hoja de calculo.\ndef inspeccionar_objeto(): doc = app.active app.inspect(doc, True) return " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/application/menus/", - "title": "Menús", - "tags": [], - "description": "", - "content": "insert Insertar nuevo menú en Calc.\nEn la propiedad CommandURL es posible establecer tanto un comando UNO de LibreOffice, como un diccionario con los datos de una macro.\nEl nombre del menú es importante para cuando se quiera eliminar.\nnombre_menu = \u0026#39;zaz.my.menu\u0026#39; menu = { \u0026#39;Label\u0026#39;: \u0026#39;My menu\u0026#39;, \u0026#39;CommandURL\u0026#39;: nombre_menu, \u0026#39;Submenu\u0026#39;: [ { \u0026#39;Label\u0026#39;: \u0026#39;Open Macros Dialog...\u0026#39;, \u0026#39;CommandURL\u0026#39;: \u0026#39;MacroDialog\u0026#39;, }, { \u0026#39;Label\u0026#39;: \u0026#39;-\u0026#39;, }, { \u0026#39;Label\u0026#39;: \u0026#39;My macro\u0026#39;, \u0026#39;CommandURL\u0026#39;: {\u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;hola\u0026#39;}, }, { \u0026#39;Label\u0026#39;: \u0026#39;Execute macro...\u0026#39;, \u0026#39;CommandURL\u0026#39;: \u0026#39;RunMacro\u0026#39;, \u0026#39;ShortCut\u0026#39;: \u0026#39;Shift+Ctrl+Alt+E\u0026#39;, }, ] } menus_calc = app.menus[\u0026#39;calc\u0026#39;] menus_calc.insert(menu) remove Eliminar un menú existente.\nnombre_menu = \u0026#39;zaz.my.menu\u0026#39; menus_calc = app.menus[\u0026#39;calc\u0026#39;] menus_calc.remove(nombre_menu) Insertar nuevo menú en uno existente. Dentro del menú Herramientas (tools), después de la opción Macros...\nmenu = app.menus[\u0026#39;calc\u0026#39;][\u0026#39;tools\u0026#39;] menu_nombre = \u0026#39;zaz.my.menu\u0026#39; menu_nuevo = { \u0026#39;Label\u0026#39;: \u0026#39;My menu\u0026#39;, \u0026#39;CommandURL\u0026#39;: menu_nombre, \u0026#39;Submenu\u0026#39;: [ { \u0026#39;Label\u0026#39;: \u0026#39;Open Macros Dialog...\u0026#39;, \u0026#39;CommandURL\u0026#39;: \u0026#39;MacroDialog\u0026#39;, }, { \u0026#39;Label\u0026#39;: \u0026#39;-\u0026#39;, }, { \u0026#39;Label\u0026#39;: \u0026#39;My macro\u0026#39;, \u0026#39;CommandURL\u0026#39;: {\u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;hello\u0026#39;}, }, { \u0026#39;Label\u0026#39;: \u0026#39;Execute macro...\u0026#39;, \u0026#39;CommandURL\u0026#39;: \u0026#39;RunMacro\u0026#39;, \u0026#39;ShortCut\u0026#39;: \u0026#39;Shift+Ctrl+Alt+E\u0026#39;, }, ] } if menu_nombre in menu: menu.remove(menu_nombre) else: menu.insert(menu_nuevo, \u0026#39;.uno:MacrosMenu\u0026#39;) debug Para saber los nombres de cualquier menú.\nmenu = app.menus[\u0026#39;calc\u0026#39;][\u0026#39;tools\u0026#39;] menu.debug() (0) .uno:SpellDialog (1) .uno:SpellOnline (2) .uno:ThesaurusDialog (3) .uno:LanguageMenu ├─ (0) .uno:SetLanguageAllTextMenu ├─ (1) ---------- ├─ (2) .uno:Hyphenate ├─ (3) .uno:ChineseConversion ├─ (4) .uno:HangulHanjaConversion ├─ (5) ---------- ├─ (6) .uno:MoreDictionaries (4) ---------- (5) .uno:AutoCorrectDlg (6) .uno:AutoComplete (7) .uno:ImageMapDialog (8) ---------- (9) .uno:RedactDoc (10) .uno:AutoRedactDoc (11) ---------- (12) .uno:GoalSeekDialog (13) .uno:SolverDialog (14) .uno:AuditMenu ├─ (0) .uno:ShowPrecedents ├─ (1) .uno:ShowDependents ├─ (2) ---------- ├─ (3) .uno:ClearArrows ├─ (4) .uno:ClearArrowPrecedents ├─ (5) .uno:ClearArrowDependents ├─ (6) ---------- ├─ (7) .uno:ShowErrors ├─ (8) .uno:RefreshArrows ├─ (9) ---------- ├─ (10) .uno:AuditingFillMode ├─ (11) .uno:AutoRefreshArrows ├─ (12) .uno:ShowInvalid (15) .uno:ScenarioManager (16) ---------- (17) .uno:ToolsFormsMenu ├─ (0) .uno:SwitchControlDesignMode ├─ (1) .uno:UseWizards ├─ (2) ---------- ├─ (3) .uno:ControlProperties ├─ (4) .uno:FormProperties ├─ (5) ---------- ├─ (6) .uno:ShowFmExplorer ├─ (7) .uno:TabDialog ├─ (8) .uno:AddField ├─ (9) ---------- ├─ (10) .uno:OpenReadOnly ├─ (11) .uno:AutoControlFocus (18) ---------- (19) .uno:ShareDocument (20) .uno:Protect (21) .uno:ToolProtectionDocument (22) ---------- (23) .uno:MacrosMenu ├─ (0) .uno:MacroRecorder ├─ (1) .uno:RunMacro ├─ (2) .uno:BasicIDEAppear ├─ (3) .uno:ScriptOrganizer ├─ (4) ---------- ├─ (5) .uno:MacroSignature ├─ (6) .uno:MacroOrganizer?TabId:short=1 ├─ (7) ---------- ├─ (8) .uno:OpenXMLFilterSettings (24) .uno:DevelopmentToolsDockingWindow (25) ---------- (26) service:com.sun.star.deployment.ui.PackageManagerDialog (27) .uno:ConfigureDialog (28) .uno:OptionsTreeDialog " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/cells/methods/", - "title": "Métodos", - "tags": [], - "description": "", - "content": "clear Limpia el rango. Por default solo borra datos. Mire API CellFlags para más información.\nrango.clear() Para borrar todo.\nrango.clear(app.ALL) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/ranges/methods/", - "title": "Métodos", - "tags": [], - "description": "", - "content": "ranges Crear un nuevo contender de rangos vacío.\ndoc = app.active rangos = doc.ranges() app.debug(rangos) add doc = app.active hoja = doc.active rangos = doc.ranges() rangos.add(hoja[\u0026#39;A1:B2\u0026#39;]) rangos.add(hoja[\u0026#39;D5:F10\u0026#39;]) app.debug(rangos) remove rangos.remove(hoja[\u0026#39;A1:B2\u0026#39;]) get_ranges " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/sheets/methods/", - "title": "Métodos", - "tags": [], - "description": "", - "content": "unprotect Quitar contraseña.\nhoja = app.active.active hoja.password = \u0026#39;siscaloburropanzon\u0026#39; app.msgbox(hoja.is_protected) hoja.unprotect(\u0026#39;siscaloburropanzon\u0026#39;) app.msgbox(hoja.is_protected) activate Pasar el foco a la hoja.\ndoc = app.active hoja = doc[-1] hoja.activate() move Mover a la última posición.\ndoc = app.active hoja = doc[0] hoja.move() Mover a una posición especifica.\ndoc = app.active hoja = doc[0] hoja.move(3) remove Remover hoja.\nsheet = app.active.active sheet.remove() Siempre debe existir al menos una hoja.\ncopy Siempre valida que no exista el nuevo nombre.\ndoc = app.active hoja = doc[0] nuevo_nombre = f\u0026#39;{hoja.name}_2\u0026#39; if not nuevo_nombre in doc: hoja.copy(nuevo_nombre) Si no se establece el nuevo nombre, se generá de forma automática: nombre + índice.\nhoja.copy() copy_to Copiar la hoja a otro documento. Se usa el mismo nombre.\ndoc = app.active hoja = doc.active documento_nuevo = app.docs.new() hoja.copy_to(documento_nuevo) Usar un nuevo nombre.\nhoja.copy_to(documento_nuevo, \u0026#39;Nuevo nombre\u0026#39;) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/documents/methods/", - "title": "Métodos", - "tags": [], - "description": "", - "content": "new Crear nuevo documento, la aplicación predeterminada es Calc.\ndoc = app.docs.new() app.debug(doc.type) Para un nuevo documento writer.\ndoc = app.docs.new(\u0026#39;writer\u0026#39;) app.debug(doc.type) Otros documentos.\ndoc = app.docs.new(\u0026#39;draw\u0026#39;) app.debug(doc.type) doc = app.docs.new(\u0026#39;impress\u0026#39;) app.debug(doc.type) doc = app.docs.new(\u0026#39;math\u0026#39;) app.debug(doc.type) Crear con argumentos.\npropiedades = {\u0026#39;Hidden\u0026#39;: True} doc = app.docs.new(\u0026#39;writer\u0026#39;, propiedades) mensaje = f\u0026#39;{doc.type} - {doc.title}\u0026#39; app.msgbox(mensaje) doc.visible = True No es necesario que el documento este visible para manipularse.\nopen Abrir archivos.\nruta = \u0026#39;/home/mau/Mi_archivo.ods\u0026#39; doc = app.docs.open(ruta) No es necesario pasar las rutas en formato URL.\nPuede abrir cualquier archivo que sea soportado por LibreOffice.\nruta = \u0026#39;/home/mau/ejemplo.xlsx\u0026#39; doc = app.docs.open(ruta) Abrir con argumentos.\nruta = \u0026#39;/home/mau/ejemplo.ods\u0026#39; argumentos = {\u0026#39;Password\u0026#39;: \u0026#39;siscaloburropanzon\u0026#39;} doc = app.docs.open(ruta, argumentos) save Guardar un nuevo documento.\npath = \u0026#39;/home/mau/nuevo_documento.ods\u0026#39; doc = app.docs.new() doc.save(path) Cualquier archivo, previamente guardado, que sea modificado puede ser guardado con:\ndoc.save() Abrir un archivo existente y guardarlo con otro nombre.\nruta = \u0026#39;/home/mau/ejemplo.ods\u0026#39; doc = app.docs.open(ruta) nueva_ruta = \u0026#39;/home/mau/otro_nombre.ods\u0026#39; doc.save(nueva_ruta) close Cerrar un archivo.\ndoc = app.docs.new() app.msgbox(doc.title) doc.close() to_pdf Exportar a PDF.\ndoc = app.active ruta = \u0026#39;/home/mau/ejemplo.pdf\u0026#39; doc.to_pdf(ruta) Si no se establece una ruta, se devuelve el PDF en memoria.\ndoc = app.active pdf = doc.to_pdf() app.debug(pdf) Mire las opciones del filtro de exportación a PDF, puede pasarlas como un diccionario como segundo argumento de este método.\nexport Exportar a otros formatos.\ndoc = app.docs.new() ruta = \u0026#39;/home/mau/miarchivo.xlsx\u0026#39; filtro = \u0026#39;xlsx\u0026#39; doc.export(ruta, filtro) ruta = \u0026#39;/home/mau/miarchivo.xls\u0026#39; filtro = \u0026#39;xls\u0026#39; doc.export(ruta, filtro) doc = app.docs.new(\u0026#39;writer\u0026#39;) ruta = \u0026#39;/home/mau/miarchivo.docx\u0026#39; filtro = \u0026#39;docx\u0026#39; doc.export(ruta, filtro) ruta = \u0026#39;/home/mau/miarchivo.doc\u0026#39; filtro = \u0026#39;doc\u0026#39; doc.export(ruta, filtro) ruta = \u0026#39;/home/mau/miarchivo.rtf\u0026#39; filtro = \u0026#39;rtf\u0026#39; doc.export(ruta, filtro) Exportar en memoria.\ndoc = app.docs.new() filtro = \u0026#39;xlsx\u0026#39; excel_doc = doc.export(filter_name=filtro) set_focus Enviar el foco al documento.\nfor doc in app.docs: app.debug(doc.title) doc.set_focus() app.sleep(1) copy Copiar la selección activa al portapapeles.\ndoc = app.active doc.copy() paste Copiar el contenido del portapapeles, en la selección actual.\ndoc = app.active doc.paste() paste_special Mostrar el cuadro de diálogo Pegado Especial.\nSolo se mostrará si existe contenido en el portapapeles.\ndoc = app.active doc.paste_special() paste_values Pegar solo los valores.\ndoc = app.active doc.paste_values() Si el destino no esta vacío, el usuario verá el cuadro de mensaje de confirmación.\nclear_undo La mayoría de las acciones realizadas por código, quedan en el historial de acciones, por lo que el usuario puede deshacerlas. Para eviar esto se puede limpiar este historial.\ndoc = app.active doc.clear_undo() " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/paths/", - "title": "Rutas y archivos", - "tags": [], - "description": "", - "content": "Trabajar con rutas y archivos. path Obtener información de una ruta.\nruta_archivo = \u0026#39;/home/mau/mi_archivo.ods\u0026#39; p = app.paths(ruta_archivo) 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) 15/08/2022 14:40:08 - DEBUG - /home/mau 15/08/2022 14:40:08 - DEBUG - mi_archivo.ods 15/08/2022 14:40:08 - DEBUG - mi_archivo 15/08/2022 14:40:08 - DEBUG - ods 15/08/2022 14:40:08 - DEBUG - 7011 15/08/2022 14:40:08 - DEBUG - file:///home/mau/mi_archivo.ods Obtener la misma información como un tupla.\nruta_archivo = \u0026#39;/home/mau/mi_archivo.ods\u0026#39; p = app.paths(ruta_archivo) app.debug(p.info) 15/08/2022 14:43:01 - DEBUG - (\u0026#39;/home/mau\u0026#39;, \u0026#39;mi_archivo.ods\u0026#39;, \u0026#39;mi_archivo\u0026#39;, \u0026#39;ods\u0026#39;, 7011, \u0026#39;file:///home/mau/mi_archivo.ods\u0026#39;) O como diccionario.\nruta_archivo = \u0026#39;/home/mau/mi_archivo.ods\u0026#39; p = app.paths(ruta_archivo) app.debug(p.dict) 15/08/2022 14:43:01 - DEBUG - {\u0026#39;path\u0026#39;: \u0026#39;/home/mau\u0026#39;, \u0026#39;file_name\u0026#39;: \u0026#39;mi_archivo.ods\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;mi_archivo\u0026#39;, \u0026#39;ext\u0026#39;: \u0026#39;ods\u0026#39;, \u0026#39;size\u0026#39;: 7011, \u0026#39;url\u0026#39;: \u0026#39;file:///home/mau/mi_archivo.ods\u0026#39;} home Obtener la carpeta de inicio del usuario.\np = app.paths app.debug(p.home) documents Obtener la carpeta Documentos del usuario.\np = app.paths app.debug(p.documents) user_profile Obtener la ruta del perfil de usuario.\np = app.paths app.debug(p.user_profile) user_config Obtener la ruta de la carpeta config en el perfil de usuario.\np = app.paths app.debug(p.user_config) python Obtener la ruta del ejecutable python\np = app.paths app.debug(p.python) to_system Pasar una ruta en formato URL al formato del sistema de archivos del SO.\np = app.paths ruta_url = \u0026#39;file:///home/mau/mi_archivo.ods\u0026#39; ruta = p.to_system(ruta_url) app.debug(ruta) to_url Pasar una ruta del sistema de archivos del SO al formato URL.\np = app.paths ruta = \u0026#39;/home/mau/mi_archivo.ods\u0026#39; ruta_url = p.to_url(ruta) app.debug(ruta_url) config Obtener rutas de la configuración de LibreOffice. Por default obtiene la ruta de Documentos, para otras ruta mire Api XPathSettings\np = app.paths ruta = p.config() app.debug(ruta) ruta = p.config(\u0026#39;UserConfig\u0026#39;) app.debug(ruta) Algunas rutas pueden ser más de una, separados por ;, en este caso, el resultado es una lista con las rutas.\njoin Concatenar rutas.\np = app.paths ruta = p.join(\u0026#39;/home/mau\u0026#39;, \u0026#39;pruebas\u0026#39;, \u0026#39;archivo.ods\u0026#39;) app.debug(ruta) exists Verificar si una ruta existe.\np = app.paths resultado = p.exists(\u0026#39;/home/mau/test/archivo.ods\u0026#39;) app.debug(resultado) exists_app Verificar si una aplicación existe.\np = app.paths resultado = p.exists_app(\u0026#39;noexiste\u0026#39;) app.debug(resultado) resultado = p.exists_app(\u0026#39;soffice\u0026#39;) app.debug(resultado) is_dir Verificar si la ruta es un directorio.\np = app.paths resultado = p.is_dir(\u0026#39;/home/mau\u0026#39;) app.debug(resultado) is_file Verificar si la ruta es un archivo.\np = app.paths resultado = p.is_file(\u0026#39;/home/mau/mi_archivo.ods\u0026#39;) app.debug(resultado) temp_file Crear un archivo temporal, es borrado automáticamente al cerrarse.\np = app.paths f = p.temp_file() f.write(app.INFO_DEBUG) f.close() Usado en contexto, se cierra automáticamente.\nwith p.temp_file() as f: app.debug(f.name) f.write(\u0026#39;test\u0026#39;) temp_dir Crear un directorio temporal, al salir del contexto, es eliminado junto con todo su contenido del sistema de archivos.\np = app.paths with p.temp_dir() as d: app.debug(p.exists(d)) app.debug(d) app.debug(p.exists(d)) get Permitir al usuario seleccionar archivos, devuelve solo la ruta. De forma predeterminada abre en la carpeta Documentos.\np = app.paths ruta = p.get() app.debug(ruta) Establecer que abra en otro directorio.\nruta = p.get(\u0026#39;/tmp\u0026#39;) app.debug(ruta) Agregar un filtro.\nruta = p.get(filters=\u0026#39;ods\u0026#39;) app.debug(ruta) Agregar multiples filtros.\nruta = p.get(filters=\u0026#39;xml,txt\u0026#39;) app.debug(ruta) Permitir selecciones multiples.\nruta = p.get(filters=\u0026#39;xml,txt\u0026#39;, multiple=True) app.debug(ruta) get_dir Permitir al usuario seleccionar un directorio, devuelve solo la ruta. De forma predeterminada abre en la carpeta Documentos.\np = app.paths ruta = p.get_dir() app.debug(ruta) Establecer que abra en otro directorio.\nruta = p.get_dir(\u0026#39;/tmp\u0026#39;) app.debug(ruta) get_for_save Permitir seleccionar un directorio y capturar el nombre del archivo, devuelve la ruta completa.\np = app.paths ruta = p.get_for_save() app.debug(ruta) Establecer que inicie en otro directorio.\nruta = p.get_for_save(\u0026#39;/tmp\u0026#39;) app.debug(ruta) Si se establece un filtro, automáticamente se agrega la extensión.\nruta = p.get_for_save(filters=\u0026#39;txt\u0026#39;) app.debug(ruta) files Obtener archivos de una ruta, no recursivamente. De forma predeterminada regresa todos, incluyendo archivos ocultos.\nruta = \u0026#39;/home/mau\u0026#39; p = app.paths archivos = p.files(ruta) for a in archivos: app.debug(a) Filtrar por tipo de archivo.\np = app.paths archivos = p.files(ruta, \u0026#39;*.pdf\u0026#39;) Obtener archivos de forma recursiva.\np = app.paths archivos = p.files(ruta, \u0026#39;**/*.xml\u0026#39;) walk Obtener archivos de forma recursiva.\np = app.paths ruta = \u0026#39;/home/mau/Documents\u0026#39; archivos = p.walk(ruta) for a in archivos: app.debug(a) Con filtro.\narchivos = p.walk(ruta, \u0026#39;ods\u0026#39;) Con filtros.\narchivos = p.walk(ruta, \u0026#39;ods|odt\u0026#39;) dirs Obtener los directorios de una ruta, no recursivamente.\np = app.paths ruta = \u0026#39;/home/mau/Documents\u0026#39; folders = p.dirs(ruta) for f in folders: app.debug(f) walk_dirs Obtener los directorios de una ruta, no recursivamente.\np = app.paths ruta = \u0026#39;/home/mau/Documents\u0026#39; folders = p.walk_dirs(ruta) for f in folders: app.debug(f) Obtener información en una lista de tuplas: (ID_FOLDER, ID_PADRE, NOMBRE)\nfolders = p.walk_dirs(ruta, True) extension Obtener la ruta de instalación de una extensión a partir de su ID.\np = app.paths id_ext = \u0026#39;net.elmau.zaz.talk\u0026#39; ruta = p.extension(id_ext) app.debug(ruta) replace_ext Reemplazar extensión de un archivo.\np = app.paths ruta = \u0026#39;/home/mau/mi_archivo.ods\u0026#39; ruta_nueva = p.replace_ext(ruta, \u0026#39;pdf\u0026#39;) app.debug(ruta_nueva) open Abrir cualquier archivo con el programas predeterminado del SO.\np = app.paths ruta = \u0026#39;/home/mau/archivo.pdf\u0026#39; p.open(ruta) ruta = \u0026#39;/home/mau/index.html\u0026#39; p.open(ruta) save y read Guardar y leer datos, el encoding predeterminado es UTF8.\np = app.paths datos = \u0026#34;\u0026#34;\u0026#34;¿Quieres saber quién eres? No preguntes. Actúa. La acción te delineará y definirá. Thomas Jefferson \u0026#34;\u0026#34;\u0026#34; ruta = \u0026#39;/home/mau/temp.txt\u0026#39; p.save(ruta, datos) datos = p.read(ruta) app.msgbox(datos) Cambiar el encoding.\napp.paths.save(ruta, datos, \u0026#39;iso-8859-1\u0026#39;) save_bin y read_bin Guardar y leer datos binarios.\np = app.paths datos = b\u0026#39;Datos binarios\u0026#39; ruta = \u0026#39;/home/mau/temp.bin\u0026#39; p.save_bin(ruta, datos) datos = p.read_bin(ruta) app.msgbox(datos) save_json y read_json Guardar y leer en formato json.\np = app.paths ruta = \u0026#39;/home/mau/datos.json\u0026#39; datos = { \u0026#39;tipo\u0026#39;: \u0026#39;calc\u0026#39;, \u0026#39;nombre\u0026#39;: \u0026#39;miarchivo.ods\u0026#39;, } p.save_json(ruta, datos) datos = p.read_json(ruta) app.msgbox(datos) save_csv y read_csv Exportar e importar datos en formato CSV. Vea la documentación CSV para los argumentos que puede usar.\np = app.paths ruta = \u0026#39;/home/mau/datos.csv\u0026#39; ahora = app.dates.now datos = ( (1, \u0026#39;uno\u0026#39;, ahora), (2, \u0026#39;dos\u0026#39;, ahora), (3, \u0026#39;tres\u0026#39;, ahora), ) p.save_csv(ruta, datos) datos = p.read_csv(ruta) app.msgbox(datos) kill Borra archivos o directorios con todo su contenido. Devuelve verdadero (True) en caso de exito y falso (Falso) en cualquier otro caso.\nEste proceso es destructivo, es buena practica siempre solicitar confirmación al usuario.\np = app.paths ruta = \u0026#39;/home/mau/temp.bin\u0026#39; resultado = p.kill(ruta) app.msgbox(resultado) copy Copiar archivos. Devuelve la ruta completa final destino.\nDe un origen a una carpeta destino\np = app.paths ruta_origen = \u0026#39;/home/mau/temp.txt\u0026#39; ruta_destino = \u0026#39;/home/mau/Desktop\u0026#39; ruta = p.copy(ruta_origen, ruta_destino) app.debug(ruta) Cambiar el nombre destino.\nruta_origen = \u0026#39;/home/mau/temp.txt\u0026#39; ruta_destino = \u0026#39;/home/mau/Desktop\u0026#39; nuevo_nombre = \u0026#39;datos.csv\u0026#39; ruta = p.copy(ruta_origen, ruta_destino, nuevo_nombre) app.debug(ruta) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/cells/", - "title": "Celdas y rangos", - "tags": [], - "description": "", - "content": "Trabajar con celdas y rangos selection Referencia por selección actual.\nseleccion = app.selection app.debug(seleccion) 20/08/2022 15:32:36 - DEBUG - Cell: $Sheet1.$A$2 20/08/2022 15:32:39 - DEBUG - Range: $Sheet1.$C$8:$D$11 address Referencia por dirección.\nhoja = app.active_sheet celda = hoja[\u0026#39;A1\u0026#39;] rango = hoja[\u0026#39;C10:D15\u0026#39;] app.debug(celda) app.debug(rango) position Referencia por posición.\nPara celdas: HOJA[fila,columna]\nPara rangos: HOJA[fila_inicial:fila_final, columna_inicial:columna_final]\nhoja = app.active_sheet # ~ Cell A10 celda = hoja[9,0] # ~ Range A1:C10 rango = hoja[0:10,0:3] iter Iterar cada celda de un rango.\nhoja = app.active_sheet rango = hoja[\u0026#39;B10:C15\u0026#39;] for celda in rango: app.debug(celda) contains Verificar si un rango esta dentro de otro.\nhoja = app.active_sheet celda = hoja[\u0026#39;C5\u0026#39;] rango = hoja[\u0026#39;A1:E10\u0026#39;] resultado = celda in rango app.debug(resultado) celda = hoja[\u0026#39;C50\u0026#39;] resultado = celda in rango app.debug(resultado) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/email/", - "title": "Correo electrónico", - "tags": [], - "description": "", - "content": "Enviar correo electrónico. Siempre guarda las contraseñas de la forma más segura posible.\nsend Enviar un correo electrónico.\nfrom conf import PASSWORD SERVER = dict( server = \u0026#39;mail.correo.net\u0026#39; , port = 405, ssl = True, user = \u0026#39;no-responder@pruebas.mx\u0026#39;, password = PASSWORD, ) body = \u0026#34;Hola Ingrid\\n\\n¿Como estas?\\n\\nSaludos cordiales\u0026#34; message = dict( to = \u0026#39;ingrid@bergman.mx\u0026#39;, subject = \u0026#39;Te amo...\u0026#39;, body = body, ) app.email.send(SERVER, message) Puede usar los campos cc (Con Copia) y bcc (Con Copia Oculta), así como separar por comas las direcciones destino para enviar a más de un correo.\nto = \u0026#39;mail1@correo.com,mail2@correo.com,mail3@correo.com\u0026#39; cc = \u0026#39;otro@correo.com\u0026#39; bcc = \u0026#39;oculto@correo.com\u0026#39; Podemos enviar más de un mensaje.\nmensaje1 = dict( to = \u0026#39;ingrid@correo.net\u0026#39;, subject = \u0026#39;Te amo...\u0026#39;, body = \u0026#34;Hola Ingrid\\n\\n¿Como estas?\\n\\nSaludos cordiales\u0026#34;, ) mensaje2 = dict( to = \u0026#39;sophia@correo.net\u0026#39;, subject = \u0026#39;A ti también...\u0026#39;, body = \u0026#34;Hola Sophia\\n\\n¿Como estas?\\n\\nSaludos cordiales\u0026#34;, ) mensajes = (mensaje1, mensaje2) app.email.send(SERVER, mensajes) 16/08/2022 13:01:49 - DEBUG - Connect to: mail.server.net 16/08/2022 13:01:50 - DEBUG - Email sent... 16/08/2022 13:01:51 - DEBUG - Email sent... 16/08/2022 13:01:51 - DEBUG - Close connection... Enviar un archivo adjunto.\narchivo = \u0026#39;/home/mau/temp.txt\u0026#39; mensaje = dict( to = \u0026#39;ingrid@bergman.mx\u0026#39;, subject = \u0026#39;Te amo...\u0026#39;, body = \u0026#34;Hola Ingrid\\n\\n¿Como estas?\\n\\nSaludos cordiales\u0026#34;, files = archivo, ) app.email.send(SERVER, mensaje) O varios.\narchivos = ( \u0026#39;/home/mau/temp.txt\u0026#39;, \u0026#39;/home/mau/datos.csv\u0026#39;, ) Si tu cliente de correo usa el formato mbox, puede guardar los correos enviados en una carpeta dentro de la configuración de su cliente de correo.\nruta = \u0026#39;/home/mau/.thunderbird/7iznrbyw.default/Mail/Local Folders/LibreOffice\u0026#39; mensaje = dict( to = \u0026#39;ingrid@bergman.mx\u0026#39;, subject = \u0026#39;Te amo...\u0026#39;, body = \u0026#34;Hola Ingrid\\n\\n¿Como estas?\\n\\nSaludos cordiales\u0026#34;, path = ruta, ) app.email.send(SERVER, mensaje) Todos los correos se envían siempre en otro hilo de ejecución.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/sheets/events/", - "title": "Eventos", - "tags": [], - "description": "", - "content": "Eventos de la hoja. Obtener una tupla con los eventos soportados por la hoja.\nhoja = app.active.active nombres = hoja.events.names app.debug(nombres) Asignar una macro a un evento. def on_select(source): app.debug(source.AbsoluteName) return def main(): doc = app.active hoja = doc.active if \u0026#39;OnSelect\u0026#39; in hoja.events: macro = {\u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;on_select\u0026#39;} hoja.events[\u0026#39;OnSelect\u0026#39;] = macro return Eliminar la asignación del evento. hoja.events[\u0026#39;OnSelect\u0026#39;] = {} O\nhoja.events.remove(\u0026#39;OnFocus\u0026#39;) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/", - "title": "Herramientas", - "tags": [], - "description": "", - "content": "Recuerda, es necesario importar la librería.\nimport easymacro as app Información sobre la PC OS Obtener el sistema operativo.\napp.msgbox(app.OS) DESKTOP Obtener el tipo de escritorio, solo en GNU/Linux.\napp.msgbox(app.DESKTOP) PC Obtener el nombre de la computadora.\napp.msgbox(app.PC) USER Obtener el nombre de usuario.\napp.msgbox(app.USER) IS_WIN Saber si estamos en Windows.\napp.msgbox(app.IS_WIN) IS_MAC Saber si estamos en OSX.\napp.msgbox(app.IS_MAC) Información sobre LibreOffice NAME Nombre de la aplicación.\napp.msgbox(app.NAME) VERSION Versión de la aplicación.\napp.msgbox(app.VERSION) LANG Lenguaje de la aplicación.\napp.msgbox(app.LANG) LANGUAGE Lenguaje con variante.\napp.msgbox(app.LANGUAGE) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/application/", - "title": "LibreOffice", - "tags": [], - "description": "", - "content": "fonts Devolver todas las fuentes visibles en LibreOffice. Mire FontDescriptor\nfonts = app.fonts() for f in fonts: app.debug(f\u0026#39;Nombre: {f.Name} - Estilo: {f.StyleName}\u0026#39;) filters Devolver todos los filtros soportados en LibreOffice. Mire la ayuda y en API FilterFactory para más detalles.\nfiltros = app.filters() for f in filtros: info = f\u0026#34;Nombre UI: {f[\u0026#39;UIName\u0026#39;]} - Nombre: {f[\u0026#39;Name\u0026#39;]} - Tipo: {f[\u0026#39;Type\u0026#39;]}\u0026#34; app.debug(info) dispatch Ejecutar cualquier comando UNO de LibreOffice, mire la lista de comandos y API dispatch.\nEste método automáticamente agrega el prefijo necesario: .uno:\ndoc = app.active comando = \u0026#39;Gallery\u0026#39; app.dispatch(doc, comando) Use este método solamente si no hay un método equivalente en easymacro o directamente en el API de LibreOffice.\nclipboard Envíar contenido al portapapeles.\napp.clipboard.set(\u0026#39;Los 7 samuráis\u0026#39;) Recuperar contenido del portapapeles.\ncontent = app.clipboard.get() app.debug(content) disable Deshabilitar un comando. Para una lista de comandos mire DispatchCommands.\ncomando = \u0026#39;OpenFromCalc\u0026#39; resultado = app.cmd.disable(comando) app.debug(resultado) OpenFromCalc es la opción para abrir documentos en Calc, deshabilita o habilita la entrada del menú y el icono en la barra de herramientas.\nenabled Habilitar un comando.\ncomando = \u0026#39;OpenFromCalc\u0026#39; resultado = app.cmd.enabled(comando) app.debug(resultado) get_config Obtener valores de la configuración de LibreOffice.\nnombre_node = \u0026#39;/org.openoffice.Office.Common/Help\u0026#39; clave = \u0026#39;System\u0026#39; valor = app.get_config(nombre_node, clave) app.debug(valor) nombre_node = \u0026#39;/org.openoffice.Office.Common/Misc/\u0026#39; clave = \u0026#39;FirstRun\u0026#39; valor = app.get_config(nombre_node, clave) app.debug(valor) clave = \u0026#39;UseSystemFileDialog\u0026#39; valor = app.get_config(nombre_node, clave) app.debug(valor) 17/08/2022 14:14:12 - DEBUG - UNIX 17/08/2022 14:14:12 - DEBUG - False 17/08/2022 14:14:12 - DEBUG - True set_config Establece un nuevo valor en la configuración de LibreOffice.\nnombre_nodo = \u0026#39;/org.openoffice.Office.UI/ColorScheme\u0026#39; clave = \u0026#39;CurrentColorScheme\u0026#39; nuevo_valor = \u0026#39;LibreOffice Dark\u0026#39; resultado = app.set_config(nombre_nodo, clave, nuevo_valor) app.debug(resultado) Algunos nodos y claves interesantes:\n/org.openoffice.Office.Common/Save/Document AutoSave AutoSaveTimeIntervall No todos los valores de los nodos se pueden cambiar, algunos valores son de solo lectura.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/documents/", - "title": "Documentos", - "tags": [], - "description": "", - "content": "Trabajar con Documentos active Documento activo.\ndoc = app.active app.msgbox(doc.title) iteration Iterar en todos los documentos abiertos.\nfor doc in app.docs: app.debug(doc.type, doc.title) count Contar los documentos abiertos.\ncuantos = len(app.docs) app.debug(cuantos) contain Verificar si un documento esta en la colección.\nresultado = \u0026#39;mi_archivo.ods\u0026#39; in app.docs app.debug(resultado) index Devolver por índice.\ndoc = app.docs[1] app.debug(doc.type, doc.title) name Devolver por nombre.\nnombre = \u0026#39;mi_archivo.ods\u0026#39; if nombre in app.docs: doc = app.docs[nombre] app.debug(doc.type, doc.title) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/threads/", - "title": "Hilos", - "tags": [], - "description": "", - "content": "Ejecutar macros en otros hilos. Las macros se ejecutan en un hilo que bloquea cualquier otro proceso dentro de la aplicación.\nSi ejecutas la siguiente macro main, nota que no puedes hacer algo más dentro de LibreOffice durante los 5 segundos que dura el proceso.\nimport easymacro as app def hacer_pausa(segundos): app.sleep(segundos) app.debug(\u0026#39;He terminado\u0026#39;) return def main(): hacer_pausa(5) app.msgbox(\u0026#39;Fin...\u0026#39;) return Hasta que aparece el cuadro de mensaje con la palabra Fin y lo cierras, el usuario puede seguir usando la aplicación.\nrun_in_thread Ahora ejecutamos la macro en otro hilo, \u0026ldquo;decorando\u0026rdquo; cualquier macro con run_in_thread\n@app.run_in_thread def hacer_pausa(segundos): app.sleep(segundos) app.debug(\u0026#39;He terminado\u0026#39;) return def main(): hacer_pausa(5) app.msgbox(\u0026#39;Fin...\u0026#39;) return Nota que ahora el mensaje aparece inmediatamente y no tras los 5 segundos.\nPonga mucha atención en no ejecutar macros en otros hilo que dependen de algo suceptible de ser cambiado o interceptado por el usuario, por ejemplo, la celda activa.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/calc/", - "title": "Calc", - "tags": [], - "description": "", - "content": "Trabajar con Calc active doc = app.active app.debug(doc.type) Propiedades headers Mostrar u ocultar encabezados de filas y columnas.\ndoc = app.active app.msgbox(doc.headers) doc.headers = not doc.headers app.msgbox(doc.headers) doc.headers = not doc.headers tabs Mostrar u ocultar las pestañas de las hojas.\ndoc = app.active app.msgbox(doc.tabs) doc.tabs = not doc.tabs app.msgbox(doc.tabs) doc.tabs = not doc.tabs selection Devolver la selección activa.\ndoc = app.active seleccion = doc.selection app.debug(seleccion) Cuidado, la selección actual pueden ser muchas cosas diferentes.\nnames Devolver una tupla con los nombres de todas las hojas.\ndoc = app.active nombres = doc.names app.debug(nombres) active Devuelve la hoja activa.\ndoc = app.active hoja = doc.active app.debug(hoja) Métodos activate Activar hoja, argumento como objeto.\ndoc = app.active hoja = doc[-1] doc.activate(hoja) Activar hoja por nombre.\ndoc = app.active doc.activate(\u0026#39;Hoja3\u0026#39;) select Seleccionar una celda o rango.\ndoc = app.active cell = doc[0][\u0026#39;A1\u0026#39;] doc.select(cell) NO es necesario seleccionar celdas o rangos para manipularlos.\nstart_range_selection Permitir al usuario seleccionar un rango. Es necesario pasarle una clase con el nombre que prefiera (Eventos es recomendable) con dos métodos para procesar la captura como en el siguiente ejemplo:\nclass Eventos(): def __init__(self, doc): self.doc = doc def range_selection_done(self, range_selection): if range_selection: app.debug(range_selection) self.doc.remove_range_selection_listener() return def range_selection_aborted(self): self.doc.remove_range_selection_listener() return def main(): doc = app.active doc.start_range_selection(Eventos) return insert Inserta una nueva hoja.\ndoc = app.active hoja = doc.insert(\u0026#39;OtraHoja\u0026#39;) Insertar varias hojas. Devolverá la última insertada.\nnombres = (\u0026#39;Enero\u0026#39;, \u0026#39;Febrero\u0026#39;, \u0026#39;Marzo\u0026#39;) hoja = doc.insert(nombres) app.debug(hoja) Creando una nueva instancia y asignandola.\ndoc = app.active doc[\u0026#39;NuevaHoja\u0026#39;] = doc.new_sheet() Si la hoja existe, obtendrá un error, verifique siempre que no exista primero.\nmove Mover hojas.\nPasar la hoja como objeto, de forma predetermianda se mueve a la última posición.\ndoc = app.active hoja = doc[0] doc.move(hoja) Pasar la hoja por nombre.\ndoc = app.active doc.move(\u0026#39;Hoja1\u0026#39;) Especificar la posición destino.\ndoc = app.active hoja = doc[0] doc.move(hoja, 2) remove Eliminar hoja.\ndoc = app.active sheet = doc[0] doc.remove(sheet) Eliminar por nombre.\ndoc.remove(\u0026#39;Hoja2\u0026#39;) copy Copiar hoja dentro del mismo documento.\ndoc = app.active hoja = doc[0] doc.copy_sheet(hoja, \u0026#39;Otra hoja\u0026#39;) Por nombre.\ndoc.copy_sheet(\u0026#39;Hoja1\u0026#39;, \u0026#39;Hoja2\u0026#39;) Si no se establece el nuevo nombre, se generá de forma automática: nombre + índice.\ndoc.copy_sheet(hoja) copy_from Copiar hojas de otro documento. Copiar con el mismo nombre.\ndoc = app.active documento_origen = app.docs[\u0026#39;Contactos.ods\u0026#39;] nombre_origen = \u0026#39;Nombres\u0026#39; doc.copy_from(documento_origen, nombre_origen) Copiar con un nuevo nombre.\ndoc.copy_from(documento_origen, nombre_origen, \u0026#39;NuevoNombre\u0026#39;) Si solo se establece el documento origen, se copian todas las hojas.\ndoc.copy_from(documento_origen) sort Ordenar hojas en orden alfabetico.\ndoc = app.active doc.sort() Ordenar de forma inversa.\ndoc = app.active doc.sort(True) Eventos del documento. Obtener una tupla con los eventos soportados por el documento.\ndoc = app.active nombres = doc.events.names app.debug(nombres) Asignar una macro a un evento. def doc_on_focus(event): app.debug(\u0026#39;Documento activado...\u0026#39;) return def main(): doc = app.active events = doc.events if \u0026#39;OnFocus\u0026#39; in events: macro = {\u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;doc_on_focus\u0026#39;} events[\u0026#39;OnFocus\u0026#39;] = macro return Eliminar la asignación del evento. doc = app.active doc.events[\u0026#39;OnFocus\u0026#39;] = {} O\ndoc = app.active doc.events.remove(\u0026#39;OnFocus\u0026#39;) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/macros/", - "title": "Ejecutar macros", - "tags": [], - "description": "", - "content": "Ejecutar cualquier macro, de forma predeterminada se llaman a las macros en Python localizadas en el perfil de usuario.\nimport easymacro as app def mostrar_info(): app.msgbox(app.INFO_DEBUG) return def main(args=None): macro = { \u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;mostrar_info\u0026#39;, } app.macro.call(macro) return Ejecutar una macro compartida en LibreOffice Macros.\nmacro = { \u0026#39;library\u0026#39;: \u0026#39;HelloWorld\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;HelloWorldPython\u0026#39;, \u0026#39;location\u0026#39;: \u0026#39;share\u0026#39;, } app.macro.call(macro) Ejecutar una macro Basic.\nSub mostrar_info() MsgBox \u0026#34;Mejor usa Python :)\u0026#34; End Sub macro = { \u0026#39;language\u0026#39;: \u0026#39;Basic\u0026#39;, \u0026#39;library\u0026#39;: \u0026#39;Standard\u0026#39;, \u0026#39;module\u0026#39;: \u0026#39;Module1\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;mostrar_info\u0026#39;, } app.macro.call(macro) Cualquier macro se puede ejecutar en otro hilo.\napp.macro.call(macro, True) Más información en: Scripting Framework URI Specification\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/timer/", - "title": "Timer", - "tags": [], - "description": "", - "content": "El timer siempre se ejecuta en otro hilo.\nonce Ejecutar macro una sola vez en X segundos.\nimport easymacro as app NOMBRE = \u0026#39;reloj\u0026#39; def mostrar_hora(): app.debug(app.dates.now_time) return def iniciar_conteo(): segundos = 5 macro = { \u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;mostrar_hora\u0026#39;, } app.timer.once(NOMBRE, segundos, macro) return def main(args=None): iniciar_conteo() return cancel Cancelar ejecución, antes del tiempo establecido.\ndef main(args=None): iniciar_conteo() app.sleep(3) detener_conteo() return def detener_conteo(): app.timer.cancel(NOMBRE) return 16/08/2022 21:18:50 - INFO - Event: \u0026#34;reloj\u0026#34;, started... execute in 60 seconds 16/08/2022 21:18:55 - INFO - Cancel event: \u0026#34;reloj\u0026#34;, ok... start Ejecutar macro cada X segundos.\nNOMBRE = \u0026#39;reloj\u0026#39; def mostrar_hora(): app.debug(app.dates.now_time) return def iniciar_reloj(): segundos = 1 macro = { \u0026#39;library\u0026#39;: \u0026#39;test\u0026#39;, \u0026#39;name\u0026#39;: \u0026#39;mostrar_hora\u0026#39;, } app.timer.start(NOMBRE, segundos, macro) return def main(args=None): iniciar_reloj() return stop Detener timer.\ndef detener_reloj(): app.timer.stop(NOMBRE) return 16/08/2022 21:25:37 - INFO - Timer \u0026#39;reloj\u0026#39; started, execute macro: \u0026#39;mostrar_hora\u0026#39; 16/08/2022 21:25:38 - DEBUG - 21:25:38 16/08/2022 21:25:39 - DEBUG - 21:25:39 ... 16/08/2022 21:25:47 - DEBUG - 21:25:47 16/08/2022 21:25:48 - DEBUG - 21:25:48 16/08/2022 21:25:48 - INFO - Timer stopped... Asegurese siempre de establecer un nombre único para cada timer.\nAsegurese siempre de ejecutar macros que NO bloqueen la interfaz del usuario.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/url/", - "title": "URL", - "tags": [], - "description": "", - "content": "get Método get.\ndef prueba_get(): url = \u0026#39;https://api.ipify.org\u0026#39; respuesta = app.url.get(url) if respuesta.status_code == 200: mi_ip = respuesta.body.decode() app.debug(f\u0026#39;IP: {mi_ip}\u0026#39;) else: app.debug(respuesta.status_code) return 16/08/2022 22:14:13 - DEBUG - IP: 199.203.174.159 Respuestas en formato json.\ndef prueba_get(): url = \u0026#39;https://api.ipify.org/?format=json\u0026#39; respuesta = app.url.get(url) if respuesta.status_code == 200: datos = respuesta.json() app.debug(f\u0026#39;IP: {datos[\u0026#34;ip\u0026#34;]}\u0026#39;) else: app.debug(respuesta.status_code) return " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tools/utils/", - "title": "Utilidades", - "tags": [], - "description": "", - "content": "dict_to_property Convertir diccionarios en PropertyValue\ndatos = { \u0026#39;Hidden\u0026#39;: True, \u0026#39;Password\u0026#39;: \u0026#39;letmein\u0026#39;, } propiedades = app.dict_to_property(datos) app.msgbox(propiedades) data_to_dict Convertir PropertyValue en diccionarios\ndatos = app.data_to_dict(propiedades) app.msgbox(datos) Convertir tuplas a diccionario.\ntupla_de_tuplas = ( (\u0026#39;Hidden\u0026#39;, True), (\u0026#39;Password\u0026#39;, \u0026#39;letmein\u0026#39;), ) datos = app.data_to_dict(tupla_de_tuplas) app.msgbox(datos) Convertir listas a diccionario.\nlista_de_listas = [ [\u0026#39;Hidden\u0026#39;, True], [\u0026#39;Password\u0026#39;, \u0026#39;letmein\u0026#39;], ] datos = app.data_to_dict(lista_de_listas) app.msgbox(datos) sleep Hacer una pausa de X segundos.\napp.sleep(5) render Reemplazar variables en cadenas de texto.\nplantilla = \u0026#34;\u0026#34;\u0026#34;Hola $nombre Te envío este archivo: $archivo Saludos cordiales \u0026#34;\u0026#34;\u0026#34; datos = { \u0026#39;nombre\u0026#39;: \u0026#39;Ingrid Bergman\u0026#39;, \u0026#39;archivo\u0026#39;: \u0026#39;carta_de_amor.odt\u0026#39; } resultado = app.render(plantilla, datos) app.msgbox(resultado) run Ejecutar un programa.\nnombre_aplicacion = \u0026#39;gnome-calculator\u0026#39; app.shell.run(nombre_aplicacion) Ejecutar comandos shell y capturar la salida.\ncomandos = \u0026#39;ls -lh ~\u0026#39; resultado = app.shell.run(comandos, True) app.debug(resultado) drwxr-xr-x 4 mau mau 4.0K Aug 15 23:36 Desktop drwxr-xr-x 6 mau mau 4.0K Jun 9 23:32 Documents drwxr-xr-x 5 mau mau 4.0K Aug 16 13:09 Downloads drwxr-xr-x 3 mau mau 4.0K Aug 14 15:19 Pictures drwxr-xr-x 10 mau mau 4.0K Jun 19 19:36 Projects drwxr-xr-x 2 mau mau 4.0K May 11 22:36 Templates drwxr-xr-x 2 mau mau 4.0K Jul 19 13:37 Videos Ejectuar comandos y capturar la salida línea a línea.\ncomandos = \u0026#39;ls -lh /home/mau\u0026#39; for line in app.shell.popen(comandos): app.debug(line) digest Obtener hash. Por default se regresa en hexadecimal.\ndatos = \u0026#39;LibreOffice con Python\u0026#39; digest = app.hash.digest(\u0026#39;md5\u0026#39;, datos) app.debug(\u0026#39;MD5 = \u0026#39;, digest) digest = app.hash.digest(\u0026#39;sha1\u0026#39;, datos) app.debug(\u0026#39;SHA1 = \u0026#39;, digest) digest = app.hash.digest(\u0026#39;sha256\u0026#39;, datos) app.debug(\u0026#39;SHA256 = \u0026#39;, digest) digest = app.hash.digest(\u0026#39;sha512\u0026#39;, datos) app.debug(\u0026#39;SHA512 = \u0026#39;, digest) 16/08/2022 18:48:07 - DEBUG - MD5 = 3801759ead20abc3ce0d0095289bdcfd 16/08/2022 18:48:07 - DEBUG - SHA1 = 1df74aaae9658c21074aa5a2d4c2055dcf79f0db 16/08/2022 18:48:07 - DEBUG - SHA256 = 228e90b15b6259307e580677939b1f2f45e9317461e98f603af8fcac0f9a598f 16/08/2022 18:48:07 - DEBUG - SHA512 = 3ef45f79f3bfd2b251d250489c91b631306456405510397fb1a7ee37005d196376b7d6ca86a9895f4eb97eb74813965c24d6564a383f4bdb1360665c8fbb192a Para obtener bytes.\ndigest = app.hash.digest(\u0026#39;md5\u0026#39;, datos, False) app.debug(\u0026#39;MD5 = \u0026#39;, digest) 16/08/2022 18:48:07 - DEBUG - MD5 = b\u0026#39;8\\x01u\\x9e\\xad \\xab\\xc3\\xce\\r\\x00\\x95(\\x9b\\xdc\\xfd\u0026#39; config Puede guardar datos de configuración de su macro o extensión dentro del perfil de usuario.\nnombre = \u0026#39;mi_extension\u0026#39; datos = { \u0026#39;ruta\u0026#39;: \u0026#39;/home/mau/pruebas\u0026#39;, \u0026#39;guardar\u0026#39;: True, } if app.config.set(nombre, datos): app.debug(\u0026#39;Configuración guardada...\u0026#39;) Y recuperarlos en cualquier momento.\ndatos = app.config.get(nombre) app.debug(datos) color Puede ver los colores que puede usar en Wikipedia Colores Web\ncolor_nombre = \u0026#39;darkblue\u0026#39; color = app.color(color_nombre) app.debug(color) color_rgb = (125, 200, 10) color = app.color(color_rgb) app.debug(color) color_html = \u0026#39;#008080\u0026#39; color = app.color(color_html) app.debug(color) " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/dialog/", - "title": "Cuadros de diálogo", - "tags": [], - "description": "", - "content": "Trabajar con cuadros de diálogo create Desde archivo Crear un cuadro de diálogo desde un archivo xdl previamente creado desde el editor de cuadros de diálogo dentro de LibreOffice y exportado a un archivo.\ndef crear_cuadro_de_dialogo(): path = \u0026#39;/home/mau/Desktop/Dialog1.xdl\u0026#39; propiedades = {\u0026#39;Path\u0026#39;: path} dialog = app.dialog.create(propiedades) dialog.open() return Desde mis macros Si el cuadro de diálogo esta en la librería Standard.\ndef crear_cuadro_de_dialogo(): propiedades = { \u0026#39;Location\u0026#39;: \u0026#39;user\u0026#39;, \u0026#39;Name\u0026#39;: \u0026#39;Dialog1\u0026#39;, } dialog = app.dialog.create(propiedades) dialog.open() return Si el cuadro de diálogo esta en otra librería.\ndef crear_cuadro_de_dialogo(): propiedades = { \u0026#39;Location\u0026#39;: \u0026#39;user\u0026#39;, \u0026#39;Library\u0026#39;: \u0026#39;MiAplicacion\u0026#39;, \u0026#39;Name\u0026#39;: \u0026#39;Dialog2\u0026#39;, } dialog = app.dialog.create(propiedades) dialog.open() return Si el cuadro de diálogo esta en el documento activo en la librería Standard.\ndef crear_cuadro_de_dialogo(): propiedades = { \u0026#39;Location\u0026#39;: \u0026#39;document\u0026#39;, \u0026#39;Name\u0026#39;: \u0026#39;miApp\u0026#39;, } dialog = app.dialog.create(propiedades) dialog.open() return Crear dinámicamente Crear un cuadro de diálogo vacío.\ndef crear_cuadro_de_dialogo(): dialog = app.dialog.create() dialog.open() return " -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/", - "title": "", - "tags": [], - "description": "", - "content": "Documentación de easymacro! Software Libre, no software gratis. easymacro es una librería para desarrollar más fácilmente macros en LibreOffice con Python. Es una capa de abstracción entre la extensa y compleja API UNO de LibreOffice y tu código.\nProbablemente, será más feliz si la usa :)\nPuede utilizar easymacro con cualquier extensión o directamente en sus macros.\nAportaciones en Junas (G1)\nA5DdXxCKPw3QKWVdDVs7CzkNugNUW1sHu5zDJFWxCU2h Este proyecto esta en continuo desarrollo.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/categories/", - "title": "Categories", - "tags": [], - "description": "", - "content": "" -}, -{ - "uri": "https://doc.cuates.net/easymacro/es/tags/", - "title": "Tags", - "tags": [], - "description": "", - "content": "" -}] \ No newline at end of file diff --git a/doc/public/es/index.xml b/doc/public/es/index.xml deleted file mode 100644 index 255a290..0000000 --- a/doc/public/es/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/ - Recent content on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/installation/index.html b/doc/public/es/installation/index.html deleted file mode 100644 index 3b45895..0000000 --- a/doc/public/es/installation/index.html +++ /dev/null @@ -1,1756 +0,0 @@ - - - - - - - - - - - - Instalación :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Instalación -

- - - - - - -

Clonar repositorio

-

Clone el repositorio en su directorio de proyectos favorito.

-
git clone https://git.cuates.net/elmau/easymacro
-

Muévase al directorio

-
cd easymacro/source
-

copie la carpeta easymacro a la carpeta pythonpath en la carpeta de macros Python dentro de su perfil de usuario. Reemplace USUARIO por su usuario real.

-
/home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath
-

o use un vínculo simbólico. Reemplace RUTA_ABSOLUTA por la ruta absoluta donde se localice easymacro en su sistema de archivos y USUARIO por su nombre de usuario.

-
ln -s `RUTA_ABSOLUTA`/easymacro/source/easymacro /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/pythonpath/
-

Probar

-

En su archivo de macros favorito, por ejemplo mismacros.py. Use su editor de texto plano o IDE favorito.

-
vim /home/`USUARIO`/.config/libreoffice/4/user/Scripts/python/mismacros.py
-

Copie el siguiente código:

-
import easymacro as app
-
-def main():
-    app.msgbox(app.INFO_DEBUG)
-    return
-

Ejecute la macro main desde LibreOffice, si ve un cuadro de mensaje con información similar a la siguiente, !felicidades¡

-

Test instalation

-

Esta todo listo para empezar a desarrollar macros con easymacro.

-

!Feliz programación!

- - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/installation/index.xml b/doc/public/es/installation/index.xml deleted file mode 100644 index 3997991..0000000 --- a/doc/public/es/installation/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Instalación on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/installation/ - Recent content in Instalación on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/installation/install_01.png b/doc/public/es/installation/install_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/public/es/installation/install_01.png and /dev/null differ diff --git a/doc/public/es/sitemap.xml b/doc/public/es/sitemap.xml deleted file mode 100644 index 28dcc1c..0000000 --- a/doc/public/es/sitemap.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - https://doc.cuates.net/easymacro/es/application/shortcuts/ - - https://doc.cuates.net/easymacro/es/calc/sheets/ - - https://doc.cuates.net/easymacro/es/installation/ - - - - - https://doc.cuates.net/easymacro/es/tools/messages/ - - https://doc.cuates.net/easymacro/es/calc/cells/properties/ - - https://doc.cuates.net/easymacro/es/calc/ranges/properties/ - - https://doc.cuates.net/easymacro/es/calc/sheets/properties/ - - https://doc.cuates.net/easymacro/es/documents/properties/ - - https://doc.cuates.net/easymacro/es/calc/ranges/ - - https://doc.cuates.net/easymacro/es/tools/dates_and_time/ - - https://doc.cuates.net/easymacro/es/tools_debug/ - - - - https://doc.cuates.net/easymacro/es/application/menus/ - - https://doc.cuates.net/easymacro/es/calc/cells/methods/ - - https://doc.cuates.net/easymacro/es/calc/ranges/methods/ - - https://doc.cuates.net/easymacro/es/calc/sheets/methods/ - - https://doc.cuates.net/easymacro/es/documents/methods/ - - https://doc.cuates.net/easymacro/es/tools/paths/ - - https://doc.cuates.net/easymacro/es/calc/cells/ - - https://doc.cuates.net/easymacro/es/tools/email/ - - https://doc.cuates.net/easymacro/es/calc/sheets/events/ - - https://doc.cuates.net/easymacro/es/tools/ - - https://doc.cuates.net/easymacro/es/application/ - - https://doc.cuates.net/easymacro/es/documents/ - - https://doc.cuates.net/easymacro/es/tools/threads/ - - https://doc.cuates.net/easymacro/es/calc/ - - https://doc.cuates.net/easymacro/es/tools/macros/ - - https://doc.cuates.net/easymacro/es/tools/timer/ - - https://doc.cuates.net/easymacro/es/tools/url/ - - https://doc.cuates.net/easymacro/es/tools/utils/ - - https://doc.cuates.net/easymacro/es/dialog/ - - https://doc.cuates.net/easymacro/es/ - 0 - - - - - - https://doc.cuates.net/easymacro/es/categories/ - - - - - - https://doc.cuates.net/easymacro/es/tags/ - - - - - - diff --git a/doc/public/es/tags/index.html b/doc/public/es/tags/index.html deleted file mode 100644 index e006d0c..0000000 --- a/doc/public/es/tags/index.html +++ /dev/null @@ -1,1746 +0,0 @@ - - - - - - - - - - - - Tags :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - tag :: - - Tags -

- - - - - - - - -
    - -
- - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tags/index.xml b/doc/public/es/tags/index.xml deleted file mode 100644 index a94ac6d..0000000 --- a/doc/public/es/tags/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Tags on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tags/ - Recent content in Tags on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/dates_and_time/index.html b/doc/public/es/tools/dates_and_time/index.html deleted file mode 100644 index 23f75b4..0000000 --- a/doc/public/es/tools/dates_and_time/index.html +++ /dev/null @@ -1,1805 +0,0 @@ - - - - - - - - - - - - Fechas y tiempo :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Fechas y tiempo -

- - - - - - - -

La fecha inicial en Calc y en Python es diferente.

-
- -

today

-

Obtener la fecha de hoy.

-
d = app.dates
-app.msgbox(d.today)
-

now

-

Obtener la fecha y hora actuales.

-
d = app.dates
-app.msgbox(d.now)
-

time

-

Obtener la hora actual.

-
d = app.dates
-app.msgbox(d.now.time())
-

epoch

-

Obtener el tiempo Unix

-
d = app.dates
-app.msgbox(d.epoch)
-

date

-

Devolver una fecha

-
d = app.dates
-
-date = d.date(1974, 1, 15)
-app.msgbox(date)
-

time

-

Devolver un tiempo

-
d = app.dates
-
-time = d.time(10, 20, 15)
-app.msgbox(time)
-

datetime

-

Devolver fecha y hora

-
d = app.dates
-
-dt = d.datetime(1974, 1, 15, 10, 11, 12)
-app.msgbox(dt)
-

str_to_date

-

Convertir una cadena en fecha. Mira este excelente recurso

-
d = app.dates
-
-cadena = '1974-01-15'
-plantilla = '%Y-%m-%d'
-fecha = d.str_to_date(cadena, plantilla)
-app.msgbox(fecha)
-app.msgbox(type(fecha))
-

Para obtener un valor válido para establecer en una celda de Calc.

-
d = app.dates
-
-cadena = '1974-01-15'
-plantilla = '%Y-%m-%d'
-fecha = d.str_to_date(cadena, plantilla, True)
-app.msgbox(fecha)
-app.msgbox(type(fecha))
-

calc_to_date

-

Convierte el valor de una celda en una fecha Python, por ejemplo, la fecha inicial configurada en Calc.

-
d = app.dates
-
-value_from_cell = 1
-fecha = d.calc_to_date(value_from_cell)
-app.msgbox(fecha)
-app.msgbox(type(fecha))
-

start y end

-

Medir tiempo en segundos.

-
d = app.dates
-
-d.start()
-app.sleep(5)
-seconds = d.end()
-app.msgbox(seconds)
-

Regresar timedelta en vez de segundos.

-
d = app.dates
-
-d.start()
-app.sleep(5)
-td = d.end(False)
-app.msgbox(td)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/dates_and_time/index.xml b/doc/public/es/tools/dates_and_time/index.xml deleted file mode 100644 index 96593af..0000000 --- a/doc/public/es/tools/dates_and_time/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Fechas y tiempo on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/dates_and_time/ - Recent content in Fechas y tiempo on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/email/index.html b/doc/public/es/tools/email/index.html deleted file mode 100644 index 8551fef..0000000 --- a/doc/public/es/tools/email/index.html +++ /dev/null @@ -1,1796 +0,0 @@ - - - - - - - - - - - - Correo electrónico :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Correo electrónico -

- - - - - - -

Enviar correo electrónico.

- -

Siempre guarda las contraseñas de la forma más segura posible.

-
- -

send

-

Enviar un correo electrónico.

-
from conf import PASSWORD
-
-SERVER = dict(
-    server = 'mail.correo.net' ,
-    port = 405,
-    ssl = True,
-    user = 'no-responder@pruebas.mx',
-    password = PASSWORD,
-)
-
-body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales"
-
-message = dict(
-    to = 'ingrid@bergman.mx',
-    subject = 'Te amo...',
-    body = body,
-)
-
-app.email.send(SERVER, message)
-

Puede usar los campos cc (Con Copia) y bcc (Con Copia Oculta), así como separar por comas las direcciones destino para enviar a más de un correo.

-
to = 'mail1@correo.com,mail2@correo.com,mail3@correo.com'
-cc = 'otro@correo.com'
-bcc = 'oculto@correo.com'
-

Podemos enviar más de un mensaje.

-
mensaje1 = dict(
-    to = 'ingrid@correo.net',
-    subject = 'Te amo...',
-    body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales",
-)
-mensaje2 = dict(
-    to = 'sophia@correo.net',
-    subject = 'A ti también...',
-    body = "Hola Sophia\n\n¿Como estas?\n\nSaludos cordiales",
-)
-mensajes = (mensaje1, mensaje2)
-
-app.email.send(SERVER, mensajes)
-
16/08/2022 13:01:49 - DEBUG - Connect to: mail.server.net
-16/08/2022 13:01:50 - DEBUG - Email sent...
-16/08/2022 13:01:51 - DEBUG - Email sent...
-16/08/2022 13:01:51 - DEBUG - Close connection...
-

Enviar un archivo adjunto.

-
archivo = '/home/mau/temp.txt'
-mensaje = dict(
-    to = 'ingrid@bergman.mx',
-    subject = 'Te amo...',
-    body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales",
-    files = archivo,
-)
-
-app.email.send(SERVER, mensaje)
-

O varios.

-
archivos = (
-    '/home/mau/temp.txt',
-    '/home/mau/datos.csv',
-)
-

Si tu cliente de correo usa el formato mbox, puede guardar los correos enviados en una carpeta dentro de la configuración de su cliente de correo.

-
ruta = '/home/mau/.thunderbird/7iznrbyw.default/Mail/Local Folders/LibreOffice'
-mensaje = dict(
-    to = 'ingrid@bergman.mx',
-    subject = 'Te amo...',
-    body = "Hola Ingrid\n\n¿Como estas?\n\nSaludos cordiales",
-    path = ruta,
-)
-
-app.email.send(SERVER, mensaje)
-
-

Todos los correos se envían siempre en otro hilo de ejecución.

-
- - - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/email/index.xml b/doc/public/es/tools/email/index.xml deleted file mode 100644 index e68463e..0000000 --- a/doc/public/es/tools/email/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Correo electrónico on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/email/ - Recent content in Correo electrónico on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/index.html b/doc/public/es/tools/index.html deleted file mode 100644 index 85c23a1..0000000 --- a/doc/public/es/tools/index.html +++ /dev/null @@ -1,1752 +0,0 @@ - - - - - - - - - - - - Herramientas :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Herramientas -

- - - - - - -

Recuerda, es necesario importar la librería.

-
import easymacro as app
-

Información sobre la PC

-

OS

-

Obtener el sistema operativo.

-
app.msgbox(app.OS)
-

DESKTOP

-

Obtener el tipo de escritorio, solo en GNU/Linux.

-
app.msgbox(app.DESKTOP)
-

PC

-

Obtener el nombre de la computadora.

-
app.msgbox(app.PC)
-

USER

-

Obtener el nombre de usuario.

-
app.msgbox(app.USER)
-

IS_WIN

-

Saber si estamos en Windows.

-
app.msgbox(app.IS_WIN)
-

IS_MAC

-

Saber si estamos en OSX.

-
app.msgbox(app.IS_MAC)
-

Información sobre LibreOffice

-

NAME

-

Nombre de la aplicación.

-
app.msgbox(app.NAME)
-

VERSION

-

Versión de la aplicación.

-
app.msgbox(app.VERSION)
-

LANG

-

Lenguaje de la aplicación.

-
app.msgbox(app.LANG)
-

LANGUAGE

-

Lenguaje con variante.

-
app.msgbox(app.LANGUAGE)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/index.xml b/doc/public/es/tools/index.xml deleted file mode 100644 index c5e10ff..0000000 --- a/doc/public/es/tools/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Herramientas on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/ - Recent content in Herramientas on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/macros/index.html b/doc/public/es/tools/macros/index.html deleted file mode 100644 index d6bb3a3..0000000 --- a/doc/public/es/tools/macros/index.html +++ /dev/null @@ -1,1747 +0,0 @@ - - - - - - - - - - - - Ejecutar macros :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Ejecutar macros -

- - - - - - -

Ejecutar cualquier macro, de forma predeterminada se llaman a las macros en Python localizadas en el perfil de usuario.

-
import easymacro as app
-
-
-def mostrar_info():
-    app.msgbox(app.INFO_DEBUG)
-    return
-
-
-def main(args=None):
-    macro = {
-        'library': 'test',
-        'name': 'mostrar_info',
-    }
-    app.macro.call(macro)
-    return
-

Ejecutar una macro compartida en LibreOffice Macros.

-
macro = {
-    'library': 'HelloWorld',
-    'name': 'HelloWorldPython',
-    'location': 'share',
-}
-app.macro.call(macro)
-

Ejecutar una macro Basic.

-
Sub mostrar_info()
-    MsgBox "Mejor usa Python :)"
-End Sub
-
macro = {
-    'language': 'Basic',
-    'library': 'Standard',
-    'module': 'Module1',
-    'name': 'mostrar_info',
-}
-app.macro.call(macro)
-

Cualquier macro se puede ejecutar en otro hilo.

-
app.macro.call(macro, True)
-

Más información en: Scripting Framework URI Specification

- - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/macros/index.xml b/doc/public/es/tools/macros/index.xml deleted file mode 100644 index 8b3be1a..0000000 --- a/doc/public/es/tools/macros/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Ejecutar macros on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/macros/ - Recent content in Ejecutar macros on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/messages/index.html b/doc/public/es/tools/messages/index.html deleted file mode 100644 index 2dd80ca..0000000 --- a/doc/public/es/tools/messages/index.html +++ /dev/null @@ -1,1752 +0,0 @@ - - - - - - - - - - - - Mensajes :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Mensajes -

- - - - - - -

Cuadros de mensaje

-

msgbox

-

Mostrar mensaje estandar.

-
mensaje = 'Maldito Mundo'
-titulo = 'Mi Macro'
-app.msgbox(mensaje, titulo)
-

warning

-

Mostrar mensaje con icono de advertencia.

-
mensaje = 'Cuidado, esta acción es peligrosa'
-titulo = 'Mi Macro'
-app.warning(mensaje, titulo)
-

errorbox

-

Mostrar mensaje con icono de error.

-
mensaje = 'ERROR: contacte a soporte'
-titulo = 'Mi Macro'
-app.errorbox(mensaje, titulo)
-

question

-

Hacer una pregunta mostrando el icono de interrogación y mostrando los botones de comando Si y No. La respuesta siempre es verdadera (True) si el usuario selecciona si y falsa (False) en caso contrario.

-
mensaje = '¿Es fácil Python?'
-titulo = 'Mi Macro'
-resultado = app.question(mensaje, titulo)
-app.msgbox(resultado)
-

inputbox

-

Muestra un mensaje al usuario, permitiendo capturar una respuesta.

-
mensaje = 'Escribe tu nombre'
-nombre = app.inputbox(mensaje)
-app.msgbox(nombre)
-

Para ocultar solo en pantalla lo que captura el usuario, como contraseñas.

-
mensaje = 'Captura la contraseña'
-echochar = '*'
-contraseña = app.inputbox(mensaje, echochar=echochar)
-app.msgbox(contraseña)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/messages/index.xml b/doc/public/es/tools/messages/index.xml deleted file mode 100644 index 572ede1..0000000 --- a/doc/public/es/tools/messages/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Mensajes on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/messages/ - Recent content in Mensajes on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/paths/index.html b/doc/public/es/tools/paths/index.html deleted file mode 100644 index e7fc810..0000000 --- a/doc/public/es/tools/paths/index.html +++ /dev/null @@ -1,2048 +0,0 @@ - - - - - - - - - - - - Rutas y archivos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - - - - -
-
- -
- -
- -
- -

- - Rutas y archivos -

- - - - - - -

Trabajar con rutas y archivos.

-

path

-

Obtener información de una ruta.

-
ruta_archivo = '/home/mau/mi_archivo.ods'
-p = app.paths(ruta_archivo)
-
-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)
-
15/08/2022 14:40:08 - DEBUG - /home/mau
-15/08/2022 14:40:08 - DEBUG - mi_archivo.ods
-15/08/2022 14:40:08 - DEBUG - mi_archivo
-15/08/2022 14:40:08 - DEBUG - ods
-15/08/2022 14:40:08 - DEBUG - 7011
-15/08/2022 14:40:08 - DEBUG - file:///home/mau/mi_archivo.ods
-

Obtener la misma información como un tupla.

-
ruta_archivo = '/home/mau/mi_archivo.ods'
-p = app.paths(ruta_archivo)
-app.debug(p.info)
-
15/08/2022 14:43:01 - DEBUG - ('/home/mau', 'mi_archivo.ods', 'mi_archivo', 'ods', 7011, 'file:///home/mau/mi_archivo.ods')
-

O como diccionario.

-
ruta_archivo = '/home/mau/mi_archivo.ods'
-p = app.paths(ruta_archivo)
-app.debug(p.dict)
-
15/08/2022 14:43:01 - DEBUG - {'path': '/home/mau', 'file_name': 'mi_archivo.ods', 'name': 'mi_archivo', 'ext': 'ods', 'size': 7011, 'url': 'file:///home/mau/mi_archivo.ods'}
-

home

-

Obtener la carpeta de inicio del usuario.

-
p = app.paths
-app.debug(p.home)
-

documents

-

Obtener la carpeta Documentos del usuario.

-
p = app.paths
-app.debug(p.documents)
-

user_profile

-

Obtener la ruta del perfil de usuario.

-
p = app.paths
-app.debug(p.user_profile)
-

user_config

-

Obtener la ruta de la carpeta config en el perfil de usuario.

-
p = app.paths
-app.debug(p.user_config)
-

python

-

Obtener la ruta del ejecutable python

-
p = app.paths
-app.debug(p.python)
-

to_system

-

Pasar una ruta en formato URL al formato del sistema de archivos del SO.

-
p = app.paths
-ruta_url = 'file:///home/mau/mi_archivo.ods'
-ruta = p.to_system(ruta_url)
-app.debug(ruta)
-

to_url

-

Pasar una ruta del sistema de archivos del SO al formato URL.

-
p = app.paths
-ruta = '/home/mau/mi_archivo.ods'
-ruta_url = p.to_url(ruta)
-app.debug(ruta_url)
-

config

-

Obtener rutas de la configuración de LibreOffice. Por default obtiene la ruta de Documentos, para otras ruta mire Api XPathSettings

-
p = app.paths
-ruta = p.config()
-app.debug(ruta)
-
-ruta = p.config('UserConfig')
-app.debug(ruta)
-
-

Algunas rutas pueden ser más de una, separados por ;, en este caso, el resultado es una lista con las rutas.

-
- -

join

-

Concatenar rutas.

-
p = app.paths
-ruta = p.join('/home/mau', 'pruebas', 'archivo.ods')
-app.debug(ruta)
-

exists

-

Verificar si una ruta existe.

-
p = app.paths
-resultado = p.exists('/home/mau/test/archivo.ods')
-app.debug(resultado)
-

exists_app

-

Verificar si una aplicación existe.

-
p = app.paths
-
-resultado = p.exists_app('noexiste')
-app.debug(resultado)
-
-resultado = p.exists_app('soffice')
-app.debug(resultado)
-

is_dir

-

Verificar si la ruta es un directorio.

-
p = app.paths
-resultado = p.is_dir('/home/mau')
-app.debug(resultado)
-

is_file

-

Verificar si la ruta es un archivo.

-
p = app.paths
-resultado = p.is_file('/home/mau/mi_archivo.ods')
-app.debug(resultado)
-

temp_file

-

Crear un archivo temporal, es borrado automáticamente al cerrarse.

-
p = app.paths
-
-f = p.temp_file()
-f.write(app.INFO_DEBUG)
-f.close()
-

Usado en contexto, se cierra automáticamente.

-
with p.temp_file() as f:
-    app.debug(f.name)
-    f.write('test')
-

temp_dir

-

Crear un directorio temporal, al salir del contexto, es eliminado junto con todo su contenido del sistema de archivos.

-
p = app.paths
-
-with p.temp_dir() as d:
-    app.debug(p.exists(d))
-    app.debug(d)
-
-app.debug(p.exists(d))
-

get

-

Permitir al usuario seleccionar archivos, devuelve solo la ruta. De forma predeterminada abre en la carpeta Documentos.

-
p = app.paths
-ruta = p.get()
-app.debug(ruta)
-

Establecer que abra en otro directorio.

-
ruta = p.get('/tmp')
-app.debug(ruta)
-

Agregar un filtro.

-
ruta = p.get(filters='ods')
-app.debug(ruta)
-

Agregar multiples filtros.

-
ruta = p.get(filters='xml,txt')
-app.debug(ruta)
-

Permitir selecciones multiples.

-
ruta = p.get(filters='xml,txt', multiple=True)
-app.debug(ruta)
-

get_dir

-

Permitir al usuario seleccionar un directorio, devuelve solo la ruta. De forma predeterminada abre en la carpeta Documentos.

-
p = app.paths
-ruta = p.get_dir()
-app.debug(ruta)
-

Establecer que abra en otro directorio.

-
ruta = p.get_dir('/tmp')
-app.debug(ruta)
-

get_for_save

-

Permitir seleccionar un directorio y capturar el nombre del archivo, devuelve la ruta completa.

-
p = app.paths
-ruta = p.get_for_save()
-app.debug(ruta)
-

Establecer que inicie en otro directorio.

-
ruta = p.get_for_save('/tmp')
-app.debug(ruta)
-

Si se establece un filtro, automáticamente se agrega la extensión.

-
ruta = p.get_for_save(filters='txt')
-app.debug(ruta)
-

files

-

Obtener archivos de una ruta, no recursivamente. De forma predeterminada regresa todos, incluyendo archivos ocultos.

-
ruta = '/home/mau'
-
-p = app.paths
-archivos = p.files(ruta)
-for a in archivos:
-    app.debug(a)
-

Filtrar por tipo de archivo.

-
p = app.paths
-archivos = p.files(ruta, '*.pdf')
-

Obtener archivos de forma recursiva.

-
p = app.paths
-archivos = p.files(ruta, '**/*.xml')
-

walk

-

Obtener archivos de forma recursiva.

-
p = app.paths
-ruta = '/home/mau/Documents'
-archivos = p.walk(ruta)
-for a in archivos:
-    app.debug(a)
-

Con filtro.

-
archivos = p.walk(ruta, 'ods')
-

Con filtros.

-
archivos = p.walk(ruta, 'ods|odt')
-

dirs

-

Obtener los directorios de una ruta, no recursivamente.

-
p = app.paths
-ruta = '/home/mau/Documents'
-folders = p.dirs(ruta)
-for f in folders:
-    app.debug(f)
-

walk_dirs

-

Obtener los directorios de una ruta, no recursivamente.

-
p = app.paths
-ruta = '/home/mau/Documents'
-folders = p.walk_dirs(ruta)
-for f in folders:
-    app.debug(f)
-

Obtener información en una lista de tuplas: (ID_FOLDER, ID_PADRE, NOMBRE)

-
folders = p.walk_dirs(ruta, True)
-

extension

-

Obtener la ruta de instalación de una extensión a partir de su ID.

-
p = app.paths
-id_ext = 'net.elmau.zaz.talk'
-ruta = p.extension(id_ext)
-app.debug(ruta)
-

replace_ext

-

Reemplazar extensión de un archivo.

-
p = app.paths
-ruta = '/home/mau/mi_archivo.ods'
-ruta_nueva = p.replace_ext(ruta, 'pdf')
-app.debug(ruta_nueva)
-

open

-

Abrir cualquier archivo con el programas predeterminado del SO.

-
p = app.paths
-ruta = '/home/mau/archivo.pdf'
-p.open(ruta)
-
-ruta = '/home/mau/index.html'
-p.open(ruta)
-

save y read

-

Guardar y leer datos, el encoding predeterminado es UTF8.

-
p = app.paths
-datos = """¿Quieres saber quién eres? No preguntes. Actúa.
-La acción te delineará y definirá.
-
-Thomas Jefferson
-"""
-
-ruta = '/home/mau/temp.txt'
-p.save(ruta, datos)
-
-datos = p.read(ruta)
-app.msgbox(datos)
-

Cambiar el encoding.

-
app.paths.save(ruta, datos, 'iso-8859-1')
-

save_bin y read_bin

-

Guardar y leer datos binarios.

-
p = app.paths
-datos = b'Datos binarios'
-
-ruta = '/home/mau/temp.bin'
-p.save_bin(ruta, datos)
-
-datos = p.read_bin(ruta)
-app.msgbox(datos)
-

save_json y read_json

-

Guardar y leer en formato json.

-
p = app.paths
-
-ruta = '/home/mau/datos.json'
-datos = {
-    'tipo': 'calc',
-    'nombre': 'miarchivo.ods',
-}
-p.save_json(ruta, datos)
-
-datos = p.read_json(ruta)
-app.msgbox(datos)
-

save_csv y read_csv

-

Exportar e importar datos en formato CSV. Vea la documentación CSV para los argumentos que puede usar.

-
p = app.paths
-
-ruta = '/home/mau/datos.csv'
-ahora = app.dates.now
-datos = (
-    (1, 'uno', ahora),
-    (2, 'dos', ahora),
-    (3, 'tres', ahora),
-)
-p.save_csv(ruta, datos)
-
-datos = p.read_csv(ruta)
-app.msgbox(datos)
-

kill

-

Borra archivos o directorios con todo su contenido. Devuelve verdadero (True) en caso de exito y falso (Falso) en cualquier otro caso.

- -

Este proceso es destructivo, es buena practica siempre solicitar confirmación al usuario.

-
- -
p = app.paths
-
-ruta = '/home/mau/temp.bin'
-resultado = p.kill(ruta)
-app.msgbox(resultado)
-

copy

-

Copiar archivos. Devuelve la ruta completa final destino.

-

De un origen a una carpeta destino

-
p = app.paths
-
-ruta_origen = '/home/mau/temp.txt'
-ruta_destino = '/home/mau/Desktop'
-ruta = p.copy(ruta_origen, ruta_destino)
-app.debug(ruta)
-

Cambiar el nombre destino.

-
ruta_origen = '/home/mau/temp.txt'
-ruta_destino = '/home/mau/Desktop'
-nuevo_nombre = 'datos.csv'
-ruta = p.copy(ruta_origen, ruta_destino, nuevo_nombre)
-app.debug(ruta)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/paths/index.xml b/doc/public/es/tools/paths/index.xml deleted file mode 100644 index 75f6ead..0000000 --- a/doc/public/es/tools/paths/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Rutas y archivos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/paths/ - Recent content in Rutas y archivos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/threads/index.html b/doc/public/es/tools/threads/index.html deleted file mode 100644 index 1ec540c..0000000 --- a/doc/public/es/tools/threads/index.html +++ /dev/null @@ -1,1752 +0,0 @@ - - - - - - - - - - - - Hilos :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Hilos -

- - - - - - -

Ejecutar macros en otros hilos.

-

Las macros se ejecutan en un hilo que bloquea cualquier otro proceso dentro de la aplicación.

-

Si ejecutas la siguiente macro main, nota que no puedes hacer algo más dentro de LibreOffice durante los 5 segundos que dura el proceso.

-
import easymacro as app
-
-
-def hacer_pausa(segundos):
-    app.sleep(segundos)
-    app.debug('He terminado')
-    return
-
-def main():
-    hacer_pausa(5)
-    app.msgbox('Fin...')
-    return
-

Hasta que aparece el cuadro de mensaje con la palabra Fin y lo cierras, el usuario puede seguir usando la aplicación.

-

run_in_thread

-

Ahora ejecutamos la macro en otro hilo, “decorando” cualquier macro con run_in_thread

-
@app.run_in_thread
-def hacer_pausa(segundos):
-    app.sleep(segundos)
-    app.debug('He terminado')
-    return
-
-def main():
-    hacer_pausa(5)
-    app.msgbox('Fin...')
-    return
-

Nota que ahora el mensaje aparece inmediatamente y no tras los 5 segundos.

- -

Ponga mucha atención en no ejecutar macros en otros hilo que dependen de algo suceptible de ser cambiado o interceptado por el usuario, por ejemplo, la celda activa.

-
- - - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/threads/index.xml b/doc/public/es/tools/threads/index.xml deleted file mode 100644 index 33bffd1..0000000 --- a/doc/public/es/tools/threads/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Hilos on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/threads/ - Recent content in Hilos on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/timer/index.html b/doc/public/es/tools/timer/index.html deleted file mode 100644 index b90be24..0000000 --- a/doc/public/es/tools/timer/index.html +++ /dev/null @@ -1,1803 +0,0 @@ - - - - - - - - - - - - Timer :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Timer -

- - - - - - -

El timer siempre se ejecuta en otro hilo.

-

once

-

Ejecutar macro una sola vez en X segundos.

-
import easymacro as app
-
-
-NOMBRE = 'reloj'
-
-
-def mostrar_hora():
-    app.debug(app.dates.now_time)
-    return
-
-
-def iniciar_conteo():
-    segundos = 5
-    macro = {
-        'library': 'test',
-        'name': 'mostrar_hora',
-    }
-    app.timer.once(NOMBRE, segundos, macro)
-    return
-
-
-def main(args=None):
-    iniciar_conteo()
-    return
-

cancel

-

Cancelar ejecución, antes del tiempo establecido.

-
def main(args=None):
-    iniciar_conteo()
-    app.sleep(3)
-    detener_conteo()
-    return
-
-def detener_conteo():
-    app.timer.cancel(NOMBRE)
-    return
-
16/08/2022 21:18:50 - INFO - Event: "reloj", started... execute in 60 seconds
-16/08/2022 21:18:55 - INFO - Cancel event: "reloj", ok...
-

start

-

Ejecutar macro cada X segundos.

-
NOMBRE = 'reloj'
-
-
-def mostrar_hora():
-    app.debug(app.dates.now_time)
-    return
-
-
-def iniciar_reloj():
-    segundos = 1
-    macro = {
-        'library': 'test',
-        'name': 'mostrar_hora',
-    }
-    app.timer.start(NOMBRE, segundos, macro)
-    return
-
-def main(args=None):
-    iniciar_reloj()
-    return
-

stop

-

Detener timer.

-
def detener_reloj():
-    app.timer.stop(NOMBRE)
-    return
-
16/08/2022 21:25:37 - INFO - Timer 'reloj' started, execute macro: 'mostrar_hora'
-16/08/2022 21:25:38 - DEBUG - 21:25:38
-16/08/2022 21:25:39 - DEBUG - 21:25:39
-...
-16/08/2022 21:25:47 - DEBUG - 21:25:47
-16/08/2022 21:25:48 - DEBUG - 21:25:48
-16/08/2022 21:25:48 - INFO -    Timer stopped...
-
-

Asegurese siempre de establecer un nombre único para cada timer.

-
- - -

Asegurese siempre de ejecutar macros que NO bloqueen la interfaz del usuario.

-
- - - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/timer/index.xml b/doc/public/es/tools/timer/index.xml deleted file mode 100644 index da632cc..0000000 --- a/doc/public/es/tools/timer/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Timer on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/timer/ - Recent content in Timer on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/tools_01.png b/doc/public/es/tools/tools_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/public/es/tools/tools_01.png and /dev/null differ diff --git a/doc/public/es/tools/url/index.html b/doc/public/es/tools/url/index.html deleted file mode 100644 index 7a64054..0000000 --- a/doc/public/es/tools/url/index.html +++ /dev/null @@ -1,1744 +0,0 @@ - - - - - - - - - - - - URL :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - URL -

- - - - - - -

get

-

Método get.

-
def prueba_get():
-
-    url = 'https://api.ipify.org'
-    respuesta = app.url.get(url)
-    if respuesta.status_code == 200:
-        mi_ip = respuesta.body.decode()
-        app.debug(f'IP: {mi_ip}')
-    else:
-        app.debug(respuesta.status_code)
-
-    return
-
16/08/2022 22:14:13 - DEBUG - IP: 199.203.174.159
-

Respuestas en formato json.

-
def prueba_get():
-
-    url = 'https://api.ipify.org/?format=json'
-    respuesta = app.url.get(url)
-    if respuesta.status_code == 200:
-        datos = respuesta.json()
-        app.debug(f'IP: {datos["ip"]}')
-    else:
-        app.debug(respuesta.status_code)
-
-    return
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/url/index.xml b/doc/public/es/tools/url/index.xml deleted file mode 100644 index 09585f0..0000000 --- a/doc/public/es/tools/url/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - URL on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/url/ - Recent content in URL on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools/utils/index.html b/doc/public/es/tools/utils/index.html deleted file mode 100644 index 741aa57..0000000 --- a/doc/public/es/tools/utils/index.html +++ /dev/null @@ -1,1840 +0,0 @@ - - - - - - - - - - - - Utilidades :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Utilidades -

- - - - - - -

dict_to_property

-

Convertir diccionarios en PropertyValue

-
datos = {
-    'Hidden': True,
-    'Password': 'letmein',
-}
-propiedades = app.dict_to_property(datos)
-
-app.msgbox(propiedades)
-

data_to_dict

-

Convertir PropertyValue en diccionarios

-
datos = app.data_to_dict(propiedades)
-app.msgbox(datos)
-

Convertir tuplas a diccionario.

-
tupla_de_tuplas = (
-    ('Hidden', True),
-    ('Password', 'letmein'),
-)
-datos = app.data_to_dict(tupla_de_tuplas)
-app.msgbox(datos)
-

Convertir listas a diccionario.

-
lista_de_listas = [
-    ['Hidden', True],
-    ['Password', 'letmein'],
-]
-datos = app.data_to_dict(lista_de_listas)
-app.msgbox(datos)
-

sleep

-

Hacer una pausa de X segundos.

-
app.sleep(5)
-

render

-

Reemplazar variables en cadenas de texto.

-
plantilla = """Hola $nombre
-
-Te envío este archivo: $archivo
-
-Saludos cordiales
-"""
-
-datos = {
-    'nombre': 'Ingrid Bergman',
-    'archivo': 'carta_de_amor.odt'
-}
-
-resultado = app.render(plantilla, datos)
-
-app.msgbox(resultado)
-

run

-

Ejecutar un programa.

-
nombre_aplicacion = 'gnome-calculator'
-app.shell.run(nombre_aplicacion)
-

Ejecutar comandos shell y capturar la salida.

-
comandos = 'ls -lh ~'
-resultado = app.shell.run(comandos, True)
-app.debug(resultado)
-
drwxr-xr-x  4 mau mau 4.0K Aug 15 23:36 Desktop
-drwxr-xr-x  6 mau mau 4.0K Jun  9 23:32 Documents
-drwxr-xr-x  5 mau mau 4.0K Aug 16 13:09 Downloads
-drwxr-xr-x  3 mau mau 4.0K Aug 14 15:19 Pictures
-drwxr-xr-x 10 mau mau 4.0K Jun 19 19:36 Projects
-drwxr-xr-x  2 mau mau 4.0K May 11 22:36 Templates
-drwxr-xr-x  2 mau mau 4.0K Jul 19 13:37 Videos
-

Ejectuar comandos y capturar la salida línea a línea.

-
comandos = 'ls -lh /home/mau'
-for line in app.shell.popen(comandos):
-    app.debug(line)
-

digest

-

Obtener hash. Por default se regresa en hexadecimal.

-
    datos = 'LibreOffice con Python'
-
-    digest = app.hash.digest('md5', datos)
-    app.debug('MD5 = ', digest)
-
-    digest = app.hash.digest('sha1', datos)
-    app.debug('SHA1 = ', digest)
-
-    digest = app.hash.digest('sha256', datos)
-    app.debug('SHA256 = ', digest)
-
-    digest = app.hash.digest('sha512', datos)
-    app.debug('SHA512 = ', digest)
-
16/08/2022 18:48:07 - DEBUG - MD5 =     3801759ead20abc3ce0d0095289bdcfd
-16/08/2022 18:48:07 - DEBUG - SHA1 =    1df74aaae9658c21074aa5a2d4c2055dcf79f0db
-16/08/2022 18:48:07 - DEBUG - SHA256 =  228e90b15b6259307e580677939b1f2f45e9317461e98f603af8fcac0f9a598f
-16/08/2022 18:48:07 - DEBUG - SHA512 =  3ef45f79f3bfd2b251d250489c91b631306456405510397fb1a7ee37005d196376b7d6ca86a9895f4eb97eb74813965c24d6564a383f4bdb1360665c8fbb192a
-

Para obtener bytes.

-
digest = app.hash.digest('md5', datos, False)
-app.debug('MD5 = ', digest)
-
16/08/2022 18:48:07 - DEBUG - MD5 =     b'8\x01u\x9e\xad \xab\xc3\xce\r\x00\x95(\x9b\xdc\xfd'
-

config

-

Puede guardar datos de configuración de su macro o extensión dentro del perfil de usuario.

-
nombre = 'mi_extension'
-datos = {
-    'ruta': '/home/mau/pruebas',
-    'guardar': True,
-}
-
-if app.config.set(nombre, datos):
-    app.debug('Configuración guardada...')
-

Y recuperarlos en cualquier momento.

-
datos = app.config.get(nombre)
-app.debug(datos)
-

color

-

Puede ver los colores que puede usar en Wikipedia Colores Web

-
color_nombre = 'darkblue'
-color = app.color(color_nombre)
-app.debug(color)
-
-color_rgb = (125, 200, 10)
-color = app.color(color_rgb)
-app.debug(color)
-
-color_html = '#008080'
-color = app.color(color_html)
-app.debug(color)
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools/utils/index.xml b/doc/public/es/tools/utils/index.xml deleted file mode 100644 index 144e8a6..0000000 --- a/doc/public/es/tools/utils/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Utilidades on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools/utils/ - Recent content in Utilidades on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools_debug/index.html b/doc/public/es/tools_debug/index.html deleted file mode 100644 index 283bbdc..0000000 --- a/doc/public/es/tools_debug/index.html +++ /dev/null @@ -1,1835 +0,0 @@ - - - - - - - - - - - - Herramientas para depurar :: Documentación para EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Herramientas para depurar -

- - - - - - -

INFO_DEBUG

-

Mostrar información de depuración en un cuadro de mensaje.

-

Si tiene cualquier problema en su código durante el desarrollo de sus macros, puede abrir un ticket de soporte en el sistema de ticket de este proyecto. Siempre copie la información de depuración mostrada en este mensaje.

-
import easymacro as app
-
-def info():
-    app.msgbox(app.INFO_DEBUG)
-    return
-

Info debug

-

debug

-

Mostrar información en la terminal.

-
import easymacro as app
-
-def test_debug():
-    msg = 'Verificar esta información...'
-    app.debug(msg)
-    return
-
11/08/2022 18:15:45 - DEBUG - Verificar esta información...
-

info

-

Mostrar mensajes informativos en la terminal.

-
import easymacro as app
-
-def test_info():
-    msg = 'Iniciando proceso...'
-    app.info(msg)
-    return
-
11/08/2022 18:23:53 - INFO - Iniciando proceso...
-

error

-

Mostrar mensajes de error en la terminal.

-
import easymacro as app
-
-def test_error():
-    msg = 'Error 505'
-    app.error(msg)
-    return
-
11/08/2022 18:27:34 - ERROR - Error 505
-

save_log

-

Guardar registro en un archivo, automáticamente se agrega la fecha y hora.

-
import easymacro as app
-
-def test_save_log():
-
-    app.save_log('/home/mau/log.txt', 'PyUNO')
-    app.save_log('/home/mau/log.txt', 'Maldito Mundo')
-
-    return
-
cat ~/log.txt
-2022-08-11 18:30:11 - 'PyUNO'
-2022-08-11 18:30:11 - 'Maldito Mundo'
-

msgbox

-

Mostrar cualquier información en un cuadro de mensaje.

-
def message():
-
-    msg = 'Por favor, consume menos.'
-    app.msgbox(msg)
-
-    msg = ('uno', 2, 'tres')
-    app.msgbox(msg)
-
-    msg = {'nombre': 'Teresa'}
-    app.msgbox(msg)
-
-    app.msgbox(app)
-
-    return
-

catch_exception

-

Capturar cualquier error que se produzca al ejecutar una macro.

-
@app.catch_exception
-def test_capturar_error():
-    r = 1 / 0
-    return
-
11/08/2022 18:44:36 - ERROR - test_capturar_error
-Traceback (most recent call last):
-  File "/home/mau/.config/libreoffice/4/user/Scripts/python/pythonpath/easymacro/easytools.py", line 115, in func
-    return f(*args, **kwargs)
-  File "/home/mau/.config/libreoffice/4/user/Scripts/python/test.py", line 18, in test_capturar_error
-    r = 1 / 0
-ZeroDivisionError: division by zero
-
-

Usa este método solo en tiempo de desarrollo. No la uses en producción.

-
- -

mri

-

MRI es la mejor extensión para inspeccionar cualquier objeto UNO de LibreOffice. Necesita instalarla primero para poder llamarla.

-
def inspeccionar_objeto():
-    obj = app.active
-    app.mri(obj)
-    return
-

inspect

-

Inspeccionar un objeto.

-
def inspeccionar_objeto():
-    doc = app.active
-    data = app.inspect(doc)
-    for p in data.properties:
-        app.debug(p)
-    for m in data.methods:
-        app.debug(m)
-    return
-

Vaciar en una hoja de calculo.

-
def inspeccionar_objeto():
-    doc = app.active
-    app.inspect(doc, True)
-    return
-
- - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/es/tools_debug/index.xml b/doc/public/es/tools_debug/index.xml deleted file mode 100644 index c71f78b..0000000 --- a/doc/public/es/tools_debug/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Herramientas para depurar on Documentación para EasyMacro - https://doc.cuates.net/easymacro/es/tools_debug/ - Recent content in Herramientas para depurar on Documentación para EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/es/tools_debug/tools_01.png b/doc/public/es/tools_debug/tools_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/public/es/tools_debug/tools_01.png and /dev/null differ diff --git a/doc/public/fonts/Inconsolata.eot b/doc/public/fonts/Inconsolata.eot deleted file mode 100644 index 0a705d6..0000000 Binary files a/doc/public/fonts/Inconsolata.eot and /dev/null differ diff --git a/doc/public/fonts/Inconsolata.svg b/doc/public/fonts/Inconsolata.svg deleted file mode 100644 index 36775f0..0000000 --- a/doc/public/fonts/Inconsolata.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/public/fonts/Inconsolata.ttf b/doc/public/fonts/Inconsolata.ttf deleted file mode 100644 index 4b8a36d..0000000 Binary files a/doc/public/fonts/Inconsolata.ttf and /dev/null differ diff --git a/doc/public/fonts/Inconsolata.woff b/doc/public/fonts/Inconsolata.woff deleted file mode 100644 index 6f39625..0000000 Binary files a/doc/public/fonts/Inconsolata.woff and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-Normal-webfont.eot b/doc/public/fonts/Novecentosanswide-Normal-webfont.eot deleted file mode 100644 index 9984682..0000000 Binary files a/doc/public/fonts/Novecentosanswide-Normal-webfont.eot and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-Normal-webfont.svg b/doc/public/fonts/Novecentosanswide-Normal-webfont.svg deleted file mode 100644 index 6fa1a66..0000000 --- a/doc/public/fonts/Novecentosanswide-Normal-webfont.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/public/fonts/Novecentosanswide-Normal-webfont.ttf b/doc/public/fonts/Novecentosanswide-Normal-webfont.ttf deleted file mode 100644 index 8cfb62d..0000000 Binary files a/doc/public/fonts/Novecentosanswide-Normal-webfont.ttf and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-Normal-webfont.woff b/doc/public/fonts/Novecentosanswide-Normal-webfont.woff deleted file mode 100644 index d5c4290..0000000 Binary files a/doc/public/fonts/Novecentosanswide-Normal-webfont.woff and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-Normal-webfont.woff2 b/doc/public/fonts/Novecentosanswide-Normal-webfont.woff2 deleted file mode 100644 index eefb4a3..0000000 Binary files a/doc/public/fonts/Novecentosanswide-Normal-webfont.woff2 and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.eot b/doc/public/fonts/Novecentosanswide-UltraLight-webfont.eot deleted file mode 100644 index 2a26561..0000000 Binary files a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.eot and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.svg b/doc/public/fonts/Novecentosanswide-UltraLight-webfont.svg deleted file mode 100644 index c4e903b..0000000 --- a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.ttf b/doc/public/fonts/Novecentosanswide-UltraLight-webfont.ttf deleted file mode 100644 index 9ce9c7f..0000000 Binary files a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.ttf and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.woff b/doc/public/fonts/Novecentosanswide-UltraLight-webfont.woff deleted file mode 100644 index 381650c..0000000 Binary files a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.woff and /dev/null differ diff --git a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.woff2 b/doc/public/fonts/Novecentosanswide-UltraLight-webfont.woff2 deleted file mode 100644 index 7e65954..0000000 Binary files a/doc/public/fonts/Novecentosanswide-UltraLight-webfont.woff2 and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_200.eot b/doc/public/fonts/Work_Sans_200.eot deleted file mode 100644 index 4052e4f..0000000 Binary files a/doc/public/fonts/Work_Sans_200.eot and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_200.svg b/doc/public/fonts/Work_Sans_200.svg deleted file mode 100644 index 0ffbd3a..0000000 --- a/doc/public/fonts/Work_Sans_200.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/public/fonts/Work_Sans_200.ttf b/doc/public/fonts/Work_Sans_200.ttf deleted file mode 100644 index 68019e1..0000000 Binary files a/doc/public/fonts/Work_Sans_200.ttf and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_200.woff b/doc/public/fonts/Work_Sans_200.woff deleted file mode 100644 index a1bd9e4..0000000 Binary files a/doc/public/fonts/Work_Sans_200.woff and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_200.woff2 b/doc/public/fonts/Work_Sans_200.woff2 deleted file mode 100644 index 20c68a7..0000000 Binary files a/doc/public/fonts/Work_Sans_200.woff2 and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_300.eot b/doc/public/fonts/Work_Sans_300.eot deleted file mode 100644 index ace7993..0000000 Binary files a/doc/public/fonts/Work_Sans_300.eot and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_300.svg b/doc/public/fonts/Work_Sans_300.svg deleted file mode 100644 index 7d29367..0000000 --- a/doc/public/fonts/Work_Sans_300.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/public/fonts/Work_Sans_300.ttf b/doc/public/fonts/Work_Sans_300.ttf deleted file mode 100644 index 35387c2..0000000 Binary files a/doc/public/fonts/Work_Sans_300.ttf and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_300.woff b/doc/public/fonts/Work_Sans_300.woff deleted file mode 100644 index 8d789ea..0000000 Binary files a/doc/public/fonts/Work_Sans_300.woff and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_300.woff2 b/doc/public/fonts/Work_Sans_300.woff2 deleted file mode 100644 index f6e216d..0000000 Binary files a/doc/public/fonts/Work_Sans_300.woff2 and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_500.eot b/doc/public/fonts/Work_Sans_500.eot deleted file mode 100644 index 9df6929..0000000 Binary files a/doc/public/fonts/Work_Sans_500.eot and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_500.svg b/doc/public/fonts/Work_Sans_500.svg deleted file mode 100644 index 90a91c1..0000000 --- a/doc/public/fonts/Work_Sans_500.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/public/fonts/Work_Sans_500.ttf b/doc/public/fonts/Work_Sans_500.ttf deleted file mode 100644 index 5b8cc53..0000000 Binary files a/doc/public/fonts/Work_Sans_500.ttf and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_500.woff b/doc/public/fonts/Work_Sans_500.woff deleted file mode 100644 index df05851..0000000 Binary files a/doc/public/fonts/Work_Sans_500.woff and /dev/null differ diff --git a/doc/public/fonts/Work_Sans_500.woff2 b/doc/public/fonts/Work_Sans_500.woff2 deleted file mode 100644 index b06c54d..0000000 Binary files a/doc/public/fonts/Work_Sans_500.woff2 and /dev/null differ diff --git a/doc/public/fr/404.html b/doc/public/fr/404.html deleted file mode 100644 index 166b4e8..0000000 --- a/doc/public/fr/404.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - 404 Page not found - - - - - - - - - - - - - - - - - - -
-
-
-
-

Erreur

-

-

-

Oups. On dirait que cette page n'existe pas ¯\_(ツ)_/¯

-

-

Vers la page d'accueil

-

Page not found!

-
-
- -
- - - diff --git a/doc/public/fr/categories/index.html b/doc/public/fr/categories/index.html deleted file mode 100644 index a5568f2..0000000 --- a/doc/public/fr/categories/index.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - - - - - - Categories :: Documentation du EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - category :: - - Categories -

- - - - - - - - -
    - -
- - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/fr/categories/index.xml b/doc/public/fr/categories/index.xml deleted file mode 100644 index 098fc42..0000000 --- a/doc/public/fr/categories/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Categories on Documentation du EasyMacro - https://doc.cuates.net/easymacro/fr/categories/ - Recent content in Categories on Documentation du EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/fr/index.html b/doc/public/fr/index.html deleted file mode 100644 index 08c0d2a..0000000 --- a/doc/public/fr/index.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - - - - - - - :: Documentation du EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
- -
- -
- - - - - - navigation - - - -

Bienvenue dans la documentation easymacro!

-

easymacro est une bibliothèque permettant de développer facilement des macros LibreOffice avec Python. Il s’agit d’une couche d’abstraction entre l’API étendue et complexe de LibreOffice UNO et votre code.

-

Vous serez probablement plus heureux si vous l’utilisez :)

-

Vous pouvez utiliser easymacro avec n’importe quelle extension ou directement dans vos macros.

- - - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/fr/index.json b/doc/public/fr/index.json deleted file mode 100644 index eea1b78..0000000 --- a/doc/public/fr/index.json +++ /dev/null @@ -1,22 +0,0 @@ -[ -{ - "uri": "https://doc.cuates.net/easymacro/fr/", - "title": "", - "tags": [], - "description": "", - "content": "Bienvenue dans la documentation easymacro! easymacro est une bibliothèque permettant de développer facilement des macros LibreOffice avec Python. Il s\u0026rsquo;agit d\u0026rsquo;une couche d\u0026rsquo;abstraction entre l\u0026rsquo;API étendue et complexe de LibreOffice UNO et votre code.\nVous serez probablement plus heureux si vous l\u0026rsquo;utilisez :)\nVous pouvez utiliser easymacro avec n\u0026rsquo;importe quelle extension ou directement dans vos macros.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/fr/categories/", - "title": "Categories", - "tags": [], - "description": "", - "content": "" -}, -{ - "uri": "https://doc.cuates.net/easymacro/fr/tags/", - "title": "Tags", - "tags": [], - "description": "", - "content": "" -}] \ No newline at end of file diff --git a/doc/public/fr/index.xml b/doc/public/fr/index.xml deleted file mode 100644 index 6f04026..0000000 --- a/doc/public/fr/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Documentation du EasyMacro - https://doc.cuates.net/easymacro/fr/ - Recent content on Documentation du EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/fr/sitemap.xml b/doc/public/fr/sitemap.xml deleted file mode 100644 index af88c16..0000000 --- a/doc/public/fr/sitemap.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - https://doc.cuates.net/easymacro/fr/ - 0 - - - - - - https://doc.cuates.net/easymacro/fr/categories/ - - - - - - https://doc.cuates.net/easymacro/fr/tags/ - - - - - - diff --git a/doc/public/fr/tags/index.html b/doc/public/fr/tags/index.html deleted file mode 100644 index 793da7e..0000000 --- a/doc/public/fr/tags/index.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - - - - - - Tags :: Documentation du EasyMacro - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - tag :: - - Tags -

- - - - - - - - -
    - -
- - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/fr/tags/index.xml b/doc/public/fr/tags/index.xml deleted file mode 100644 index 91879a4..0000000 --- a/doc/public/fr/tags/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Tags on Documentation du EasyMacro - https://doc.cuates.net/easymacro/fr/tags/ - Recent content in Tags on Documentation du EasyMacro - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/images/clippy.svg b/doc/public/images/clippy.svg deleted file mode 100644 index f455173..0000000 --- a/doc/public/images/clippy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/public/images/favicon.png b/doc/public/images/favicon.png deleted file mode 100644 index df06e35..0000000 Binary files a/doc/public/images/favicon.png and /dev/null differ diff --git a/doc/public/images/gopher-404.jpg b/doc/public/images/gopher-404.jpg deleted file mode 100644 index 2a50543..0000000 Binary files a/doc/public/images/gopher-404.jpg and /dev/null differ diff --git a/doc/public/images/logo.png b/doc/public/images/logo.png deleted file mode 100644 index 2f210ed..0000000 Binary files a/doc/public/images/logo.png and /dev/null differ diff --git a/doc/public/index.html b/doc/public/index.html deleted file mode 100644 index f396c1d..0000000 --- a/doc/public/index.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - :: EasyMacro's documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
- -
- -
- - - - - - navigation - - - -

Welcome to easymacro’s documentation!

-

Free Software, not gratis software

-

easymacro 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, you will be more happy if used it. :)

-

You can used easymacro with any extension or directly in your macros.

- -

This project is in continuous development.

-
- - - - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/index.json b/doc/public/index.json deleted file mode 100644 index 9df935e..0000000 --- a/doc/public/index.json +++ /dev/null @@ -1,36 +0,0 @@ -[ -{ - "uri": "https://doc.cuates.net/easymacro/installation/", - "title": "Installation", - "tags": [], - "description": "", - "content": "Clone repository Clone repository in your favorite folder projects.\ngit clone https://git.cuates.net/elmau/easymacro and copy library into pythonpath in your macros.\n/home/USER/.config/libreoffice/4/user/Scripts/python/pythonpath/easymacro.py or used hard link. Replace ABSOLUTE_PATH for absolute path in your system and USER for your real name user.\nln ABSOLUTE_PATH/easymacro/source/easymacro.py /home/USER/.config/libreoffice/4/user/Scripts/python/pythonpath/ Test In your favorite macros file, for example mymacros.py:\nvim /home/USER/.config/libreoffice/4/user/Scripts/python/mymacros.py copy this code:\nimport easymacro as app def main(): app.msgbox(app.INFO_DEBUG) return and execute from LibreOffice, if you see similar next info, great!\nyou are ready for develop with easymacro.\nHappy develop!\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/tools_debug/", - "title": "Tools for debug", - "tags": [], - "description": "", - "content": "INFO_DEBUG " -}, -{ - "uri": "https://doc.cuates.net/easymacro/", - "title": "", - "tags": [], - "description": "", - "content": "Welcome to easymacro’s documentation! Free Software, not gratis software easymacro 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.\nProbably, you will be more happy if used it. :)\nYou can used easymacro with any extension or directly in your macros.\nThis project is in continuous development.\n" -}, -{ - "uri": "https://doc.cuates.net/easymacro/categories/", - "title": "Categories", - "tags": [], - "description": "", - "content": "" -}, -{ - "uri": "https://doc.cuates.net/easymacro/tags/", - "title": "Tags", - "tags": [], - "description": "", - "content": "" -}] \ No newline at end of file diff --git a/doc/public/index.xml b/doc/public/index.xml deleted file mode 100644 index dd86904..0000000 --- a/doc/public/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - EasyMacro's documentation - https://doc.cuates.net/easymacro/ - Recent content on EasyMacro's documentation - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/installation/index.html b/doc/public/installation/index.html deleted file mode 100644 index 47288d9..0000000 --- a/doc/public/installation/index.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - - - - Installation :: EasyMacro's documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-
- - - - -
-
- -
-
- - -
-
- -
- -
- -
- -

- - Installation -

- - - - - - -

Clone repository

-

Clone repository in your favorite folder projects.

-
git clone https://git.cuates.net/elmau/easymacro
-

and copy library into pythonpath in your macros.

-
/home/USER/.config/libreoffice/4/user/Scripts/python/pythonpath/easymacro.py
-

or used hard link. Replace ABSOLUTE_PATH for absolute path in your system and USER for your real name user.

-
ln ABSOLUTE_PATH/easymacro/source/easymacro.py /home/USER/.config/libreoffice/4/user/Scripts/python/pythonpath/
-

Test

-

In your favorite macros file, for example mymacros.py:

-
vim /home/USER/.config/libreoffice/4/user/Scripts/python/mymacros.py
-

copy this code:

-
import easymacro as app
-
-def main():
-    app.msgbox(app.INFO_DEBUG)
-    return
-

and execute from LibreOffice, if you see similar next info, great!

-

Test instalation

-

you are ready for develop with easymacro.

-

Happy develop!

- - - - - -
- -
- - -
- - -
- - - -
- -
-
-
- - - - - - - - - - - - - - - - - - - - diff --git a/doc/public/installation/index.xml b/doc/public/installation/index.xml deleted file mode 100644 index e7a6b97..0000000 --- a/doc/public/installation/index.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Installation on EasyMacro's documentation - https://doc.cuates.net/easymacro/installation/ - Recent content in Installation on EasyMacro's documentation - Hugo -- gohugo.io - en-us - - diff --git a/doc/public/installation/install_01.png b/doc/public/installation/install_01.png deleted file mode 100644 index 6395bb4..0000000 Binary files a/doc/public/installation/install_01.png and /dev/null differ diff --git a/doc/public/js/auto-complete.js b/doc/public/js/auto-complete.js deleted file mode 100644 index 0b46054..0000000 --- a/doc/public/js/auto-complete.js +++ /dev/null @@ -1,3 +0,0 @@ -// JavaScript autoComplete v1.0.4 -// https://github.com/Pixabay/JavaScript-autoComplete -var autoComplete=function(){function e(e){function t(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function o(e,t,o){e.attachEvent?e.attachEvent("on"+t,o):e.addEventListener(t,o)}function s(e,t,o){e.detachEvent?e.detachEvent("on"+t,o):e.removeEventListener(t,o)}function n(e,s,n,l){o(l||document,s,function(o){for(var s,l=o.target||o.srcElement;l&&!(s=t(l,e));)l=l.parentElement;s&&n.call(l,o)})}if(document.querySelector){var l={selector:0,source:0,minChars:3,delay:150,offsetLeft:0,offsetTop:1,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'
'+e.replace(o,"$1")+"
"},onSelect:function(){}};for(var c in e)e.hasOwnProperty(c)&&(l[c]=e[c]);for(var a="object"==typeof l.selector?[l.selector]:document.querySelectorAll(l.selector),u=0;u0?i.sc.scrollTop=n+i.sc.suggestionHeight+s-i.sc.maxHeight:0>n&&(i.sc.scrollTop=n+s)}else i.sc.scrollTop=0},o(window,"resize",i.updateSC),document.body.appendChild(i.sc),n("autocomplete-suggestion","mouseleave",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&setTimeout(function(){e.className=e.className.replace("selected","")},20)},i.sc),n("autocomplete-suggestion","mouseover",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&(e.className=e.className.replace("selected","")),this.className+=" selected"},i.sc),n("autocomplete-suggestion","mousedown",function(e){if(t(this,"autocomplete-suggestion")){var o=this.getAttribute("data-val");i.value=o,l.onSelect(e,o,this),i.sc.style.display="none"}},i.sc),i.blurHandler=function(){try{var e=document.querySelector(".autocomplete-suggestions:hover")}catch(t){var e=0}e?i!==document.activeElement&&setTimeout(function(){i.focus()},20):(i.last_val=i.value,i.sc.style.display="none",setTimeout(function(){i.sc.style.display="none"},350))},o(i,"blur",i.blurHandler);var r=function(e){var t=i.value;if(i.cache[t]=e,e.length&&t.length>=l.minChars){for(var o="",s=0;st||t>40)&&13!=t&&27!=t){var o=i.value;if(o.length>=l.minChars){if(o!=i.last_val){if(i.last_val=o,clearTimeout(i.timer),l.cache){if(o in i.cache)return void r(i.cache[o]);for(var s=1;s https://github.com/noelboss/featherlight/issues/317 -!function(u){"use strict";if(void 0!==u)if(u.fn.jquery.match(/-ajax/))"console"in window&&window.console.info("Featherlight needs regular jQuery, not the slim version.");else{var r=[],i=function(t){return r=u.grep(r,function(e){return e!==t&&0','
','",'
'+n.loading+"
","
",""].join("")),o="."+n.namespace+"-close"+(n.otherClose?","+n.otherClose:"");return n.$instance=i.clone().addClass(n.variant),n.$instance.on(n.closeTrigger+"."+n.namespace,function(e){if(!e.isDefaultPrevented()){var t=u(e.target);("background"===n.closeOnClick&&t.is("."+n.namespace)||"anywhere"===n.closeOnClick||t.closest(o).length)&&(n.close(e),e.preventDefault())}}),this},getContent:function(){if(!1!==this.persist&&this.$content)return this.$content;var t=this,e=this.constructor.contentFilters,n=function(e){return t.$currentTarget&&t.$currentTarget.attr(e)},r=n(t.targetAttr),i=t.target||r||"",o=e[t.type];if(!o&&i in e&&(o=e[i],i=t.target&&r),i=i||n("href")||"",!o)for(var a in e)t[a]&&(o=e[a],i=t[a]);if(!o){var s=i;if(i=null,u.each(t.contentFilters,function(){return(o=e[this]).test&&(i=o.test(s)),!i&&o.regex&&s.match&&s.match(o.regex)&&(i=s),!i}),!i)return"console"in window&&window.console.error("Featherlight: no content filter found "+(s?' for "'+s+'"':" (no target specified)")),!1}return o.process.call(t,i)},setContent:function(e){return this.$instance.removeClass(this.namespace+"-loading"),this.$instance.toggleClass(this.namespace+"-iframe",e.is("iframe")),this.$instance.find("."+this.namespace+"-inner").not(e).slice(1).remove().end().replaceWith(u.contains(this.$instance[0],e[0])?"":e),this.$content=e.addClass(this.namespace+"-inner"),this},open:function(t){var n=this;if(n.$instance.hide().appendTo(n.root),!(t&&t.isDefaultPrevented()||!1===n.beforeOpen(t))){t&&t.preventDefault();var e=n.getContent();if(e)return r.push(n),s(!0),n.$instance.fadeIn(n.openSpeed),n.beforeContent(t),u.when(e).always(function(e){n.setContent(e),n.afterContent(t)}).then(n.$instance.promise()).done(function(){n.afterOpen(t)})}return n.$instance.detach(),u.Deferred().reject().promise()},close:function(e){var t=this,n=u.Deferred();return!1===t.beforeClose(e)?n.reject():(0===i(t).length&&s(!1),t.$instance.fadeOut(t.closeSpeed,function(){t.$instance.detach(),t.afterClose(e),n.resolve()})),n.promise()},resize:function(e,t){if(e&&t&&(this.$content.css("width","").css("height",""),this.$content.parent().width()');return n.onload=function(){r.naturalWidth=n.width,r.naturalHeight=n.height,t.resolve(r)},n.onerror=function(){t.reject(r)},n.src=e,t.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(e){return u(e)}},ajax:{regex:/./,process:function(e){var n=u.Deferred(),r=u("
").load(e,function(e,t){"error"!==t&&n.resolve(r.contents()),n.fail()});return n.promise()}},iframe:{process:function(e){var t=new u.Deferred,n=u("