diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-09-04 17:52:01 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-09-04 17:52:01 -0700 |
commit | 3bf706f07d68aaacebcbf08d21c7b4c4f91856ea (patch) | |
tree | b32bd11d7fb5091567c179877f9f5784c595faca /fatcat_scholar/schema.py | |
parent | 8ef87c02693a51b319249632e3219d8414ce8c13 (diff) | |
download | fatcat-scholar-3bf706f07d68aaacebcbf08d21c7b4c4f91856ea.tar.gz fatcat-scholar-3bf706f07d68aaacebcbf08d21c7b4c4f91856ea.zip |
heavy to refs command
Diffstat (limited to 'fatcat_scholar/schema.py')
-rw-r--r-- | fatcat_scholar/schema.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py index 3d402b4..f171716 100644 --- a/fatcat_scholar/schema.py +++ b/fatcat_scholar/schema.py @@ -178,6 +178,42 @@ class ScholarDoc(BaseModel): access: List[ScholarAccess] +class RefBiblio(BaseModel): + title: Optional[str] + subtitle: Optional[str] + contrib_raw_names: List[str] + year: Optional[int] + container_name: Optional[str] + volume: Optional[str] + issue: Optional[str] + pages: Optional[str] + doi: Optional[str] + pmid: Optional[str] + pmcid: Optional[str] + arxiv_id: Optional[str] + isbn13: Optional[str] + url: Optional[str] + + +class RefStructured(BaseModel): + biblio: RefBiblio + release_ident: Optional[str] + work_ident: Optional[str] + index: Optional[int] + key: Optional[str] + locator: Optional[str] + target_release_id: Optional[str] + ref_source: Optional[str] # grobid, crossref, pubmed, wikipedia, etc + + +class RefTarget(BaseModel): + biblio: RefBiblio + release_ident: Optional[str] + work_ident: Optional[str] + release_stage: Optional[str] + release_type: Optional[str] + + def clean_small_int(raw: Optional[str]) -> Optional[int]: if not raw or not raw.isdigit(): return None |