MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / validate_input

Function validate_input

script/run_paper2video_cli.py:168–175  ·  view source on GitHub ↗

Validate input PDF and return resolved path.

(input_str: str)

Source from the content-addressed store, hash-verified

166
167
168def validate_input(input_str: str) -> str:
169 """Validate input PDF and return resolved path."""
170 path = Path(input_str)
171 if not path.exists():
172 raise FileNotFoundError(f"Input file not found: {input_str}")
173 if path.suffix.lower() != ".pdf":
174 raise ValueError(f"Expected PDF file, got {path.suffix}")
175 return str(path.resolve())
176
177
178def create_output_dir(args) -> Path:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected