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

Function main

scripts/create_input_record.py:47–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47def main() -> None:
48 args = parser().parse_args()
49 record = {
50 "status": "ok",
51 "script": "create_input_record.py",
52 "title": normalize_whitespace(args.title),
53 "translated_title": normalize_whitespace(args.translated_title),
54 "authors": parse_json_list(args.authors_json),
55 "affiliations": parse_json_list(args.affiliations_json),
56 "year": normalize_whitespace(args.year),
57 "venue": normalize_whitespace(args.venue),
58 "doi": normalize_whitespace(args.doi),
59 "arxiv_id": normalize_whitespace(args.arxiv_id),
60 "source_url": normalize_whitespace(args.source_url),
61 "pdf_url": normalize_whitespace(args.pdf_url),
62 "local_pdf_path": normalize_whitespace(args.local_pdf_path),
63 "zotero_key": normalize_whitespace(args.zotero_key),
64 "abstract": normalize_whitespace(args.abstract),
65 "source_type": normalize_whitespace(args.source_type)
66 or ("zotero_seed" if normalize_whitespace(args.zotero_key) else "seed_record"),
67 "metadata_sources": ["zotero_seed"] if normalize_whitespace(args.zotero_key) else ["seed_record"],
68 }
69 record["paper_id"] = paper_id_for_record(record)
70 emit(record, args.output)
71
72
73if __name__ == "__main__":

Callers 1

Calls 5

normalize_whitespaceFunction · 0.90
paper_id_for_recordFunction · 0.90
emitFunction · 0.90
parse_json_listFunction · 0.85
parserFunction · 0.70

Tested by

no test coverage detected