MCPcopy Create free account
hub / github.com/Qinbf/groundmap / find_orphans

Function find_orphans

scripts/k.py:447–458  ·  view source on GitHub ↗
(pages, backlinks)

Source from the content-addressed store, hash-verified

445
446
447def find_orphans(pages, backlinks):
448 out = []
449 for p in pages:
450 # 跳过根索引(它本身是最顶层)
451 if p.path == "wiki/root_index.md":
452 continue
453 # deprecated 页面没人引用是天经地义的(已被废弃),不算孤儿
454 if p.status == "deprecated":
455 continue
456 if p.path not in backlinks or len(backlinks[p.path]) == 0:
457 out.append(p)
458 return out
459
460
461def find_conflicts(pages):

Callers 2

health_reportFunction · 0.85
_main_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected