Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hullo List,

Is there an API for working with LO programmatically? Rather than create an ODF with the myriad of tools available, I'm looking to directly invoke a LO object within a script.

I'm aware of the UNO bridge, but that requires a running instance of LO and connection to it as an external service. What I'm looking for is a way to create and manipulate a document -- with LO routines -- without incurring unnecessary overhead. Perhaps as a library.

For the sake of argument, here might be an example Python script:

-----
import libreoffice as LO

textdoc = LO.createTextDocument()
textdoc.properties.Title = "My API Created Document"
textdoc.cursor = 0   # move cursor to document head
textdoc.insertText( "A sample line." )
textdoc.saveAs( "/path/to/a/file.odt" )
-----

After about 20 minutes of Googling, and random grepping through the code base, I'm having no luck. Does such a beast exist?

Thanks,

Kevin

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.