joeyates / imap-backup

Backup and Migrate IMAP Email Accounts
MIT License
1.33k stars 74 forks source link

Provide short summary on "check" command #180

Closed MatejKovacic closed 8 months ago

MatejKovacic commented 8 months ago

I am running imap-backup local check and since I have a lot (and I mean really a lot) of IMAP folders, I have a couple of screens of output logs I need to check.

So it would be really nice if local check command would provide some kind of summary, like: "No errors detected" or "There are XX errors, please check the logs". Similar would also be nice to have similar summary from other commands.

And maybe that summary output should be stable in order to be parsed with bash tools...

Just an idea.

joeyates commented 8 months ago

Hi @MatejKovacic

local check has a --format json options which should help with this use case.

As an example of use of the JSON output, I've added contrib/list-failures-in-local-check.jq to the repo. It's a jq script which lists only those accounts and folders which have errors.