On Fri, 2004-12-03 at 00:33 -0500, Matt Price wrote: > Do you create forms for data-entry using python? I am looking for a > database solution that integrates closely with OOo, but I find the > form-creation tools in OOo to be a little bit clumsy. An ideal > solution for me would be a great data-entry frontend, and python glue > that takes the data and uses it to create or modify openoffice > documents using the PyUNO bridge (have to use non-debian OOo packages to > do that right now, but that should change sometime soon).
I have done a couple of different things with python + OOo + databases, my typical approach to document generation is to create templates with OOo and use python to do very simple text substitution within the document. This is great for reports, forms, labels etc. If you unpack a .sxw file and take a look at the content.xml (run it through xmllint --format to browse it easily, and xmllint --noblanks afterward to appease OOo) it becomes apparent that you can do just about anything you want using text/xml processing tool of your choice. Sounds like a lot of work, but it's really not much more complicated than generating html. You can grab the (very simple) code at http://mrroach.okmaybe.com/software/oootemplate.py.txt As for the gui, I have used either wxGlade + wxPython (on windows) or glade + pygtk (on linux). I have also used PyUNO to do document rendering, I use the above method to create a document, then send it through a listening OOo process to generate a PDF which gets uploaded to a CUPS queue. I'll have to rummage through my files to find some examples. Email me off-list if you are interested. -Mark -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]