CVS: tmda-cgi ChangeLog,1.38,1.39 EditList.py,1.4,1.5 THANKS,1.13,1.14 TODO,1.20,1.21
Gre7g Luterman <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tmda/tmda-cgi In directory sc8-pr-cvs1:/tmp/cvs-serv19505 Modified Files: ChangeLog EditList.py THANKS TODO Log Message: Change sort to be case insensative and added a domain sort feature. Index: ChangeLog =================================================================== RCS file: /cvsroot/tmda/tmda-cgi/ChangeLog,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- ChangeLog 31 May 2003 17:02:37 -0000 1.38 +++ ChangeLog 31 May 2003 18:11:10 -0000 1.39 @@ -3,6 +3,8 @@ * Changed installer/uninstaller to support multiple type of MAIL_TRANSFER_AGENT in a single install or uninstall skel directory. + * Change sort to be case insensative and added a domain sort feature. + 2003-05-29 Gre7g Luterman <[email protected]> * tmda-cgi 0.10 is released. Index: EditList.py =================================================================== RCS file: /cvsroot/tmda/tmda-cgi/EditList.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- EditList.py 23 May 2003 21:30:01 -0000 1.4 +++ EditList.py 31 May 2003 18:11:10 -0000 1.5 @@ -29,6 +29,16 @@ from TMDA import Defaults from TMDA import FilterParser +def DomainSort(a, b): + "Comparison function for domain sorter." + a = a.split("@", 1) + if len(a) < 2: a.append("") + a.reverse() + b = b.split("@", 1) + if len(b) < 2: b.append("") + b.reverse() + return cmp(" ".join(a), " ".join(b)) + def Show(): "Edit any plaintext list file." @@ -105,7 +115,11 @@ if Form.has_key("subcmd"): if Form["subcmd"].value == "sort": List = List.split("\n") - List.sort() + List.sort(lambda a, b: cmp(a.upper(), b.upper())) + List = "\n".join(List) + elif Form["subcmd"].value == "domsort": + List = List.split("\n") + List.sort(DomainSort) List = "\n".join(List) else: if Form.has_key("list"): Index: THANKS =================================================================== RCS file: /cvsroot/tmda/tmda-cgi/THANKS,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- THANKS 30 May 2003 04:01:26 -0000 1.13 +++ THANKS 31 May 2003 18:11:10 -0000 1.14 @@ -12,6 +12,8 @@ * Ben Bullock -- bug finding + * Dan Davis -- case insensative sorting + * Julian Easterling -- bug finding * Dan Egli -- bug finding @@ -28,6 +30,8 @@ * Remo Mattei -- bug finding + * Tomasz Nidecki -- sort by domain + * Kelvin D. Olson -- suggested adding UrlDomain and ShortUrlDom to the autoinstall variable list @@ -53,5 +57,5 @@ --------- * Alan Eldridge -- SpamCop Reporting Program (reporter.py) - + * Barry Warsaw -- Templated Webpage Generator (ht2html) Index: TODO =================================================================== RCS file: /cvsroot/tmda/tmda-cgi/TODO,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- TODO 23 May 2003 23:31:36 -0000 1.20 +++ TODO 31 May 2003 18:11:10 -0000 1.21 @@ -15,7 +15,4 @@ * Search -- for pending list and/or lists and filters - * Sort -- Tomasz Nidecki suggested making a "sort by domain" button for - list editor - * Tutorial -- finish section on mailing lists _______________________________________ tmda-cvs mailing list http://tmda.net/lists/listinfo/tmda-cvs