0

I'm working on a Python program that takes in input data from a database and open document templates (either .ott or .odt files directly) with anchors.

I would like the program to be able to generate at output .odt files filled with data from the database.

How should I proceed? I saw there were a few libraries that allow to work with opendocument files in python, but most of them are old and no longer maintained. Some suggest to directly modify xml inside documents archives but it seems a bit hacky. I'm surprised that no mainstream library is able to work with opendocument files like so ... am I missing something?

Thank you

ibi0tux
  • 2,481
  • 4
  • 28
  • 49

1 Answers1

0

There are several ones but in my experience I enjoyed Odfpy as allows you to create and modify ODT files using Python. It provides a comprehensive API for working with ODT files, including support for text, images, tables, and more.

Abdulmajeed
  • 1,502
  • 2
  • 10
  • 13
  • I've seen Odfpy but the project seems to be no longer active, the last update was 3 years ago ... I'll have a further look anyway. – ibi0tux Feb 24 '23 at 22:10
  • Oh my bad l, I just made some research. There is one called ezodf that is like Odfpy never used it though – Abdulmajeed Feb 24 '23 at 22:23