resticprofile icon indicating copy to clipboard operation
resticprofile copied to clipboard

Output redirection & status monitor

Open jkellerer opened this issue 2 years ago • 6 comments

Work in progress:

  • [ ] Implement #153 for all commands (provide clean stdout redirection)
  • [ ] Auto enable "extended-status" if required or warn if status/prom feature is non-functional
  • [ ] Provide a console monitor (when "extended-status" output is enabled)
  • [ ] Update restic output parsers to cover current versions
  • [ ] Eval if prune, check, forget can be covered in output parsing

jkellerer avatar May 01 '23 14:05 jkellerer

Codecov Report

Patch coverage: 42.56% and project coverage change: -4.03 :warning:

Comparison is base (0c7405f) 76.65% compared to head (117f6f8) 72.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
- Coverage   76.65%   72.62%   -4.03%     
==========================================
  Files          88      104      +16     
  Lines        9482    10706    +1224     
==========================================
+ Hits         7268     7775     +507     
- Misses       1968     2649     +681     
- Partials      246      282      +36     
Impacted Files Coverage Δ
util/filewriter.go 0.00% <0.00%> (ø)
util/reader.go 0.00% <0.00%> (ø)
util/writer.go 0.00% <0.00%> (ø)
wrapper_stdout.go 0.00% <0.00%> (ø)
commands_display.go 24.90% <16.67%> (-14.79%) :arrow_down:
monitor/console/progress.go 21.38% <21.38%> (ø)
shell/analyser.go 90.00% <36.36%> (-5.08%) :arrow_down:
wrapper.go 83.48% <41.67%> (-0.51%) :arrow_down:
util/ansi/colors.go 44.44% <44.44%> (ø)
term/term.go 50.19% <49.50%> (+13.08%) :arrow_up:
... and 15 more

... and 6 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 01 '23 15:05 codecov[bot]

Provide a console monitor (when "extended-status" output is enabled)

I've been thinking about doing that for quite some time as well 😉

creativeprojects avatar May 01 '23 19:05 creativeprojects

Sorry didn't wan't to take it away, but it just fit too well into rethinking output handling. While the status monitor already works quite well, the output needs to be improved.

jkellerer avatar May 01 '23 20:05 jkellerer

Sorry didn't wan't to take it away, but it just fit too well into rethinking output handling. While the status monitor already works quite well, the output needs to be improved.

No problem 👍🏻 FYI I was thinking either copying the restic code used to display the progress, or go wild with a library like https://github.com/pterm/pterm

creativeprojects avatar May 02 '23 18:05 creativeprojects

... I was thinking I'd like to learn how it can be achieved, so I created it mostly from scratch. No external deps but maybe less smart.

256 colors could be supported and there's also an option to read the background on xterm to decide on the theme. Eventually this can be useful but for the moment I try to limit the amount of colors that are used. In the end it shouldn't be annoying.

jkellerer avatar May 02 '23 18:05 jkellerer

256 colors could be supported and there's also an option to read the background on xterm to decide on the theme. Eventually this can be useful but for the moment I try to limit the amount of colors that are used. In the end it shouldn't be annoying.

I agree. Too many colours is complicated to get right on both a light and dark background anyway.

creativeprojects avatar May 02 '23 18:05 creativeprojects