| 23 | |
| 24 | |
| 25 | def 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 | |
| 56 | def find_local_zotero_hints() -> list[str]: |