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

Function default_pdf_path

scripts/common.py:1567–1572  ·  view source on GitHub ↗
(record: dict[str, Any], dest_dir: str | None = None)

Source from the content-addressed store, hash-verified

1565
1566
1567def default_pdf_path(record: dict[str, Any], dest_dir: str | None = None) -> Path:
1568 config = runtime_config()
1569 base_dir = Path(dest_dir or config["output_dir"]).expanduser().resolve() / "pdfs"
1570 base_dir.mkdir(parents=True, exist_ok=True)
1571 title = str(record.get("title") or record.get("paper_id") or "paper")
1572 return base_dir / f"{slugify_filename(title)}.pdf"
1573
1574
1575def default_assets_dir(record: dict[str, Any], dest_dir: str | None = None) -> Path:

Callers 1

mainFunction · 0.90

Calls 2

runtime_configFunction · 0.85
slugify_filenameFunction · 0.85

Tested by

no test coverage detected