MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / find_obsidian_candidates

Function find_obsidian_candidates

scripts/check_environment.py:25–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def find_obsidian_candidates() -> list[str]:
26 roots = [
27 Path.home() / "Documents",
28 Path.home() / "Desktop",
29 ]
30 results: list[str] = []
31 seen: set[str] = set()
32 for root in roots:
33 if not root.exists():
34 continue
35 try:
36 for path in root.rglob("*"):
37 if not path.is_dir():
38 continue
39 if path == root:
40 continue
41 name = path.name.lower()
42 if "obsidian" not in name and "vault" not in name:
43 continue
44 resolved = str(path.resolve())
45 if resolved in seen:
46 continue
47 seen.add(resolved)
48 results.append(resolved)
49 if len(results) >= 8:
50 return results
51 except Exception:
52 continue
53 return results
54
55
56def find_local_zotero_hints() -> list[str]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected