10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-26 06:14:38 +01:00

Fix pubimport picture file extension

This commit is contained in:
Mickaël Véril 2021-11-09 10:35:16 +01:00 committed by Anthony Scemama
parent d13096959c
commit c3b19c8f7a

View File

@ -17,8 +17,6 @@ publipath=scriptpath.parents[1]/"static"/"data"/"publis"
result=crossref_commons.retrieval.get_publication_as_json(args.DOI) result=crossref_commons.retrieval.get_publication_as_json(args.DOI)
mydir=publipath.joinpath(*re.split("/|\.",args.DOI)) mydir=publipath.joinpath(*re.split("/|\.",args.DOI))
metadata=mydir/"metadata.json" metadata=mydir/"metadata.json"
abstract=mydir/"abstract.html"
picture=mydir/"picture.jpeg"
if not mydir.exists(): if not mydir.exists():
os.makedirs(str(mydir)) os.makedirs(str(mydir))
with open(str(metadata),"w") as f: with open(str(metadata),"w") as f:
@ -27,5 +25,5 @@ if args.abstract!=None:
abstract=mydir/"abstract.html" abstract=mydir/"abstract.html"
copyfile(args.abstract,abstract) copyfile(args.abstract,abstract)
if args.picture!=None: if args.picture!=None:
picture=mydir/"picture.html" picture=mydir/"picture.jpeg"
copyfile(args.picture,picture) copyfile(args.picture,picture)