MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / main

Function main

scripts/fetch_imdrf_fulltext.py:220–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218
219
220def main():
221 with open(INDEX_PATH, "r", encoding="utf-8") as f:
222 index = json.load(f)
223
224 entries = index.get("entries", [])
225 print(f"IMDRF Index: {len(entries)} entries")
226 print(f"Output dir: {OUTPUT_DIR}")
227 OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
228
229 success = 0
230 skipped = 0
231 failed = 0
232
233 for entry in entries:
234 result = process_entry(entry)
235 if result is True:
236 success += 1
237 time.sleep(2)
238 elif result is False:
239 if (OUTPUT_DIR / f"{entry['id']}.md").exists():
240 skipped += 1
241 else:
242 failed += 1
243
244 print(f"\nDone: {success} converted, {skipped} skipped, {failed} failed")
245
246
247if __name__ == "__main__":

Callers 1

Calls 2

getMethod · 0.80
process_entryFunction · 0.70

Tested by

no test coverage detected