Page 1 of 1

Need Python Macro extention tutorial

Posted: Mon Sep 09, 2019 3:23 pm
by matmir
Hello,
I'm principiant on this ambient, but I'm a senior developer.
I know python language, but i don't find any tutorial to create oxt extension on libreoffice by python.
Is there someone to help me, to find pdf tutorial or link to any page to guide on step by step create oxt extension.
I'm open to any solution to resolve my problem.
Thanks to everyone who answers.
 Edit: This was originally posted in the Tutorials forum but it is not a tutorial and does not belong there.
-- MrProgrammer, Forum Moderator, 2019-09-09 14:14 UTC 

Re: Need Python Macro extention tutorial

Posted: Mon Sep 09, 2019 5:45 pm
by Villeroy
A Python macro is a script that is stored as plain text in <user_profile>/Scripts/python
It can be accessed through menu:Tools>Macros and several event dialogs for objects and menu:Tools>Customize... [Events]

An extension integrates some new class(es) into the application, including the API. You have to be familiar with the overall architekture, write xml files, install the SDK and generate IDL files.

I can offer a Writer template which stores a plain text file (i.e. a macro) within the script folder.
You edit a user-defined text field (dbl-clikc), call a Basic macro which is part of the template and the document text will be installed as plain text.
---
Currently, I can not access my templates. Here is a macro document derived from the said template: viewtopic.php?f=21&t=97134

Extensions wiki: https://wiki.openoffice.org/wiki/Extensions

Re: Need Python Macro extention tutorial

Posted: Mon Sep 09, 2019 7:43 pm
by Villeroy
ExtensionCompiler.ott is a Writer template which works very much like a huge input form.

Re: Need Python Macro extention tutorial

Posted: Fri Sep 20, 2019 9:08 pm
by arvchristos
During GSOC 2018, I compiled some useful guides about LibreOffice/OpenOffice extension development. Those guides include all the steps I followed while creating the result extensions of my project. Here is the wiki:
https://github.com/eellak/gsoc2018-librecust/wiki

Re: Need Python Macro extention tutorial

Posted: Thu Dec 19, 2019 6:26 pm
by psilocybe
Hi matmir,

The simplest one I found is zip.exe and a bat file like this https://github.com/prrvchr/OAuth2OOo/bl ... ackage.bat

Warning: the mimetype file must be not compressed and the first entry in archive...

Re: Need Python Macro extention tutorial

Posted: Sun Dec 22, 2019 4:25 pm
by Villeroy
Solved here: viewtopic.php?f=47&t=99373&p=477899#p477899
"matmir" wanted to install a macro (a plain text file) which can be done without entering the oxt hell.