diff --git a/README.md b/README.md index 5f03024..a9d9a7c 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,12 @@ LibreOffice SDK 7.0+ #### but, don't make the mistake of many of *thinking only in gratis software* that so much damage has done to **Free Software**. -This extension have a cost of maintenance of 10 euros every year. +This extension have a cost of maintenance of 1 euros every year. BCH: `qztd3l00xle5tffdqvh2snvadkuau2ml0uqm4n875d` +MONERO: `48ygK6NuuNAfwWfeAbeK8YP2ryPqxMAsUZBnfAhaHVkoHZ48JRYiQKKFd5GFMmaytyUpfxnyA95pWavjRgPUuKv1TUTvhkd` + BTC: `3FhiXcXmAesmQzrNEngjHFnvaJRhU1AGWV` ETH: `0x61a4f614a30ff686445751ed8328b82b77ecfc69` @@ -33,8 +35,6 @@ You have others cryptos, welcome too! ## Extensions develop with ZAZ -* https://gitlab.com/mauriciobaeza/zaz-barcode -* https://gitlab.com/mauriciobaeza/zaz-favorite -* https://gitlab.com/mauriciobaeza/zaz-easymacro -* https://gitlab.com/mauriciobaeza/zaz-pip -* https://gitlab.com/mauriciobaeza/zaz-inspect +* https://git.cuates.net/elmau/zaz-pip +* https://git.cuates.net/elmau/zaz-favorites +* https://git.cuates.net/elmau/zaz-functions diff --git a/doc/build/.doctrees/environment.pickle b/doc/build/.doctrees/environment.pickle index 850dbea..f0ffb0e 100644 Binary files a/doc/build/.doctrees/environment.pickle and b/doc/build/.doctrees/environment.pickle differ diff --git a/doc/build/.doctrees/main/paths.doctree b/doc/build/.doctrees/main/paths.doctree index 16afe8b..cd9055f 100644 Binary files a/doc/build/.doctrees/main/paths.doctree and b/doc/build/.doctrees/main/paths.doctree differ diff --git a/doc/build/_sources/main/paths.rst.txt b/doc/build/_sources/main/paths.rst.txt index 0d25be3..902731e 100644 --- a/doc/build/_sources/main/paths.rst.txt +++ b/doc/build/_sources/main/paths.rst.txt @@ -432,7 +432,7 @@ This method use `os.walk` app.debug(f) -Get install path from id extension +Get install path extension from id ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: python @@ -446,4 +446,90 @@ Get install path from id extension 24/06/2021 21:47:29 - DEBUG - /home/mau/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu20665x29msz.tmp_/ZAZEasyMacro_v0.1.0.oxt +Verify if application exists +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: python + + app_name = 'nosoffice' + app.msgbox(app.paths.exists_app(app_name)) + + app_name = 'soffice' + app.msgbox(app.paths.exists_app(app_name)) + + +Open any type file +^^^^^^^^^^^^^^^^^^ + +Open with default application in OS. + +.. code-block:: python + + path = '/home/mau/Downloads/file.pdf' + app.paths.open(path) + + path = '/home/mau/Projects/libre_office/zaz/doc/build/index.html' + app.paths.open(path) + +Save and read json +^^^^^^^^^^^^^^^^^^ + +.. code-block:: python + + path = '/home/mau/data.json' + data = { + 'type': 'calc', + 'name': 'myfile.ods', + } + app.paths.to_json(path, data) + + data = app.paths.from_json(path) + + app.msgbox(data) + + +Save and read csv +^^^^^^^^^^^^^^^^^ + +You can used the same way that `python csv`_ + +.. code-block:: python + + path = '/home/mau/data.csv' + data = ( + (1, 'one', app.now()), + (2, 'two', app.now()), + (3, 'three', app.now()), + ) + app.paths.to_csv(path, data) + + data = app.paths.from_csv(path) + + app.msgbox(data) + + +Copy files +^^^^^^^^^^ + +Copy with the same name + +.. code-block:: python + + path = '/home/mau/image.png' + target = '/home/mau/Pictures' + path_new = app.paths.copy(path, target) + app.msgbox(path_new) + +Copy with other name + +.. code-block:: python + + path = '/home/mau/image.png' + target = '/home/mau/Pictures' + new_name = 'other_name.png' + path_new = app.paths.copy(path, target, name) + app.msgbox(path_new) + + .. _API XPathSettings: http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XPathSettings.html +.. _python csv: https://docs.python.org/3.7/library/csv.html diff --git a/doc/build/main/easymacro.html b/doc/build/main/easymacro.html index b8f5354..530556f 100644 --- a/doc/build/main/easymacro.html +++ b/doc/build/main/easymacro.html @@ -105,7 +105,12 @@
  • Delete files and directories
  • Get files
  • Get directories
  • -
  • Get install path from id extension
  • +
  • Get install path extension from id
  • +
  • Verify if application exists
  • +
  • Open any type file
  • +
  • Save and read json
  • +
  • Save and read csv
  • +
  • Copy files
  • Email