MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / get_paper_by_doi

Function get_paper_by_doi

skills/storage-helper/scripts/db_ops.py:773–784  ·  view source on GitHub ↗

Get paper by doi

(doi: str)

Source from the content-addressed store, hash-verified

771
772
773def get_paper_by_doi(doi: str) -> Optional[Dict]:
774 """Get paper by doi"""
775 conn = get_connection()
776 cursor = conn.cursor()
777 cursor.execute("""
778 SELECT * FROM papers WHERE doi = ?
779 """, (doi,))
780 row = cursor.fetchone()
781 conn.close()
782 if row:
783 return _build_paper_dict(row)
784 return None
785
786
787def get_unpushed_papers(limit: int = 100) -> List[Dict]:

Callers

nothing calls this directly

Calls 5

_build_paper_dictFunction · 0.85
cursorMethod · 0.80
get_connectionFunction · 0.70
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected