MCPcopy Create free account
hub / github.com/SpaceZephyr/myskill / _add_to_comments_extensible_xml

Method _add_to_comments_extensible_xml

docx/scripts/document.py:1118–1129  ·  view source on GitHub ↗

Add a single comment to commentsExtensible.xml.

(self, durable_id)

Source from the content-addressed store, hash-verified

1116 editor.append_to(root, xml)
1117
1118 def _add_to_comments_extensible_xml(self, durable_id):
1119 """Add a single comment to commentsExtensible.xml."""
1120 if not self.comments_extensible_path.exists():
1121 shutil.copy(
1122 TEMPLATE_DIR / "commentsExtensible.xml", self.comments_extensible_path
1123 )
1124
1125 editor = self["word/commentsExtensible.xml"]
1126 root = editor.get_node(tag="w16cex:commentsExtensible")
1127
1128 xml = f'<w16cex:commentExtensible w16cex:durableId="{durable_id}"/>'
1129 editor.append_to(root, xml)
1130
1131 # ==================== Private: XML Fragments ====================
1132

Callers 2

add_commentMethod · 0.95
reply_to_commentMethod · 0.95

Calls 2

get_nodeMethod · 0.80
append_toMethod · 0.45

Tested by

no test coverage detected