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

Function existing_domain_dirs

scripts/common.py:1474–1487  ·  view source on GitHub ↗
(config: dict[str, Any])

Source from the content-addressed store, hash-verified

1472
1473
1474def existing_domain_dirs(config: dict[str, Any]) -> list[str]:
1475 output_mode, root_path = resolve_note_output_mode(config)
1476 papers_dir = str(config.get("papers_dir", "Research/Papers")).strip() or "Research/Papers"
1477 base_dir = root_path / Path(papers_dir) if output_mode == "obsidian" else root_path
1478 if not base_dir.exists() or not base_dir.is_dir():
1479 return []
1480 names: list[str] = []
1481 for child in sorted(base_dir.iterdir()):
1482 if not child.is_dir():
1483 continue
1484 if is_probable_paper_folder(child):
1485 continue
1486 names.append(child.name)
1487 return names
1488
1489
1490def domain_name_score(domain_name: str, label: str, title: str, abstract: str) -> int:

Calls 2

resolve_note_output_modeFunction · 0.85
is_probable_paper_folderFunction · 0.85