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

How to use stdin? #1398

Closed
billksun opened this issue Jan 21, 2023 · 4 comments · Fixed by #1400
Closed

How to use stdin? #1398

billksun opened this issue Jan 21, 2023 · 4 comments · Fixed by #1400

Comments

@billksun
Copy link

I am trying to call out to sic from my program, feeding the image to sic via stdin. However, I keep getting the following error message:

Error: Unable select input/output mode: mode should either be simple xor glob

Inferring from the help message, I am assuming that when no --input or --glob-input is provided, sic will read from stdin, but that doesn't seem to be the case.

@foresterre
Copy link
Owner

foresterre commented Jan 21, 2023

Inferring from the help message, I am assuming that when no --input or --glob-input is provided, sic will read from stdin, but that doesn't seem to be the case.

You are correct; this seems to be a bug, I've created a PR which should resolve this in #1400.

Thanks for the report!

@bors bors bot closed this as completed in 4c2b29b Jan 21, 2023
@foresterre
Copy link
Owner

foresterre commented Jan 21, 2023

In this ascii cast I recorded an example of it working again: https://asciinema.org/a/3RXgxHh9N0JQPu4e0DpJ7VorV

NB: My linux test machine didn't have a gui attached, so I used chafa to preview the images from within the terminal. The recording itself doesn't seem to accept everything shown in the terminal, which is why the image previews (and terminal powerline) show some artifacts, beyond the inherent limitations of chafa.

edit: this is what it looks like for me:

an example image which shows that sic now can use an input read from the stdin once again

@foresterre
Copy link
Owner

Thanks once again for the report!

I've released https://github.com/foresterre/sic/releases/tag/v0.21.1 which should fix this issue.

@billksun
Copy link
Author

@foresterre , thanks for fixing and releasing the fix so quickly!

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

Successfully merging a pull request may close this issue.

2 participants