Commit 3e44019b authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Add bibtex entry to API

parent 2ce3efbe
......@@ -262,9 +262,15 @@ def clean_floats(d):
return new_d
def get_entry_json(entry):
bibtex = []
for i in range(len(entry.citation)):
fname = f"./cache/bibtex/{entry.name}/{i}.bib"
if os.path.exists(fname):
bibtex.append(open(fname).read())
return dict(title=entry.title,
description=entry.description,
citation=entry.citation,
bibtex=bibtex,
url=entry.url,
restricted=entry.restricted,
tags=entry.tags,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment