MCPcopy
hub / github.com/VectifyAI/PageIndex / _rebuild_meta

Method _rebuild_meta

pageindex/client.py:170–179  ·  view source on GitHub ↗

Scan individual doc JSON files and return a meta dict.

(self)

Source from the content-addressed store, hash-verified

168 self.documents[doc_id].pop('pages', None)
169
170 def _rebuild_meta(self) -> dict:
171 """Scan individual doc JSON files and return a meta dict."""
172 meta = {}
173 for path in self.workspace.glob("*.json"):
174 if path.name == META_INDEX:
175 continue
176 doc = self._read_json(path)
177 if doc and isinstance(doc, dict):
178 meta[path.stem] = self._make_meta_entry(doc)
179 return meta
180
181 def _read_meta(self) -> dict | None:
182 """Read and validate _meta.json, returning None on any corruption."""

Callers 2

_save_metaMethod · 0.95
_load_workspaceMethod · 0.95

Calls 2

_read_jsonMethod · 0.95
_make_meta_entryMethod · 0.95

Tested by

no test coverage detected