normalize names

This commit is contained in:
j 2016-01-08 16:14:09 +05:30
parent 84c15c690a
commit 71d8825783

View file

@ -12,6 +12,7 @@ from datetime import datetime
from PyPDF2 import PdfFileReader from PyPDF2 import PdfFileReader
import stdnum.isbn import stdnum.isbn
import ox
import settings import settings
from utils import normalize_isbn, find_isbns, get_language from utils import normalize_isbn, find_isbns, get_language
@ -176,7 +177,7 @@ def info(pdf):
d = data['date'] d = data['date']
data['date'] = '%s-%s-%s' % (d[:4], d[4:6], d[6:]) data['date'] = '%s-%s-%s' % (d[:4], d[4:6], d[6:])
if 'author' in data and isinstance(data['author'], str): if 'author' in data and isinstance(data['author'], str):
data['author'] = data['author'].split(', ') data['author'] = [ox.normalize_name(data['author'])]
return data return data
''' '''