Minor modifications

This commit is contained in:
Sengian 2010-12-15 01:07:40 +01:00
parent a469a02ce7
commit 08eb0e1a59
3 changed files with 8 additions and 7 deletions

View File

@ -156,7 +156,7 @@ class Query(object):
if feed is None:
break
entries.extend(entry(feed))
return entries
return entries[:nbresultstoget]
class ResultList(list):
@ -183,7 +183,7 @@ class ResultList(list):
m = creator(entry)
return [x.text for x in m] if m else []
def get_author_sort(self, entry, verbose):
def get_author_sort(self, entry):
for x in creator(entry):
for key, val in x.attrib.iteritems():
if key.endswith('file-as'):
@ -216,6 +216,7 @@ class ResultList(list):
try:
return publisher(entry)[0].text
except:
report(verbose)
return None
def get_date(self, entry, verbose):
@ -241,7 +242,7 @@ class ResultList(list):
print e
authors = self.get_authors(x)
mi = MetaInformation(title, authors)
tmpautsort = self.get_author_sort(x, verbose)
tmpautsort = self.get_author_sort(x)
mi.author_sort = tmpautsort if tmpautsort \
else authors_to_sort_string(authors)
mi.comments = self.get_description(x, verbose)

View File

@ -203,7 +203,7 @@ class ResultList(list):
def get_description(self, entry, verbose):
try:
return u'RESUME:\n' + unicode(entry.getparent().xpath("//p[@id='book-description']")[0].text)
return _(u'SUMMARY:\n%s') % unicode(entry.getparent().xpath("//p[@id='book-description']")[0].text)
except:
report(verbose)
return None