More Noobie Questions

Application Macros

Existing macros in this location (container) were copied by the installation program and are available to every computer user, and any open document can access macros stored the container. You need administrative rights to store or edit macros here.

The LibreOffice Macros container location in the file system depends on the operating system:

For Windows: {Installation}\share\Scripts\python.

For Linux and macOS: {Installation}/share/Scripts/python.

I guess it is just me and my limited experience (being a newbie Pythonista and new to Macros) but I have real difficulty understanding some of the instructions. Surely it cannot be as hard as I am finding it.

In the above - taken straight from the manual, I am trying to find where the stock python macros are kept on Ubuntu 23.04 and LibreOffice 7.5.4.2…what do they mean by {Installation} in {Installation}/share/Scripts/python…an example would have added clarity for us dumbos! Is there anywhere a Dummy’s Guide to Using Python Macros in LibreOffice…coz I am finding this all a real challenge!

{Installation}

Is the directory in which your LibreOffice is installed. It might be e.g. /opt/libreoffice

Actually it seems to be in etc/libreoffice…but there is no folder share/Scripts/python???

Well I found a possilbe answer to finding out what I am looking for…but again, I cannot fully understand it.

Examples:

With Python shell.

from <the_module> import Session

print(Session.SharedPythonScripts()) # static method

print(Session().UserName) # object property

input(Session().UserProfile) # object property

Again, what do they mean by <the_module>??