Open drfho opened 4 months ago
The evaluation notebook of https://github.com/zms-publishing/ZMS/commit/1e726cda04f3e7235b5605e0e0718349139158dc in https://github.com/zms-publishing/ZMS/pull/288 contains some code- snippets to create a word file interacting directly with ZODB.
The notebook code is quite minimalistic to get objects attribute values by the rest_api public functions. @zmsdev: But template based content aggregration will result in "AttributeError: REQUEST" due to ZMSObject.isVisible(self, REQUEST) and its call of self.isActive(REQUEST), Line 502:
The function ObjAttrs.isActive() calls self.getType() and this will break, Line 551;
Traditionally ZMS uses the XML-represenation of it's content for (XSL-based) transforming it into 3rd-party formats like Word-XML. Instead using XSL (and its efforts with debugging) a direct, pythonic objekt transformation by the python-docx-library may be more practical especially with complex content-models . python-docx is a Python library for creating and updating Microsoft Word (.docx) files: https://python-docx.readthedocs.io/