mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-29 20:55:21 +01:00
Better sorting of price.
This commit is contained in:
parent
673385edf8
commit
7ed397ca4d
1 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
__copyright__ = '2011, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import re
|
||||
from threading import Event, Thread
|
||||
from Queue import Queue
|
||||
|
||||
|
|
@ -202,6 +203,9 @@ def data_as_text(self, result, col):
|
|||
text = result.author
|
||||
elif col == 3:
|
||||
text = result.price
|
||||
if len(text) < 3 or text[-3] not in ('.', ','):
|
||||
text += '00'
|
||||
text = re.sub(r'\D', '', text)
|
||||
elif col == 4:
|
||||
text = result.store
|
||||
return text
|
||||
|
|
|
|||
Loading…
Reference in a new issue