How build Python Extention for OpenOffice Writer
How build Python Extention for OpenOffice Writer
I used "Basic Addon Builder" for basic macros. How i can to pack python macros?
Libre Office 5.1.6.2, Linux Mint 18 (64 bit)
Re: How build Python Extention for OpenOffice Writer
Well, in most cases a JavaScript/Python macro is just a plain text file (module) saved in some subdirectory of the user profile.
An extension may include some macro code but macros are not the same as an extension. Instead of wasting my time with this horrible extension framework, I wrote a very simple script installer. It is a Writer template with a user-defined variable, a modified "Default" paragraph style, a frame with a button and a Basic macro.
Just replace the placeholder field with your code and adjust the user-defined variable "ScriptPath" by double-clicking the field in the text frame.
P.S. The extension compiler can compile extensions with all kinds of scripts. I hate that framework so much that I did not even spend any time with that helpful tool.
An extension may include some macro code but macros are not the same as an extension. Instead of wasting my time with this horrible extension framework, I wrote a very simple script installer. It is a Writer template with a user-defined variable, a modified "Default" paragraph style, a frame with a button and a Basic macro.
Just replace the placeholder field with your code and adjust the user-defined variable "ScriptPath" by double-clicking the field in the text frame.
P.S. The extension compiler can compile extensions with all kinds of scripts. I hate that framework so much that I did not even spend any time with that helpful tool.
- Attachments
-
- AutoRefresh.py.odt
- ScriptInstaler.ott with example code and script path
- (18.2 KiB) Downloaded 242 times
-
- Script_Installer.ott
- ScriptInstaler.ott to install JavaScript and Python macros
- (15.01 KiB) Downloaded 250 times
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: How build Python Extention for OpenOffice Writer
My macro is a single file, but i need addition functions of extention.
i need:
1. set version and description
2. set custom icon in top panel for running macros
3. set update URL
Can anyone share a compilation code template for my case(or any example code)? I mean basic code for extension compiler.
i need:
1. set version and description
2. set custom icon in top panel for running macros
3. set update URL
Can anyone share a compilation code template for my case(or any example code)? I mean basic code for extension compiler.
Libre Office 5.1.6.2, Linux Mint 18 (64 bit)
Re: How build Python Extention for OpenOffice Writer
http://berma.pagesperso-orange.fr/Files ... mpiler.ott
search for "python"
search for "python"
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: How build Python Extention for OpenOffice Writer
Hi. I've just registered for this board because we need some help automating our workflow from OpenOffice to Adobe InDesign. I can't PM so I'm dropping this message off here.
I'm trying to find someone to hire to automate, for example, the import of automated cross references from OOo to InDesign. Villeroy, I see that you often post about technical topics and I wonder whether this is the sort of thing you might be interested in.
You can reach me directly at bill-at-nostarch-dot-com
Thank you,
Bill Pollock, No Starch Press
I'm trying to find someone to hire to automate, for example, the import of automated cross references from OOo to InDesign. Villeroy, I see that you often post about technical topics and I wonder whether this is the sort of thing you might be interested in.
You can reach me directly at bill-at-nostarch-dot-com
Thank you,
Bill Pollock, No Starch Press
OpenOffice 4.1.x on Ubuntu
Re: How build Python Extention for OpenOffice Writer
Problem does not solved. I got error, when i run macros for compilation. http://joxi.ru/J2bNx90IXWkN42. What is that means?
Code:
Code:
Code: Select all
REM ***** BASIC *****
Option Explicit
Sub exampleDescription
beginDescription("PlainToHTMLNew", "1.0.0")
setExtensionDescription("en")
setPublisherName("en", "Alexey Tyapkin", "http://www.oooyes.com")
setDisplayName("en", "PlainToHTMLNewDisplayName")
beginUpdateInformation("direct", "direct")
setUpdateSource("http://otp.tw1.ru/PlainToHTML2/", "http://otp.tw1.ru/PlainToHTML2/") ' first choice
endUpdateInformation
endDescription
beginAddonUI
beginAddonMenu
beginCommand
beginTitles("Writer")
setTitle("This is an apple", "en")
endTitles
setURL("Python", "PlainToText2.py", "PlainToHtml")
setImage("icon.png")
endCommand
endAddonMenu
endAddonUI
End Sub
Libre Office 5.1.6.2, Linux Mint 18 (64 bit)
- LibreOfficiant
- Posts: 12
- Joined: Wed Jan 25, 2017 9:36 pm
Re: How build Python Extention for OpenOffice Writer
In case it may help, here are 3 links:
https://wiki.openoffice.org/wiki/Docume ... on_Manager
https://wiki.openoffice.org/wiki/UNO_co ... nt_testing
https://wiki.openoffice.org/wiki/Extensions_development
https://wiki.openoffice.org/wiki/Docume ... on_Manager
https://wiki.openoffice.org/wiki/UNO_co ... nt_testing
https://wiki.openoffice.org/wiki/Extensions_development
libO 5.4 64bit, (PortableApps: libO 6.0, aOO 4.1, OOo 3.2 32bit) on Win7/Win10 x64 | aOO 4.1.x & libO 5.4.x on Mint 18 Sarah & OSX 10.9 Mavericks x64
Python toolbox: Geany, PyCharm and APSO, MRI extensions..
https://wiki.documentfoundation.org/Macros/Design_Guide
Python toolbox: Geany, PyCharm and APSO, MRI extensions..
https://wiki.documentfoundation.org/Macros/Design_Guide