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

Function parser

scripts/extract_source_text.py:36–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def parser() -> argparse.ArgumentParser:
37 p = argparse.ArgumentParser(description=__doc__ or "extract source text")
38 p.add_argument(
39 "--input",
40 required=True,
41 help="Fetch JSON path, metadata JSON path, local PDF path, JSON string, or reference.",
42 )
43 p.add_argument("--output", default="", help="Source manifest JSON output path.")
44 p.add_argument(
45 "--raw-sections-output",
46 default="",
47 help="Canonical raw sections JSONL output path.",
48 )
49 p.add_argument("--full-text-output", default="", help="Optional derived Markdown output path.")
50 p.add_argument("--paper-id", default="", help="Canonical paper id if already known.")
51 p.add_argument(
52 "--max-pages",
53 type=int,
54 default=None,
55 help="Optional page limit. Omit for all pages.",
56 )
57 return p
58
59
60def ensure_record(input_value: str) -> dict[str, Any]:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected