On Sep 3, 2009, at 9:55 AM, Curtis Hovey wrote:
This is nice. I was thinking of doing this as a tales formatter like shorten: release/file/name/fmt:ellipse/32I will steal liberally from you example. I was planning to use kiko's thoughts. kiko: middle = len(str)/2 kiko: return s[:middle - 2] + "[...]" + s[middle+2] kiko: or something like thatkiko: taking care of the corner cases (len(s) < middle * 2, etc)
If I can reuse that for the <title> reverse breadcrumb shortener, that would be awesome.
The rule Martin and I came up with is this: <title> will be the reversed breadcrumbs, with each component separated by a colon, and truncated to say 20 characters.
-Barry
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

