diff --git a/irclog.py b/irclog.py index 34c2602..c6320b4 100644 --- a/irclog.py +++ b/irclog.py @@ -945,6 +945,11 @@ class WebServer: date = datetime.datetime.strptime(request.match_info['date'], '%Y-%m-%d').replace(tzinfo = datetime.timezone.utc) dateStart = date.timestamp() dateEnd = (date + datetime.timedelta(days = 1)).timestamp() + channelLinks = ' '.join([ + f'Search', + f'Previous day', + f'Next day', + ]) #TODO Implement this in a better way... fn = date.strftime('%Y-%m.log') lines = list(self._raw_to_lines(self._file_iter_with_path(os.path.join(self.config['storage']['path'], request.match_info["path"], fn), request.match_info["path"]), filter = lambda path, ts, command, content: dateStart <= ts <= dateEnd)) @@ -953,10 +958,11 @@ class WebServer: '', f'{html.escape(self._paths[request.match_info["path"]][0])} log for {date:%Y-%m-%d}{self.logStyleTag}', '', - f'Previous day ', - f'Next day', - '

', + f'

{channelLinks}

', + '
', self._render_log(lines), + '
', + f'

{channelLinks}

', '', '', ]),