KOffice python module

Developer Tools

Source:

0
Score 75%
Description:


The KOffice Python module is officially buried. It's being left up now for historic purposes. It provided a way to script the KOffice applications (KWord, KSpread, KPresenter) with a nice Python API when no other way was possible (Dec 2004). I just blew the dust off and tried running the examples with the latest KOffice - all but one failed, so you probably don't want to use it.
Kross (a multi language scripting solution for KOffice, originally from the Kexi guys) is in active development, so that will provide what this attempted to be :-)




This package provides a python module for connecting to and scripting KOffice applications - you can get a range of cells and change their background colors in KSpread, insert shapes into slides in KPresenter, analyze text and make changes in a KWord instance from the comfortable environment provided by Python, etc.

It is now quite functional with the ability to script the KOffice 'big 3' - KWord, KPresenter, KSpread.
Unfortunately last time I checked other smaller KOffice apps lacked an in-depth DCOP interface to make a scripting interface a possibility.

The only dependancy (other than python) it has is dcoppython, but as i've had many people saying they couldn't build it, it comes pre-compiled in the package. Its source is available in KDE's cvs in the kdebindings module, but unfortunately it seems to be a dead project.
Last changelog:

13 years ago

Message stated, officially burying the project. Changed license to LGPL.

Sun Feb 13 2005 (afternoon)
0.5-pre1 released. KWord class now functional - you can insert/append/set text in the frame, get the text in the frame, add sections of bold/italic/striked-out text. There are a few known issues, one pertaining to setting color and one pertaining to checking whether or not text is striked out. When they have been resolved (along with other bugs that will no doubt pop up) 0.5 will be released.


Sun Feb 13 2005
Precompiled dcoppython compiled with --disable-debug.

Sat Feb 12 2005
Included pcop.so in the libs dir.. funny this hasn't been pointed out as missing.

Wed Dec 22 2004
Added insertImage function to the KPresenterSlide object, as well as insertText. The KPresenterTextBox class has many functions for changing the color of text, rich text styling.
All visible items on a slide now inherit from KPresenterObject which means all shapes/images/textboxes can move, have shadows, resize, etc.

Sun Dec 12 2004
KPresenter people swiftly fixed the DCOP bug with individual shapes, meaning you have complete access to individual shapes now.
Fulfilled a couple of todos and added more comments - will generate some documentation soon.

Thu Dec 9 2004
Added insertEllipse function. insertImage coming up next..
Added a few functions to the base KPresenterShape class. You can now get and set the shadow of a shape's color and size, as well as move the object and resize it.
Again, there are a few issues with how KPresenter deals with individual dcop objects like slides and shapes. I'm gonna try and notify developer about it, but until then you may have some issues manipulating more than one shape directly.


Wed Dec 8 2004
Uploaded version 0.2. You can now insert rectangles into KPresenter slides, but due to a bug in KPresenter you'll have to wait for the next version of KOffice (or build it from CVS) before you can choose which slide the inserted shape goes on (it goes onto the active slide, whatever slide you choose otherwise).

matt2002

13 years ago

This is very helpful!

Waiting for the kword stuff now, that's what I need to use.

Thanks,
Matt

Report

scobiej

13 years ago

Just some encouragement. Great work. Being able to add these components into PyQt apps is fantastic. Haven't tried it but I soon will.
People question the need for a seperate KDE office suite but tight integration like this with python is just one more reason. Obviously, C++, DCOP etc. can be used but python is just so much easier.

Report

C

cerulean

13 years ago

Thanks :-)
I'll keep it going. KWord stuff coming up next.

If anyone has any suggestions for something they'd like added to this module, please say so. While it may seem like things are limited to what the DCOP interface provides, this is not so. A lot of things are hacked together - selecting all the text in frames is one, getting a list of a range of cells is another.
If you have an idea, just mention it.

Report

13 years ago

Message stated, officially burying the project. Changed license to LGPL.

Sun Feb 13 2005 (afternoon)
0.5-pre1 released. KWord class now functional - you can insert/append/set text in the frame, get the text in the frame, add sections of bold/italic/striked-out text. There are a few known issues, one pertaining to setting color and one pertaining to checking whether or not text is striked out. When they have been resolved (along with other bugs that will no doubt pop up) 0.5 will be released.


Sun Feb 13 2005
Precompiled dcoppython compiled with --disable-debug.

Sat Feb 12 2005
Included pcop.so in the libs dir.. funny this hasn't been pointed out as missing.

Wed Dec 22 2004
Added insertImage function to the KPresenterSlide object, as well as insertText. The KPresenterTextBox class has many functions for changing the color of text, rich text styling.
All visible items on a slide now inherit from KPresenterObject which means all shapes/images/textboxes can move, have shadows, resize, etc.

Sun Dec 12 2004
KPresenter people swiftly fixed the DCOP bug with individual shapes, meaning you have complete access to individual shapes now.
Fulfilled a couple of todos and added more comments - will generate some documentation soon.

Thu Dec 9 2004
Added insertEllipse function. insertImage coming up next..
Added a few functions to the base KPresenterShape class. You can now get and set the shadow of a shape's color and size, as well as move the object and resize it.
Again, there are a few issues with how KPresenter deals with individual dcop objects like slides and shapes. I'm gonna try and notify developer about it, but until then you may have some issues manipulating more than one shape directly.


Wed Dec 8 2004
Uploaded version 0.2. You can now insert rectangles into KPresenter slides, but due to a bug in KPresenter you'll have to wait for the next version of KOffice (or build it from CVS) before you can choose which slide the inserted shape goes on (it goes onto the active slide, whatever slide you choose otherwise).

product-maker 28 94

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling me
Details
license
version
0.5
updated May 01 2006
added Dec 08 2004
downloads today
0
page views today 0
System Tags app software