Add "De" as unwanted title prefix
This commit is contained in:
parent
4198ea8a72
commit
be76bf4857
|
@ -38,6 +38,7 @@ class Command(BaseCommand):
|
||||||
if all(not unicodedata.category(char).startswith(cat)
|
if all(not unicodedata.category(char).startswith(cat)
|
||||||
for cat in {'M', 'P', 'Z', 'C'}) or char == ' '
|
for cat in {'M', 'P', 'Z', 'C'}) or char == ' '
|
||||||
).casefold().upper()
|
).casefold().upper()
|
||||||
|
title_normalized = re.sub(r'^DE ', '', title_normalized)
|
||||||
title_normalized = re.sub(r'^LE ', '', title_normalized)
|
title_normalized = re.sub(r'^LE ', '', title_normalized)
|
||||||
title_normalized = re.sub(r'^LA ', '', title_normalized)
|
title_normalized = re.sub(r'^LA ', '', title_normalized)
|
||||||
title_normalized = re.sub(r'^LES ', '', title_normalized)
|
title_normalized = re.sub(r'^LES ', '', title_normalized)
|
||||||
|
|
Loading…
Reference in New Issue