瀏覽代碼

Reverse search result order

master
JustAnotherArchivist 3 年之前
父節點
當前提交
359ec58637
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      irclog.py

+ 1
- 1
irclog.py 查看文件

@@ -914,7 +914,7 @@ class WebServer:
ln = int(ln)
ts = float(line.split(' ', 1)[0])
out.append((ts, fn, ln, path, line))
yield from (x[3:] for x in sorted(out, key = lambda y: y[0:3]))
yield from (x[3:] for x in sorted(out, key = lambda y: y[0:3], reverse = True))

def _raw_to_lines(self, f, filter = lambda path, dt, command, content: True):
# f: iterable producing tuples (path, line) where each line has the format '<ts> " " <command> " " <content>', <ts> is a float, <command> is one of the valid commands, and <content> is any str


Loading…
取消
儲存