Open Office Tools is a set of program that allows you to easly connect to OpenOffice via Python Uno module. It provides interface to starting Open office for you, stoping it, and connecting. Other conversion tools like ods2csv, or xls2csv are being included as soon as you send me a link to them.
Installing ootools
You install ootools via you system package manger or via easy_install:
easy_install ootools
Starting OpenOffice
Start openoffice via this set of commands:
import ootools oor=ootools.OORunner() oor.start()
Connecting to OpenOffice
To connect to open office you just issue a connect statement:
import ootools oor=ootools.OORunner() oor.start() desktop=oor.connect() #Do something with the "Desktop" aka OpenOffice main document module.
Stopping OpenOffice
You stop OpenOffice via a stop statement:
oor.stop()
Tools
- We are waiting for people to send us patches or links to tools like ods2csv, xls2csv, etc...
For the latest changes see the readme file.
Troubleshooting
You can use the following commands to see if openoffice is running:
ps -ea | grep soffice netstat -atpen | grep soffice
Enjoy. Also Download at http://pypi.python.org/pypi/ootools/