lychee icon indicating copy to clipboard operation
lychee copied to clipboard

Have the output summary be optional, and just generate a list of the errors as the default

Open T145 opened this issue 4 years ago • 9 comments

Assume we just want to see errors and not the summary. Ties into #271.

OPTIONS:
    -s, --summary                    Show a small list detailing the query results.

T145 avatar Jun 25 '21 18:06 T145

So, the summary would not be shown by default?

mre avatar Jul 14 '21 14:07 mre

Probably it can depend on whether STDOUT is a terminal or not, so show the summary by default, when it is a terminal, hence most likely an interactive call, and hide it otherwise, when it is most likely a CI call or similar, where indeed often errors are all that is needed. But then -S, --no-summary could be required as well, consequently 🤔.

-s, --scheme <scheme>... btw reserves that short form already. Probably -q, --quite serves as a common alternative?

MichaIng avatar Jul 14 '21 14:07 MichaIng

Alternatively we could tie that into the verbose option: -v would give you the full status output, while by default it wouldn't. Not sure if I like that solution. 😅

mre avatar Jul 14 '21 15:07 mre

Jep, through about that, then moving output for each checked link to next verbosity level -vv, but somehow a summary behind a verbose flag feels wrong. Especially on interactive calls usually one expects some output to know that the command did something 🙂.

MichaIng avatar Jul 14 '21 16:07 MichaIng

So, the summary would not be shown by default?

The final summary table would not be shown. Valid links and what not would still be in the output.

T145 avatar Jul 17 '21 22:07 T145

There is a new, compact output format, which only shows a single summary line; see https://github.com/lycheeverse/lychee/pull/375. Does that work for you? If not, we can add a --format=quiet or --format=raw option, which would get rid of the final status line as well. It would be an easy thing to do, but it depends on your use-case.

mre avatar Nov 22 '21 14:11 mre

Ah, I re-read the original issue at #271. You mention machine-readable output. I guess --format=raw could work in this case and there is also --format=json.

mre avatar Nov 22 '21 14:11 mre

Having both options available would be nice.

T145 avatar Dec 01 '21 19:12 T145

Summary for future reference:

  • [ ] Add format=raw which skips the summary output.

mre avatar Mar 30 '22 12:03 mre