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

Method _setup_tracking

docx/scripts/document.py:933–952  ·  view source on GitHub ↗

Set up comment infrastructure in unpacked directory. Args: track_revisions: If True, enables track revisions in settings.xml

(self, track_revisions=False)

Source from the content-addressed store, hash-verified

931 # ==================== Private: Setup Methods ====================
932
933 def _setup_tracking(self, track_revisions=False):
934 """Set up comment infrastructure in unpacked directory.
935
936 Args:
937 track_revisions: If True, enables track revisions in settings.xml
938 """
939 # Create or update word/people.xml
940 people_file = self.word_path / "people.xml"
941 self._update_people_xml(people_file)
942
943 # Update XML files
944 self._add_content_type_for_people(self.unpacked_path / "[Content_Types].xml")
945 self._add_relationship_for_people(
946 self.word_path / "_rels" / "document.xml.rels"
947 )
948
949 # Always add RSID to settings.xml, optionally enable trackRevisions
950 self._update_settings(
951 self.word_path / "settings.xml", track_revisions=track_revisions
952 )
953
954 def _update_people_xml(self, path):
955 """Create people.xml if it doesn't exist."""

Callers 1

__init__Method · 0.95

Calls 4

_update_people_xmlMethod · 0.95
_update_settingsMethod · 0.95

Tested by

no test coverage detected