mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 13:53:48 +01:00
Fix pubimport picture file extension
This commit is contained in:
parent
d13096959c
commit
c3b19c8f7a
@ -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)
|
Loading…
Reference in New Issue
Block a user