vgalin / html2image

A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.
MIT License
344 stars 44 forks source link

`--quiet` doesn't suppress output #59

Closed tilusnet closed 1 year ago

tilusnet commented 2 years ago

When I pass --quiet, the tool still spits out lots of info - presumably coming from the browser process? I expect a tool to have zero output when a "quiet" option is on.

Also, I couldn't find a quiet option in the Python API.

Is the command line / Python API not equivalent?

vgalin commented 2 years ago

At the moment, there is no way to disable the browser's output from both the CLI and Python package, it is feasible though and will be implemented in a later update. See #55.

Even if the goal is to keep the "interface" very similar between the CLI and the Python API, they are not completely equivalent in some ways. Indeed, CLIs often have quiet/verbose modes to control the amount of information that is automatically displayed after running a command, where you would have to print() them yourself while using the Python package.

For instance, with the CLI, the paths of the generated files are printed by default if the quiet flag is not set, while these paths are returned by the Html2Image.screenshot() method of the Python package.

ZeroHans4 commented 1 year ago

When will this be added? Looking forward to this :)

Would also donate

ZeroHans4 commented 1 year ago

I need to run this often and the ouput bothers me