algoo / preview-generator

generates previews of files with cache management
https://pypi.org/project/preview-generator/
MIT License
229 stars 51 forks source link

Eliminating messages written to stdout #63

Closed buchs closed 4 years ago

buchs commented 5 years ago

preview-generator is printing some diagnostic info to stdout and an example is found below. I would like to get it to stop. Are these messages related to configuration issues or part of the package?

Context: Running Python 3.6.7 on Linux Mint 18.3.

$ cat /etc/os-release

NAME="Linux Mint" VERSION="18.3 (Sylvia)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 18.3" VERSION_ID="18.3" HOME_URL="http://www.linuxmint.com/" SUPPORT_URL="http://forums.linuxmint.com/" BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/" VERSION_CODENAME=sylvia UBUNTU_CODENAME=xenial

$ type python3.6

python3.6 is /usr/bin/python3.6

$ python3.6

Python 3.6.7 (default, Oct 25 2018, 09:16:13) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information.

>>> from preview_generator.manager import PreviewManager
>>> from pathlib import Path
>>> ROOT_DIRECTORY = Path('/home/buchs/Play').expanduser().resolve()
>>> THUMBNAIL_DIRECTORY = ROOT_DIRECTORY.joinpath('.thumbnails')
>>> preview = PreviewManager(THUMBNAIL_DIRECTORY, create_folder=True)

Skipping builder class [<class 'preview_generator.preview.generic_preview.OnePagePreviewBuilder'>]: method get_supported_mimetypes is not implemented Skipping builder class [<class 'preview_generator.preview.generic_preview.ImagePreviewBuilder'>]: method get_supported_mimetypes is not implemented Skipping builder class [<class 'preview_generator.preview.builder.document_generic.DocumentPreviewBuilder'>]: method get_supported_mimetypes is not implemented Builder <class 'preview_generator.preview.builder.document__scribus.DocumentPreviewBuilderScribus'> is missing a dependency:

buxx commented 5 years ago

Hello,

These outputs are currently generated by print instructions. There is no way to disable them by configuration. We will change it soon by replacing these print by logging.

lebouquetin commented 4 years ago

Already fixed. Closing.

melMass commented 3 years ago

Already fixed. Closing.

How do you set preview_generator's logging level? I still have those messages for formats I don't need