This was heavily inspired by the youtube-dl/yt-dlp features that allow you to download stuff to the stdout instead of files. This is also how ffmpeg logs their stuff(everything goes to the stderr).
I propose redirecting all of the logs to stderr and add an option to download files to stdout.
This feature essentially allows users of the scdl that embed scdl into their projects to redirect the stdout to a buffer using the contextlib.redirect_stdout function and then directly use the buffer without any overhead from the I/O operations. So basically via this trick instead of downloading to a file you're downloading to a buffer, very neat if you ask me.
I would be happy to implement that but before implementing I wanted to ask what you guys, the maintainers think about such changes. From the user perspective of the CLI tool I don't think anything would change for them, but this might change stuff for people who are embedding scdl in their projects not directly but via calling the cli tool.
This was heavily inspired by the youtube-dl/yt-dlp features that allow you to download stuff to the stdout instead of files. This is also how ffmpeg logs their stuff(everything goes to the stderr).
I propose redirecting all of the logs to stderr and add an option to download files to stdout. This feature essentially allows users of the scdl that embed scdl into their projects to redirect the stdout to a buffer using the
contextlib.redirect_stdout
function and then directly use the buffer without any overhead from the I/O operations. So basically via this trick instead of downloading to a file you're downloading to a buffer, very neat if you ask me.I would be happy to implement that but before implementing I wanted to ask what you guys, the maintainers think about such changes. From the user perspective of the CLI tool I don't think anything would change for them, but this might change stuff for people who are embedding scdl in their projects not directly but via calling the cli tool.