Mercurial > kallithea
diff scripts/update-copyrights.py @ 8215:928bc1d8b279 default-i18n
Merge from default
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 06 Feb 2020 01:19:23 +0100 |
parents | f9988201a3c4 |
children | e63bcce18fef |
line wrap: on
line diff
--- a/scripts/update-copyrights.py Sun Jan 05 01:19:05 2020 +0100 +++ b/scripts/update-copyrights.py Thu Feb 06 01:19:23 2020 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @@ -42,7 +42,7 @@ import re from collections import defaultdict -import contributor_data +from . import contributor_data def sortkey(x): @@ -51,7 +51,7 @@ * first contribution * number of contribution years * name (with some unicode normalization) - The entries must be 2-tuples of a list of string years and the unicode name""" + The entries must be 2-tuples of a list of string years and the name""" return (x[0] and -int(x[0][-1]), x[0] and int(x[0][0]), -len(x[0]), @@ -100,6 +100,9 @@ for year, name in all_entries: if name in no_entries or (name, year) in no_entries: continue + parts = name.split(' <', 1) + if len(parts) == 2: + name = parts[0] + ' <' + parts[1].lower() domain = name.split('@', 1)[-1].rstrip('>') if domain in domain_extra: name_years[domain_extra[domain]].add(year)