- def store(self, author, content, timestamp=None):
+ def _collapse_author(self, author):
+ """ Renvoie ``author`` avec la casse déjà utilisée si il a déjà été quoté
+ sinon, le renvoie sans le modifier. """
+ authors = list(set([q.author for q in self.quotelist if q.author.lower() == author.lower()]))
+ if len(authors) > 1:
+ print "Warning : authors %s" % authors
+ if authors:
+ return authors[0]
+ else:
+ return author
+
+ def get_clash_authors(self):
+ """ Renvoie une liste de liste d'auteurs qui sont enresgitrés avec des casses différentes. """
+ authors = list(set([q.author for q in self.quotelist]))
+ authors = equivalence_partition(authors, lambda x,y: x.lower() == y.lower())
+ authors = [list(c) for c in authors if len(c) > 1]
+ return authors
+
+ def store(self, timestamp=None, **kwargs):