Mercurial > hg > cc > cirrus_work
diff bin/sort_date.py @ 83:d92bd8527718
use surt instead of trying to create index term by hand
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Sat, 19 Aug 2023 16:33:23 -0400 |
parents | 7bbb14f6e394 |
children | c18c307cc325 |
line wrap: on
line diff
--- a/bin/sort_date.py Sat Aug 19 16:02:29 2023 -0400 +++ b/bin/sort_date.py Sat Aug 19 16:33:23 2023 -0400 @@ -5,6 +5,7 @@ import email.utils import sys from urllib.parse import urlsplit, unquote +from surt import surt import re # Thanks to https://stackoverflow.com/a/8776871 import locale @@ -37,6 +38,7 @@ epoch = email.utils.parsedate_to_datetime(dateTime).timestamp() except OverflowError: epoch = 32535215999.0 + return (surt(uri),epoch) parts = urlsplit(uri) nl = parts.netloc pq = '?%s'%parts.query if parts.query else '';