Package: ooo-dev-tools
OOO Development Tools (OooDev) is intended for programmers who want to learn and use the
Python version of theLibreOfficeAPI.This allows Python to control and manipulate LibreOffice’s text, drawing, presentation, spreadsheet, and database applications,
and a lot more (e.g. its spell checker, forms designer, and charting tools).One of the aims is to develop utility code to help flatten the steep learning curve for the API.
For example, The Lo class simplifies the steps needed to initialize the API
(by creating a connection to a LibreOffice process), to open/create a document, save it,
and close down LibreOffice.Currently this project has been tested on LibreOffice in Windows and Linux (Ubuntu).Advantages of PythonMacros are pieces of programming code that runs in office suites and helps automate routine tasks.
Specifically, in LibreOffice API these codes can be written with so many programming languages thanks
to the Universal Network Objects (UNO).Since LibreOffice is multi-platform we can use our documents at different
platforms like Mac, Windows, and Linux. So we need a cross-platform language to run our macros at different
platforms.Python has the advantage that it is cross-platform and can run inside the office environment as macros and outside
office environment on the command line.Python has a vast setlibrariesthat can be used in a project, includingNumpyandNumexprwhich are excellent and powerful at numeric computation.This makes Python and excellent choice with maximum flexibility.DocumentationDocsReaddocumentationCommand Line HelpThere are many classes and methods in this project.
For this reason OooDev has a command line toolOooDev CLI Help.
that can be used to search the documentation for classes and methods this project.
Choosing a number from a search result opens you web browser to that class or method in the documentation.OooDev CLI Helpis built fromSphinx CLI Help, so see theWiki Searching helpand substitutecli-hlpwithodhon command line instructions.Example Usage:odhhlp-sWrite.appendChooseanoption(default1):[0],Cancel(orpressqfollowedbyenter)[1],ooodev.office.write.Write.append-method-py[2],ooodev.office.write.Write.append_date_time-method-py[3],ooodev.office.write.Write.append_line-method-py[4],ooodev.office.write.Write.append_para-method-pyNote thatOooDev CLI Helpis a separate project and is not required to use this project.
AlsoOooDev CLI Helpuse python built insqlitewhich is not shipped with LibreOffices’s python on Windows.
This means some configurations will not allowOooDev CLI Helpto run on Windows. In this case you can installOooDev CLI Helpon a global scope and use it that way if needed.See Also:LibreOffice Developer SearchInstallationEXTENSIONThis project is also available as an extension for LibreOffice.
The OOO Development Tools extension is available onGitHubandLibreOffice Extensions.See theGuidefor installation and usage.PIPooo-dev-toolsPyPIpipinstallooo-dev-toolsNote: Support for python3.7was dropped in version0.10.0ModulesCurrently there are more than4,000classes in this framework.Include modules:Calc (Calc)Write (Write)Draw (LibreOffice Draw/Impress)Forms (Support for building forms)Dialogs (Build dialog forms)GUI (Various GUI methods for manipulating LO Windows)Lo (Various methods common to LO applications)FileIO (File Input and Output for working with LO)Format (Format Module —hundreds of classes— for Styling and modifying the many Documents and Sheets properties.)Props (Various methods setting and getting the many properties of Office objects)Info (Various method for getting information about LO applications)Color (Various color utils)DateUtil (Date Time utilities)ImagesLo (Various methods for working with Images)Props (Various methods for working with the many API properties)Chart2 (charting)Chart (charting)Gallery (Methods for accessing and reporting on the Gallery)Theme (Access to LibreOffice Theme Properties)Units (Various unit methods and classes for passing different kinds of units in LibreOffice such as inches, millimeters, points, pixels.)And more …Future releases will add:Base (LibreOffice Base)Clip (clipboard support)Mail (Mail service provider)Print (Print service provider)And more …InspirationMuch of this project is inspired by the work of Dr. Andrew Davison.
An archive archive of the Java code is available atGitHub - LibreOffice Java Programming.See Also:LibreOffice Programmingthat aims to gradually explain this content in a python context.Python LibreOffice Programming - PrefaceOtherFigure 1:Calc Find and Replace Automation ExampleRelated projectsLibreOffice API Typing’sLibreOffice API TypingsScriptForge TypingsAccess2base TypingsLibreOffice UNO TypingsLibreOffice Developer SearchLibreOffice Python UNO ExamplesOOOUNO ProjectOOO UNO TEMPLATE