This commit is contained in:
Phyks 2014-04-30 00:54:15 +02:00
parent 70d14cad5e
commit 741cde352e
2 changed files with 5 additions and 4 deletions

View File

@ -118,4 +118,4 @@ A list of ideas and TODO. Don't hesitate to give feedback on the ones you really
## Issues ? ## Issues ?
* Remove the watermarks on pdf files => done, some warning in okular on generated pdf, but seems ok. Seems to be a bug in PyPDF2. * Remove the watermarks on pdf files => done, some warning in okular on generated pdf, but seems ok. Seems to be a bug in Okular.

View File

@ -57,9 +57,10 @@ def findISBN(src):
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
bufsize=1) bufsize=1)
while totext.poll() == None: while totext.poll() is None:
extractfull = totext.stdin.readline() extractfull = totext.stdin.readline()
extractISBN = isbn_re.search(extractfull.lower().replace('Œ', '-')) extractISBN = isbn_re.search(extractfull.lower().replace('Œ',
'-'))
if extractISBN: if extractISBN:
totext.terminate() totext.terminate()
break break
@ -111,7 +112,7 @@ def findDOI(src):
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
while totext.poll() == None: while totext.poll() is None:
extractfull = totext.stdin.readline() extractfull = totext.stdin.readline()
extractDOI = doi_re.search(extractfull.lower().replace('Œ', '-')) extractDOI = doi_re.search(extractfull.lower().replace('Œ', '-'))
if not extractDOI: if not extractDOI: