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

Function source_image_filename

scripts/plan_figure_table_decisions.py:126–132  ·  view source on GitHub ↗
(plan_item: dict[str, Any])

Source from the content-addressed store, hash-verified

124
125
126def source_image_filename(plan_item: dict[str, Any]) -> str:
127 candidate = figure_asset_candidate(plan_item)
128 filename = normalize_whitespace(str(candidate.get("filename", "")))
129 if filename:
130 return filename
131 path = source_image_path(plan_item)
132 return path.rsplit("/", 1)[-1] if path else ""
133
134
135def should_insert(caption: dict[str, Any], plan_item: dict[str, Any], status: str) -> bool:

Callers 1

decideFunction · 0.85

Calls 3

normalize_whitespaceFunction · 0.90
figure_asset_candidateFunction · 0.85
source_image_pathFunction · 0.85

Tested by

no test coverage detected