From 7d90315279d02b0d02d566a2b84231986bc43e59 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 4 Apr 2019 12:24:46 -0700 Subject: more citation styles, and tests --- python/fatcat_web/routes.py | 2 ++ python/fatcat_web/templates/release_view.html | 3 +++ 2 files changed, 5 insertions(+) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 8e07aff0..32a1837d 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -570,6 +570,8 @@ def release_citeproc(ident): cite = citeproc_csl(csl, style, is_html) if is_html: return Response(cite) + elif style == "csl-json": + return jsonify(json.loads(cite)) else: return Response(cite, mimetype="text/plain") diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index ef77360f..ff044c49 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -415,6 +415,9 @@
BibTeX +
CSL-JSON +
MLA +
Harvard
{% endif %} -- cgit v1.2.3