Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-interactive mode #38

Open
kawasaki-kanagawa opened this issue Nov 15, 2023 · 1 comment
Open

Non-interactive mode #38

kawasaki-kanagawa opened this issue Nov 15, 2023 · 1 comment

Comments

@kawasaki-kanagawa
Copy link

This is more of a question: is any interest to support non-interactive mode? I'm setting up kojirou to be run on-demand via CI pipeline and found some parts which I wish work differently (and I'm happy to contribute the changes as well as Woodpecker CI plugin if desired). Cheers!

Progress bar output

Progress bar output on non-interactive tty is effectively gibberish.

  1. Would be nice if the progress bar output would switch to something simpler when the program detects it's running in non-interactive mode.

  2. On the same note but to the opposite direction, would be fantastic if program can output color text when it detects CI environment variable — modern CI systems support color, but not "delete" characters. Something along the lines of:

    if os.Getenv("CI") != "" {
      color.NoColor = false;
    }

External store

Because of on-demand download in ephemeral runner, I would want to have the books to be stored in external storage such as S3.

Right now, my pipeline goes from kojirou to Rclone, which is fine except kojirou does not take advantage of whether some volumes can be skipped. While I can hack on it to be wrapped further, I think this would be a pretty neat feature to be built in the program.

@leotaku
Copy link
Owner

leotaku commented Nov 15, 2023

Would be nice if the progress bar output would switch to something simpler when the program detects it's running in non-interactive mode.

Yeah, that does sound like a good idea. The full progress bar should probably only be drawn if the output is a TTY.

On the same note but to the opposite direction, would be fantastic if program can output color text when it detects CI environment variable — modern CI systems support color, but not "delete" characters. Something along the lines of:

Probably a no on that one. Seems like a bad idea to assume that running in CI means that colors are supported. Maybe we could support a new option or something like CLICOLORS, but even that seems like it's probably not worth the additional code, seeing how colors in a CI environment seems like a very niche use-case.

External store

Probably a no for me as well, as this would almost certainly require additional dependencies and code. Maybe you could mount your external storage as a FUSE filesystem to achieve the desired effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants