MCPcopy Index your code
hub / github.com/VectifyAI/PageIndex / _make_meta_entry

Method _make_meta_entry

pageindex/client.py:133–145  ·  view source on GitHub ↗

Build a lightweight meta entry from a document dict.

(doc: dict)

Source from the content-addressed store, hash-verified

131
132 @staticmethod
133 def _make_meta_entry(doc: dict) -> dict:
134 """Build a lightweight meta entry from a document dict."""
135 entry = {
136 'type': doc.get('type', ''),
137 'doc_name': doc.get('doc_name', ''),
138 'doc_description': doc.get('doc_description', ''),
139 'path': doc.get('path', ''),
140 }
141 if doc.get('type') == 'pdf':
142 entry['page_count'] = doc.get('page_count')
143 elif doc.get('type') == 'md':
144 entry['line_count'] = doc.get('line_count')
145 return entry
146
147 @staticmethod
148 def _read_json(path) -> dict | None:

Callers 2

_save_docMethod · 0.95
_rebuild_metaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected