changeset 78:fef49258d738

include query
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Sun, 20 Aug 2023 00:28:43 +0100
parents bf09a1d80d7b
children 120d90b47d74
files bin/sort_date.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/sort_date.py	Fri Aug 18 18:25:54 2023 +0100
+++ b/bin/sort_date.py	Sun Aug 20 00:28:43 2023 +0100
@@ -39,12 +39,13 @@
       epoch = 32535215999.0
     parts = urlsplit(uri)
     nl = parts.netloc
+    pq = '?%s'%parts.query if parts.query else '';
     #print('nl',nl,file=sys.stderr)
     if ':' in nl:
       pa,pp=nl.split(':')
-      return ('%s:%s)%s'%(auth(pa), pp, parts.path),epoch)
+      return ('%s:%s)%s%s'%(auth(pa), pp, parts.path, pq),epoch)
     else:
-      return ('%s)%s'%(auth(nl), parts.path),epoch)
+      return ('%s)%s'%(auth(nl), parts.path, pq),epoch)
   except (TypeError,IndexError,ValueError) as e:
     print(dateTime.rstrip(),e,sep='\t',file=sys.stderr)
     return