AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning

This commit is contained in:
Krilly
2026-03-04 13:29:22 +00:00
parent 29a98137a7
commit 57dd294675
13706 changed files with 2114953 additions and 237629 deletions

View File

@@ -0,0 +1,40 @@
"""This is part of the MSS Python's module.
Source: https://github.com/BoboTiG/python-mss.
"""
import platform
from typing import Any
from mss.base import MSSBase
from mss.exception import ScreenShotError
def mss(**kwargs: Any) -> MSSBase:
"""Factory returning a proper MSS class instance.
It detects the platform we are running on
and chooses the most adapted mss_class to take
screenshots.
It then proxies its arguments to the class for
instantiation.
"""
os_ = platform.system().lower()
if os_ == "darwin":
from mss import darwin # noqa: PLC0415
return darwin.MSS(**kwargs)
if os_ == "linux":
from mss import linux # noqa: PLC0415
return linux.MSS(**kwargs)
if os_ == "windows":
from mss import windows # noqa: PLC0415
return windows.MSS(**kwargs)
msg = f"System {os_!r} not (yet?) implemented."
raise ScreenShotError(msg)