Need Python Macro extention tutorial

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
matmir
Posts: 4
Joined: Mon Sep 09, 2019 3:15 pm

Need Python Macro extention tutorial

Post 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 
LibreOffice Versione: 6.2.1.2 (x64) on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Need Python Macro extention tutorial

Post 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
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Need Python Macro extention tutorial

Post by Villeroy »

ExtensionCompiler.ott is a Writer template which works very much like a huge input form.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arvchristos
Posts: 15
Joined: Fri Jun 08, 2018 10:47 am

Re: Need Python Macro extention tutorial

Post 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
Libreoffice 5 and openoffice 4 on Archlabs
psilocybe
Posts: 108
Joined: Thu Jun 15, 2017 5:33 am

Re: Need Python Macro extention tutorial

Post 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...
LibreOffice 5.3.3.2 - Lubuntu 16.10 - LxQt 0.11.0.3
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Need Python Macro extention tutorial

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply