cleanup files, round 1
This commit is contained in:
parent
66302e0ded
commit
5001e9a808
4 changed files with 70 additions and 105 deletions
|
|
@ -194,6 +194,8 @@ def parse_path(path):
|
|||
|
||||
def sort_string(string):
|
||||
string = string.replace(u'Þ', 'Th')
|
||||
#pad numbered titles
|
||||
string = re.sub('(\d+)', lambda x: '%010d' % int(x.group(0)), string)
|
||||
return unicodedata.normalize('NFKD', string)
|
||||
|
||||
|
||||
|
|
@ -206,8 +208,6 @@ def sort_title(title):
|
|||
title = unicode(title)
|
||||
title = sort_string(title)
|
||||
|
||||
#pad numbered titles
|
||||
title = re.sub('(\d+)', lambda x: '%010d' % int(x.group(0)), title)
|
||||
return title.strip()
|
||||
|
||||
def get_positions(ids, pos):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue