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

No way to get the name/path of the received file when using --noconfirm/--yes #252

Open
virinci opened this issue Aug 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@virinci
Copy link

virinci commented Aug 12, 2024

It would be useful in scripts to get the received file name/path for doing further operations on it.
Info log such as [INFO ] Connected to rendezvous server. is printed on stderr so the received file path can be printed on the stdout.

@felinira
Copy link
Collaborator

Interesting idea. I think it would be worth it to have a --output-format command line flag to be able to have a more machine readable and stable output format like json. It could for example also return the wormhole code in a similar fashion, for use in further processing.

We should switch from log to tracing anyways, and this would allow us to use things like
https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/format/struct.Json.html

Events should go on stderr. Then we can still reserve the use of stdout for eg. piping a received file into a different command, or directly connecting network sockets etc. should we ever want to do this sort of thing.

See #253 for details on how to continue with the migration to tracing. Contributions welcome.

@felinira felinira added the enhancement New feature or request label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants