From f4aec13ba6483e8fb408337ca0500c65dcf6eedf Mon Sep 17 00:00:00 2001 From: Lionel Dricot Date: Fri, 24 Dec 2021 14:52:55 +0100 Subject: [PATCH] access time added in title when offline --- av98.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/av98.py b/av98.py index 7637d9d..d618b27 100755 --- a/av98.py +++ b/av98.py @@ -1055,6 +1055,10 @@ you'll be able to transparently follow links to Gopherspace!""") tmpf = tempfile.NamedTemporaryFile("w", encoding="UTF-8", delete=False) self.idx_filename = tmpf.name title = menu_gi.title + if menu_gi.is_cache_valid() and self.offline_only: + last_modification = os.path.getmtime(menu_gi.cache_path) + str_last = time.ctime(last_modification) + title += " \x1b[0;31m(last accessed on %s)"%str_last tmpf.write("\x1b[31m\x1b[1m"+ title + "\x1b[0m""\n") for line in body.splitlines(): if line.startswith("```"):