diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-12-24 15:56:07 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-12-24 15:56:07 -0800 |
commit | 035ac1480f3d3c69d771b7793e973d38ce1c561a (patch) | |
tree | 260908dd0c6d659863790ba0b826aae641012bf9 /python | |
parent | 4412e40237b97a75483bc37231dc497a06e5ef9f (diff) | |
download | fatcat-035ac1480f3d3c69d771b7793e973d38ce1c561a.tar.gz fatcat-035ac1480f3d3c69d771b7793e973d38ce1c561a.zip |
transform ingests via pmc/pmcid, not pubmed/pmid
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat_tools/transforms/ingest.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/fatcat_tools/transforms/ingest.py b/python/fatcat_tools/transforms/ingest.py index e08d56b8..d6393753 100644 --- a/python/fatcat_tools/transforms/ingest.py +++ b/python/fatcat_tools/transforms/ingest.py @@ -35,12 +35,12 @@ def release_ingest_request(release, oa_only=False, ingest_request_source='fatcat url = "https://doi.org/{}".format(release.ext_ids.doi) link_source = "doi" link_source_id = release.ext_ids.doi - elif release.ext_ids.pmcid and release.ext_ids.pmid: + elif release.ext_ids.pmcid: # TODO: how to tell if an author manuscript in PMC vs. published? #url = "https://www.ncbi.nlm.nih.gov/pmc/articles/{}/pdf/".format(release.ext_ids.pmcid) url = "http://europepmc.org/backend/ptpmcrender.fcgi?accid={}&blobtype=pdf".format(release.ext_ids.pmcid) - link_source = "pubmed" - link_source_id = release.ext_ids.pmid + link_source = "pmc" + link_source_id = release.ext_ids.pmcid if not url: return None @@ -48,7 +48,7 @@ def release_ingest_request(release, oa_only=False, ingest_request_source='fatcat ext_ids = release.ext_ids.to_dict() ext_ids = dict([(k, v) for (k, v) in ext_ids.items() if v]) - if oa_only and link_source not in ('arxiv', 'pubmed'): + if oa_only and link_source not in ('arxiv', 'pmc'): es = release_to_elasticsearch(release) if not es['is_oa']: return None |