Some articles don't have DOI / arXiv etc

This commit is contained in:
Phyks 2014-05-05 02:15:50 +02:00
parent e17c97bc4a
commit acd9cfb5e0

13
main.py
View File

@ -76,23 +76,24 @@ def addFile(src, filetype, manual):
tools.warning("Could not determine the DOI nor the arXiv id nor " + tools.warning("Could not determine the DOI nor the arXiv id nor " +
"the ISBN for "+src+"."+"Switching to manual entry.") "the ISBN for "+src+"."+"Switching to manual entry.")
doi_arxiv_isbn = '' doi_arxiv_isbn = ''
while doi_arxiv_isbn not in ['doi', 'arxiv', 'isbn']: while doi_arxiv_isbn not in ['doi', 'arxiv', 'isbn', 'manual']:
doi_arxiv_isbn = tools.rawInput("DOI / arXiv / ISBN? ").lower() doi_arxiv_isbn = tools.rawInput("DOI / arXiv " +
"/ ISBN / manual? ").lower()
if doi_arxiv_isbn == 'doi': if doi_arxiv_isbn == 'doi':
doi = tools.rawInput('DOI? ') doi = tools.rawInput('DOI? ')
elif doi_arxiv_isbn == 'arxiv': elif doi_arxiv_isbn == 'arxiv':
arxiv = tools.rawInput('arXiv id? ') arxiv = tools.rawInput('arXiv id? ')
else: elif doi_arxiv_isbn == 'isbn':
isbn = tools.rawInput('ISBN? ') isbn = tools.rawInput('ISBN? ')
elif filetype == 'article': elif filetype == 'article':
tools.warning("Could not determine the DOI nor the arXiv id for " + tools.warning("Could not determine the DOI nor the arXiv id for " +
src+", switching to manual entry.") src+", switching to manual entry.")
doi_arxiv = '' doi_arxiv = ''
while doi_arxiv not in ['doi', 'arxiv']: while doi_arxiv not in ['doi', 'arxiv', 'manual']:
doi_arxiv = tools.rawInput("DOI / arXiv? ").lower() doi_arxiv = tools.rawInput("DOI / arXiv / manual? ").lower()
if doi_arxiv == 'doi': if doi_arxiv == 'doi':
doi = tools.rawInput('DOI? ') doi = tools.rawInput('DOI? ')
else: elif doi_arxiv == 'arxiv':
arxiv = tools.rawInput('arXiv id? ') arxiv = tools.rawInput('arXiv id? ')
elif filetype == 'book': elif filetype == 'book':
tools.warning("Could not determine the ISBN for "+src + tools.warning("Could not determine the ISBN for "+src +