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

Can't capture output as stdout/stderr #99

Open
bhartshorn opened this issue Sep 30, 2023 · 1 comment
Open

Can't capture output as stdout/stderr #99

bhartshorn opened this issue Sep 30, 2023 · 1 comment
Labels
question Further information is requested

Comments

@bhartshorn
Copy link

bhartshorn commented Sep 30, 2023

Hello again,

This issue could be solved a couple ways: mostly I'm trying to import some large number of files and clear (delete) them if they are already imported. oxyromon currently prints "Already imported" to the terminal and does basically nothing. I hoped the -f flag would re-import and delete the file, but that's not the behavior I'm seeing. Second attempt was to capture the stdout/stderr of oxyromon and just search the output, and delete the file if it's already been imported. But capturing the output returns nothing, it seems because the output is all done through the indicatif progressbar library, which the docs state:

if a non terminal is detected the progress bar will be completely hidden. This makes piping programs to logfiles make sense out of the box.

So this is intended behavior, but makes it very hard to use oxyromon in a script. So, can I request either some more options around importing (i.e. deleting the file if it's already imported), or to use some other method of outputting status so that it's useful in a scripting context?

Thanks!

@alucryd
Copy link
Owner

alucryd commented Oct 2, 2023

Actually it sounds the -t flag should already achieve what you want. I need to update the doc to explain it trashes invalid and duplicate ROMs.
As for -f it was the intended behavior to replace an existing ROM, so that's probably a bug. Is it easily reproducible?

@alucryd alucryd added the question Further information is requested label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants