filter out bogus entries from user feels lists

Before:

    > your recorded feels, listed by date:

            [  0 ] 2021-01-31 (1 word)      (nopub)
            [  1 ] .202-10-214.txt (3 words)
            [  2 ] .202-10-131.txt (1 word)

            ( page 1 of 1; type 'u' or 'd' to scroll up and down)

    pick an entry from the list, or type 'q' to go back:

After:

    > your recorded feels, listed by date:

            [  0 ] 2021-01-31 (1 word)      (nopub)

            ( page 1 of 1; type 'u' or 'd' to scroll up and down)

    pick an entry from the list, or type 'q' to go back:
magical 2021-02-14 22:22:06 +00:00
parent 925b56bd20
commit 0dbeffe0a8
1 changed files with 2 additions and 1 deletions

View File

@ -854,6 +854,7 @@ def generate_feels_list(user):
entryDir = os.path.join("/home", user, ".ttbp", "entries")
for entry in os.listdir(entryDir):
if core.valid(entry):
filenames.append(os.path.join(entryDir, entry))
metas = core.meta(filenames)
metas.sort(key = lambda entry:entry[4])