aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-09-18 18:40:13 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-09-18 18:42:26 -0700
commit2e9194e0f2cf567ff719256fe80eb0d72b2434d7 (patch)
tree764af2718a0d071112affd58c0de4cd4873045f5 /python/fatcat_web
parent3e3f1c371c0f36b252315d07e788c37554170d89 (diff)
downloadfatcat-2e9194e0f2cf567ff719256fe80eb0d72b2434d7.tar.gz
fatcat-2e9194e0f2cf567ff719256fe80eb0d72b2434d7.zip
handle more external identifiers in python
This makes it possible to, eg, past an arxiv identifier or SHA-1 hash in the general search box and do a quick lookup.
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/routes.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 036dcea0..1213ce11 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -618,10 +618,14 @@ def generic_search():
return redirect(url_for('release_lookup', pmcid=clean_pmcid(query)))
if clean_sha1(query):
return redirect(url_for('file_lookup', sha1=clean_sha1(query)))
+ if clean_sha256(query):
+ return redirect(url_for('file_lookup', sha256=clean_sha256(query)))
if clean_issn(query):
return redirect(url_for('container_lookup', issnl=clean_issn(query)))
if clean_isbn13(query):
return redirect(url_for('release_lookup', isbn13=clean_isbn13(query)))
+ if clean_arxiv_id(query):
+ return redirect(url_for('release_lookup', arxiv=clean_arxiv_id(query)))
if clean_orcid(query):
return redirect(url_for('creator_lookup', orcid=clean_orcid(query)))