Added extension checking when importing file
This commit is contained in:
parent
ea53e0720f
commit
1420cf37a9
6
main.py
6
main.py
@ -98,7 +98,11 @@ def addFile(src):
|
|||||||
"""
|
"""
|
||||||
Add a file to the library
|
Add a file to the library
|
||||||
"""
|
"""
|
||||||
doi = PDF2Doi(src)
|
# TODO : Handle books + djvu
|
||||||
|
if src.endswith(".pdf"):
|
||||||
|
doi = PDF2Doi(src)
|
||||||
|
elif src.endswith(".djvu"):
|
||||||
|
raise Exception("TODO")
|
||||||
|
|
||||||
if doi is False:
|
if doi is False:
|
||||||
print("Could not determine the DOI for "+src+", switching to manual " +
|
print("Could not determine the DOI for "+src+", switching to manual " +
|
||||||
|
Loading…
Reference in New Issue
Block a user