ccremer / paperless-cli

CLI tool to interact with paperless-ngx remote API
GNU General Public License v3.0
7 stars 2 forks source link

Allow non-colored output #56

Open cdoepmann opened 6 months ago

cdoepmann commented 6 months ago

Currently, paperless-cli seems to unconditionally use colors for its output which makes the output unreadable in my setup (I am using the solarized theme):

2024-01-24_09-49

While handling such edge cases may be out of scope for this tool, it would be nice to add an option to use uncolored output so the tool can be used in such environments. Also, I noticed that colors are used even if the output is redirected to a file etc. I would suggest only enabling output colors by default if stdout goes to a terminal, as is done by many other tools and probably the best practice when offering colored output.

ccremer commented 6 months ago

Hi. I'm using a 3rd-party library to handle logging and its colored output formatting. I want to transition to the new Go structured logging feature, but this library doesn't yet fully support it. So I'm awaiting https://github.com/pterm/pterm/issues/603 to get resolved first, otherwise I might end up doing the same effort twice after switching to the new logging stack.