From c1080f94a49bdb1a036703825cd21ab3f9ca6775 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 22 May 2019 14:14:55 -0700 Subject: arxiv abstracts latex hack --- python/fatcat_web/routes.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/fatcat_web/routes.py') diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 6e1d2351..1a743b7b 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -277,6 +277,10 @@ def release_view(ident): # index=None go to end of list) authors = [c for c in entity.contribs if c.role in ('author', None)] authors = sorted(authors, key=lambda c: (c.index == None and 99999999) or c.index) + # hack to show plain text instead of latex abstracts + if entity.abstracts: + if 'latex' in entity.abstracts[0].mimetype: + entity.abstracts.reverse() return render_template('release_view.html', release=entity, authors=authors, container=entity.container) -- cgit v1.2.3