Compare commits

...

2 Commits

Author SHA1 Message Date
mieum 47262791fb add hedy's recent.txt to IGNORE
3 months ago
mieum 8583d2cf84 ignore script-updated web/gopher/gemini content
3 months ago

@ -18,6 +18,11 @@ import argparse
# default timespan shown (in days)
DAYS = 14
MARKER = "-" * 20
IGNORE = ["/home/mieum/public_gemini/rtc-recent",
"/home/mieum/public_gopher/rtc-recent",
"/home/mieum/public_html/rtc-recent",
"/home/hedy/public_gemini/recent.txt",
"/home/sloum/public_gemini/spacewalk.gmi"]
parser = argparse.ArgumentParser(description='Python rewrite of the venerable "recent" utility for RTC')
parser.add_argument("-c", "--compatible", help="Emulates behaviour of the standard 'recent'", action="store_true")
@ -36,6 +41,7 @@ sparser.add_argument("-S", "--exclude-service", metavar="SERVICE", help="Comma s
filters.add_argument("--since", metavar="TIME", help="Show items newer than TIME, provided in Unix time format")
args = parser.parse_args()
def get_files():
services = dict([
('gab','.gab'),
@ -204,10 +210,11 @@ for d in get_files():
st = datetime.datetime.fromtimestamp(ftim).strftime(timefmt)
out.append((st,d))
else:
ftim = os.stat(d[0]).st_mtime
if ftim > ts:
st = datetime.datetime.fromtimestamp(ftim).strftime(timefmt)
out.append((st,d))
if d[0] not in IGNORE:
ftim = os.stat(d[0]).st_mtime
if ftim > ts:
st = datetime.datetime.fromtimestamp(ftim).strftime(timefmt)
out.append((st,d))
if (not args.service or "cspc" in args.service) and (not args.exclude_service or "cspc" not in args.exclude_service):
db_path = '/usr/local/share/cspc/db/cspc'

Loading…
Cancel
Save