KOffice python module

Developers Apps

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.0

Available as/for:
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:

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).


Ratings & Comments

3 Comments

matt2002

This is very helpful! Waiting for the kword stuff now, that's what I need to use. Thanks, Matt

scobiej

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.

cerulean

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.

Pling
0 Affiliates
Details
license
version 0.5
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

More Developers Apps from cerulean:

PyKHTML site-scraping library
cerulean
last update date: 18 years ago

Score 5.0

Other Developers Apps:

Oo-mox
actionless
last update date: 8 years ago

Score 6.5

KEXI
jstaniek
last update date: 7 years ago

Score 6.5

BlackAdder
appy
last update date: 20 years ago

Score 5.0

Wing IDE Professional
sdeibel
last update date: 15 years ago

Score 5.0

Quanta Gold
appy
last update date: 20 years ago

Score 5.0

Codie
elgunvo
last update date: 15 years ago

Score 5.0



System Tags