kotonebot 0.3.1__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kotonebot/__init__.py +39 -39
- kotonebot/backend/bot.py +312 -302
- kotonebot/backend/color.py +525 -525
- kotonebot/backend/context/__init__.py +3 -3
- kotonebot/backend/context/context.py +49 -56
- kotonebot/backend/context/task_action.py +183 -175
- kotonebot/backend/core.py +129 -126
- kotonebot/backend/debug/entry.py +89 -89
- kotonebot/backend/debug/mock.py +78 -78
- kotonebot/backend/debug/server.py +222 -222
- kotonebot/backend/debug/vars.py +351 -351
- kotonebot/backend/dispatch.py +227 -227
- kotonebot/backend/flow_controller.py +196 -196
- kotonebot/backend/loop.py +12 -88
- kotonebot/backend/ocr.py +535 -529
- kotonebot/backend/preprocessor.py +103 -103
- kotonebot/client/__init__.py +9 -9
- kotonebot/client/device.py +528 -502
- kotonebot/client/fast_screenshot.py +377 -377
- kotonebot/client/host/__init__.py +43 -12
- kotonebot/client/host/adb_common.py +107 -94
- kotonebot/client/host/custom.py +118 -114
- kotonebot/client/host/leidian_host.py +196 -201
- kotonebot/client/host/mumu12_host.py +353 -358
- kotonebot/client/host/protocol.py +214 -213
- kotonebot/client/host/windows_common.py +58 -55
- kotonebot/client/implements/__init__.py +71 -7
- kotonebot/client/implements/adb.py +89 -85
- kotonebot/client/implements/adb_raw.py +162 -158
- kotonebot/client/implements/nemu_ipc/__init__.py +11 -7
- kotonebot/client/implements/nemu_ipc/external_renderer_ipc.py +284 -284
- kotonebot/client/implements/nemu_ipc/nemu_ipc.py +327 -327
- kotonebot/client/implements/remote_windows.py +188 -192
- kotonebot/client/implements/uiautomator2.py +85 -81
- kotonebot/client/implements/windows.py +176 -168
- kotonebot/client/protocol.py +69 -69
- kotonebot/client/registration.py +24 -24
- kotonebot/config/base_config.py +96 -96
- kotonebot/config/manager.py +36 -36
- kotonebot/errors.py +76 -71
- kotonebot/interop/win/__init__.py +10 -0
- kotonebot/interop/win/_mouse.py +311 -0
- kotonebot/interop/win/message_box.py +313 -313
- kotonebot/interop/win/reg.py +37 -37
- kotonebot/interop/win/shortcut.py +43 -43
- kotonebot/interop/win/task_dialog.py +513 -469
- kotonebot/logging/__init__.py +2 -2
- kotonebot/logging/log.py +17 -17
- kotonebot/primitives/__init__.py +17 -17
- kotonebot/primitives/geometry.py +862 -290
- kotonebot/primitives/visual.py +63 -63
- kotonebot/tools/mirror.py +354 -354
- kotonebot/ui/file_host/sensio.py +36 -36
- kotonebot/ui/file_host/tmp_send.py +54 -54
- kotonebot/ui/pushkit/__init__.py +3 -3
- kotonebot/ui/pushkit/image_host.py +88 -87
- kotonebot/ui/pushkit/protocol.py +13 -13
- kotonebot/ui/pushkit/wxpusher.py +54 -53
- kotonebot/ui/user.py +148 -143
- kotonebot/util.py +436 -409
- {kotonebot-0.3.1.dist-info → kotonebot-0.5.0.dist-info}/METADATA +82 -76
- kotonebot-0.5.0.dist-info/RECORD +71 -0
- {kotonebot-0.3.1.dist-info → kotonebot-0.5.0.dist-info}/licenses/LICENSE +673 -673
- kotonebot-0.3.1.dist-info/RECORD +0 -70
- {kotonebot-0.3.1.dist-info → kotonebot-0.5.0.dist-info}/WHEEL +0 -0
- {kotonebot-0.3.1.dist-info → kotonebot-0.5.0.dist-info}/top_level.txt +0 -0
kotonebot/logging/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL, basicConfig
|
|
2
|
-
from .log import getLogger, enable_verbose, LEVEL_VERBOSE as VERBOSE
|
|
1
|
+
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL, basicConfig
|
|
2
|
+
from .log import getLogger, enable_verbose, LEVEL_VERBOSE as VERBOSE
|
kotonebot/logging/log.py
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
from typing import cast
|
|
3
|
-
|
|
4
|
-
LEVEL_VERBOSE = 5
|
|
5
|
-
|
|
6
|
-
def enable_verbose():
|
|
7
|
-
logging.addLevelName(LEVEL_VERBOSE, 'VERBOSE')
|
|
8
|
-
|
|
9
|
-
class VerboseLogger(logging.Logger):
|
|
10
|
-
def verbose(self, msg, *args, **kwargs):
|
|
11
|
-
if self.isEnabledFor(LEVEL_VERBOSE):
|
|
12
|
-
self._log(LEVEL_VERBOSE, msg, args, **kwargs)
|
|
13
|
-
|
|
14
|
-
def getLogger(name: str | None = None) -> VerboseLogger:
|
|
15
|
-
logger = logging.getLogger(name)
|
|
16
|
-
if not isinstance(logger, VerboseLogger):
|
|
17
|
-
logger.__class__ = VerboseLogger
|
|
1
|
+
import logging
|
|
2
|
+
from typing import cast
|
|
3
|
+
|
|
4
|
+
LEVEL_VERBOSE = 5
|
|
5
|
+
|
|
6
|
+
def enable_verbose():
|
|
7
|
+
logging.addLevelName(LEVEL_VERBOSE, 'VERBOSE')
|
|
8
|
+
|
|
9
|
+
class VerboseLogger(logging.Logger):
|
|
10
|
+
def verbose(self, msg, *args, **kwargs):
|
|
11
|
+
if self.isEnabledFor(LEVEL_VERBOSE):
|
|
12
|
+
self._log(LEVEL_VERBOSE, msg, args, **kwargs)
|
|
13
|
+
|
|
14
|
+
def getLogger(name: str | None = None) -> VerboseLogger:
|
|
15
|
+
logger = logging.getLogger(name)
|
|
16
|
+
if not isinstance(logger, VerboseLogger):
|
|
17
|
+
logger.__class__ = VerboseLogger
|
|
18
18
|
return cast(VerboseLogger, logger)
|
kotonebot/primitives/__init__.py
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
from .visual import Image, Template
|
|
2
|
-
from .geometry import Point, Rect, Size, Vector2D, Vector3D, is_point, is_rect
|
|
3
|
-
from .geometry import RectTuple, PointTuple
|
|
4
|
-
|
|
5
|
-
__all__ = [
|
|
6
|
-
'Image',
|
|
7
|
-
'Template',
|
|
8
|
-
'Point',
|
|
9
|
-
'Rect',
|
|
10
|
-
'Size',
|
|
11
|
-
'Vector2D',
|
|
12
|
-
'Vector3D',
|
|
13
|
-
'is_point',
|
|
14
|
-
'is_rect',
|
|
15
|
-
'RectTuple',
|
|
16
|
-
'PointTuple'
|
|
17
|
-
]
|
|
1
|
+
from .visual import Image, Template
|
|
2
|
+
from .geometry import Point, Rect, Size, Vector2D, Vector3D, is_point, is_rect
|
|
3
|
+
from .geometry import RectTuple, PointTuple
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
'Image',
|
|
7
|
+
'Template',
|
|
8
|
+
'Point',
|
|
9
|
+
'Rect',
|
|
10
|
+
'Size',
|
|
11
|
+
'Vector2D',
|
|
12
|
+
'Vector3D',
|
|
13
|
+
'is_point',
|
|
14
|
+
'is_rect',
|
|
15
|
+
'RectTuple',
|
|
16
|
+
'PointTuple'
|
|
17
|
+
]
|