ootools and openoffice.org headless with 3.2.1 WOW

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ootools and openoffice.org headless with 3.2.1 WOW

Lukasz Szybalski
Hello,
Finally after few months of waiting the openoffice.org 3.2.1 is here
in lenny backports. The speed improvement in that version are just
insane fast. The response time compared to 3.1.1 is just amazing.
Congrats to OO team.

 So if you are into doing some kind of templates here is how to use
openoffice in the code without touching ui !

Install ootools program: (http://pypi.python.org/pypi/ootools/0.1dev)
easy_install ootools

Then in python:

import ootools
oor=ootools.OORunner()
oor.start()
desktop=oor.connect()
#......
oor.stop()

The ootools start and stop the openoffice.org --hedless mode for you.
This is a great tool for creating templates. In my case I use it with
sqlalchemy to loop through records and create odt documents for each
record that then get it printed and mailed.

Few helpful links on how to write code for headless mode:
http://lucasmanual.com/mywiki/OpenOffice

Thank you,
Lucas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: ootools and openoffice.org headless with 3.2.1 WOW

Gabriel Monnerat
On 12-11-2010 20:10, Lukasz Szybalski wrote:
> Hello,
>    
hi Lucas

> Finally after few months of waiting the openoffice.org 3.2.1 is here
> in lenny backports. The speed improvement in that version are just
> insane fast. The response time compared to 3.1.1 is just amazing.
> Congrats to OO team.
>
>   So if you are into doing some kind of templates here is how to use
> openoffice in the code without touching ui !
>
> Install ootools program: (http://pypi.python.org/pypi/ootools/0.1dev)
> easy_install ootools
>
> Then in python:
>
> import ootools
> oor=ootools.OORunner()
> oor.start()
> desktop=oor.connect()
> #......
> oor.stop()
>
> The ootools start and stop the openoffice.org --hedless mode for you.
> This is a great tool for creating templates. In my case I use it with
> sqlalchemy to loop through records and create odt documents for each
> record that then get it printed and mailed.
>    
Do you have idea or implementation to control memory leak?

I developed one Web Service that controls one OpenOffice.org and many
problems occurs when you use to large scale.
The code is in: http://svn.erp5.org/erp5/trunk/utils/cloudooo/
http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/application/openoffice.py?view=markup
> Few helpful links on how to write code for headless mode:
> http://lucasmanual.com/mywiki/OpenOffice
>    
congrats

Regards,
> Thank you,
> Lucas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>    


--
Gabriel M. Monnerat

Reply | Threaded
Open this post in threaded view
|

Re: ootools and openoffice.org headless with 3.2.1 WOW

Lukasz Szybalski
On Sat, Nov 13, 2010 at 1:14 PM, Gabriel Monnerat
<[hidden email]> wrote:

> On 12-11-2010 20:10, Lukasz Szybalski wrote:
>>
>> Hello,
>>
>
> hi Lucas
>>
>> Finally after few months of waiting the openoffice.org 3.2.1 is here
>> in lenny backports. The speed improvement in that version are just
>> insane fast. The response time compared to 3.1.1 is just amazing.
>> Congrats to OO team.
>>
>>  So if you are into doing some kind of templates here is how to use
>> openoffice in the code without touching ui !
>>
>> Install ootools program: (http://pypi.python.org/pypi/ootools/0.1dev)
>> easy_install ootools
>>
>> Then in python:
>>
>> import ootools
>> oor=ootools.OORunner()
>> oor.start()
>> desktop=oor.connect()
>> #......
>> oor.stop()
>>
>> The ootools start and stop the openoffice.org --hedless mode for you.
>> This is a great tool for creating templates. In my case I use it with
>> sqlalchemy to loop through records and create odt documents for each
>> record that then get it printed and mailed.
>>
>
> Do you have idea or implementation to control memory leak?
>
> I developed one Web Service that controls one OpenOffice.org and many
> problems occurs when you use to large scale.
> The code is in: http://svn.erp5.org/erp5/trunk/utils/cloudooo/
> http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/application/openoffice.py?view=markup

The memory leak is fixed but I can't remember which version ticket
said it would be fixed in.

The way I go around the memory leak right now is to start and stop the service.
With about 100 page documents generation the memory goes to about 1GB
depending what you do, so I would recommend at least 3GB of ram. But
as soon as you
oor.stop()
then
oor.start()
Memory should clear. With the faster speed of new OO version this seem
to work good.

Thanks,
Lucas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]