ok-script 0.0.128__tar.gz → 0.0.129__tar.gz
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.
- {ok-script-0.0.128/ok_script.egg-info → ok-script-0.0.129}/PKG-INFO +1 -1
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/adb/DeviceManager.py +1 -1
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/feature/Box.py +7 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/feature/FindFeature.py +6 -8
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/i18n/GettextTranslator.py +3 -3
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/task/BaseTask.py +8 -6
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/task/TaskExecutor.py +4 -3
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/task/TriggerTask.py +1 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/update/GithubMultiDownloader.py +10 -13
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/update/Updater.py +10 -5
- {ok-script-0.0.128 → ok-script-0.0.129/ok_script.egg-info}/PKG-INFO +1 -1
- {ok-script-0.0.128 → ok-script-0.0.129}/setup.py +1 -1
- {ok-script-0.0.128 → ok-script-0.0.129}/LICENSE.txt +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/README.md +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/OK.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/alas/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/alas/emulator_base.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/alas/emulator_windows.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/alas/platform_base.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/alas/platform_windows.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/alas/utils.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/BaseCaptureMethod.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/HwndWindow.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/adb/ADBCaptureMethod.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/adb/WindowsCaptureFactory.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/adb/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/adb/bin/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/image/ImageCaptureMethod.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/image/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/BaseWindowsCaptureMethod.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/BitBltCaptureMethod.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/DesktopDuplicationCaptureMethod.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/WindowsGraphicsCaptureMethod.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/d3d11.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/dump.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/utils.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/window.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/color/Color.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/color/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/config/Config.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/config/ConfigOption.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/config/GlobalConfig.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/config/InfoDict.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/config/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/display/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/display/custom_types.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/display/display.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/display/display_adapters.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/display/display_monitors.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/display/windows_types.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/feature/CompressCoco.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/feature/Feature.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/feature/FeatureSet.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/feature/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/firebase/Analytics.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/firebase/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/App.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/Communicate.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/MainWindow.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/MessageWindow.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/StartController.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/TabTitles.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/about/AboutTab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/about/HttpTextEdit.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/about/VersionCard.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/about/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/common/OKIcon.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/common/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/common/config.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/common/style_sheet.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/config/AppConfigWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/config/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/debug/AspectRatioWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/debug/DebugTab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/debug/FrameWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/debug/InfoWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/debug/LogWindow.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/debug/Screenshot.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/debug/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/i18n/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/i18n/path.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/i18n/update.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/icon/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/icon/icon.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/overlay/OverlayWindow.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/overlay/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/qss/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/resources.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/settings/GlobalConfigCard.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/settings/SettingTab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/settings/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/start/SelectCaptureListView.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/start/StartCard.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/start/StartTab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/start/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/ConfigCard.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/ConfigItemFactory.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/ConfigLabelAndWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/LabelAndDoubleSpinBox.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/LabelAndDropDown.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/LabelAndLineEdit.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/LabelAndList.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/LabelAndSpinBox.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/LabelAndSwitchButton.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/LabelAndWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/ModifyListDialog.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/ModifyListItem.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/OneTimeTaskTab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/StartButton.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/TaskCard.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/TaskOpButton.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/TaskTab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/TooltipTableWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/TriggerTaskTab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/tasks/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/util/Alert.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/util/InitWorker.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/util/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/Card.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/EmptyCard.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/FramelessDialog.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/ListTableWidgetItem.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/NumericTableWidgetItem.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/StartLoadingDialog.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/StatusBar.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/Tab.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/TabWidget.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/UpdateConfigWidgetItem.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/YesNonWidgetItem.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/gui/widget/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/interaction/ADBInteraction.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/interaction/BaseInteraction.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/interaction/DoNothingInteraction.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/interaction/PostMessageInteraction.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/interaction/PyDirectInteraction.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/interaction/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/logging/Logger.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/logging/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/ocr/OCR.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/ocr/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/delegate.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/export.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/idldsl.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/inspectable.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/roapi.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/types.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/winstring.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/save/BlackBarProcessor.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/save/PostProcessor.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/save/SaveByInterval.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/save/SaveByKeyPress.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/save/SaveMethodBase.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/save/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/scene/FeatureScene.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/scene/Scene.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/scene/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/stats/StreamStats.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/stats/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/task/ExecutorOperation.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/task/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/update/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/update/gen_md5.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/Handler.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/exit_event.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/json.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/list.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/path.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/thread.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/win32_process.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok/util/yaml.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok_script.egg-info/SOURCES.txt +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok_script.egg-info/requires.txt +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/ok_script.egg-info/top_level.txt +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/setup.cfg +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/tests/__init__.py +0 -0
- {ok-script-0.0.128 → ok-script-0.0.129}/tests/test_updater.py +0 -0
|
@@ -45,7 +45,7 @@ class DeviceManager:
|
|
|
45
45
|
self.config = Config("devices", {"preferred": "none", "pc_full_path": "none", 'capture': 'windows'})
|
|
46
46
|
self.capture_method = None
|
|
47
47
|
self.handler = Handler(exit_event, 'RefreshAdb')
|
|
48
|
-
self.handler.post(self.do_refresh
|
|
48
|
+
self.handler.post(self.do_refresh)
|
|
49
49
|
|
|
50
50
|
def refresh(self):
|
|
51
51
|
logger.debug('calling refresh')
|
|
@@ -141,6 +141,13 @@ class Box:
|
|
|
141
141
|
return None
|
|
142
142
|
|
|
143
143
|
|
|
144
|
+
def find_highest_confidence_box(boxes):
|
|
145
|
+
if not boxes:
|
|
146
|
+
return None
|
|
147
|
+
highest_confidence_box = max(boxes, key=lambda box: box.confidence)
|
|
148
|
+
return highest_confidence_box
|
|
149
|
+
|
|
150
|
+
|
|
144
151
|
def sort_boxes(boxes: List[Box]) -> List[Box]:
|
|
145
152
|
def box_intersect(box1, box2):
|
|
146
153
|
return not (box1.y > box2.y + box2.height or box1.y + box1.height < box2.y)
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
-
from ok.feature.Box import Box
|
|
4
|
+
from ok.feature.Box import Box, find_highest_confidence_box
|
|
5
|
+
from ok.logging.Logger import get_logger
|
|
6
|
+
|
|
7
|
+
logger = get_logger(__name__)
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
class FindFeature:
|
|
@@ -73,15 +76,10 @@ class FindFeature:
|
|
|
73
76
|
use_gray_scale=use_gray_scale, box=box, canny_lower=canny_lower,
|
|
74
77
|
canny_higher=canny_higher, inverse_mask_color=inverse_mask_color,
|
|
75
78
|
frame_processor=frame_processor)
|
|
76
|
-
highest_conf = 0
|
|
77
|
-
highest_box = None
|
|
78
79
|
if len(boxes) > 0:
|
|
79
80
|
if len(boxes) > 1:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if box.confidence > highest_conf:
|
|
83
|
-
highest_conf = box.confidence
|
|
84
|
-
highest_box = box
|
|
81
|
+
logger.warning(f"find_one:found {feature_name} too many {len(boxes)}", file=sys.stderr)
|
|
82
|
+
highest_box = find_highest_confidence_box(boxes)
|
|
85
83
|
return highest_box
|
|
86
84
|
|
|
87
85
|
def on_feature(self, boxes):
|
|
@@ -38,9 +38,9 @@ def update_po_file(strings, language_code):
|
|
|
38
38
|
po.append(entry)
|
|
39
39
|
|
|
40
40
|
# Remove obsolete keys
|
|
41
|
-
for msgid in list(existing_ids.keys()):
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
# for msgid in list(existing_ids.keys()):
|
|
42
|
+
# if msgid not in strings:
|
|
43
|
+
# po.remove(existing_ids[msgid])
|
|
44
44
|
|
|
45
45
|
# Save the .po file
|
|
46
46
|
po.wrapwidth = 999999
|
|
@@ -29,14 +29,16 @@ class BaseTask(ExecutorOperation):
|
|
|
29
29
|
self.lock = threading.Lock()
|
|
30
30
|
self._handler = None
|
|
31
31
|
self.running = False
|
|
32
|
-
self.
|
|
33
|
-
self.
|
|
32
|
+
self.trigger_interval = 0
|
|
33
|
+
self.last_trigger_time = 0
|
|
34
34
|
|
|
35
|
-
def
|
|
35
|
+
def should_trigger(self):
|
|
36
|
+
if self.trigger_interval == 0:
|
|
37
|
+
return True
|
|
36
38
|
now = time.time()
|
|
37
|
-
time_diff = now - self.
|
|
38
|
-
if time_diff > self.
|
|
39
|
-
self.
|
|
39
|
+
time_diff = now - self.last_trigger_time
|
|
40
|
+
if time_diff > self.trigger_interval:
|
|
41
|
+
self.last_trigger_time = now
|
|
40
42
|
return True
|
|
41
43
|
return False
|
|
42
44
|
|
|
@@ -248,7 +248,7 @@ class TaskExecutor:
|
|
|
248
248
|
cycled = True
|
|
249
249
|
self.trigger_task_index += 1
|
|
250
250
|
task = self.trigger_tasks[self.trigger_task_index]
|
|
251
|
-
if task.enabled and task.
|
|
251
|
+
if task.enabled and task.should_trigger():
|
|
252
252
|
return task, cycled
|
|
253
253
|
return None, cycled
|
|
254
254
|
|
|
@@ -267,8 +267,9 @@ class TaskExecutor:
|
|
|
267
267
|
continue
|
|
268
268
|
if cycled:
|
|
269
269
|
self.next_frame()
|
|
270
|
-
elif time.time() - self._last_frame_time > 1:
|
|
271
|
-
logger.warning(
|
|
270
|
+
elif time.time() - self._last_frame_time > 0.1:
|
|
271
|
+
# logger.warning(
|
|
272
|
+
# f'processing {task} cost too much time {time.time() - self._last_frame_time}, get new frame')
|
|
272
273
|
self.next_frame()
|
|
273
274
|
try:
|
|
274
275
|
if task.trigger():
|
|
@@ -14,11 +14,9 @@ logger = get_logger(__name__)
|
|
|
14
14
|
|
|
15
15
|
# https://update.greasyfork.org/scripts/412245/Github%20%E5%A2%9E%E5%BC%BA%20-%20%E9%AB%98%E9%80%9F%E4%B8%8B%E8%BD%BD.user.js
|
|
16
16
|
download_url_us = [
|
|
17
|
-
['https://gh.h233.eu.org/https://github.com', '美国',
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'https://gh.ddlc.top/https://github.com', '美国',
|
|
21
|
-
'[美国 Cloudflare CDN] - 该公益加速源由 [@mtr-static-official] 提供'],
|
|
17
|
+
['https://gh.h233.eu.org/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@X.I.U/XIU2] 提供'],
|
|
18
|
+
['https://gh.ddlc.top/https://github.com', '美国',
|
|
19
|
+
'[美国 Cloudflare CDN] - 该公益加速源由 [@mtr-static-official] 提供'],
|
|
22
20
|
['https://dl.ghpig.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [feizhuqwq.com] 提供'],
|
|
23
21
|
['https://slink.ltd/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [知了小站] 提供'],
|
|
24
22
|
['https://gh.con.sh/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [佚名] 提供'],
|
|
@@ -35,11 +33,9 @@ download_url_us = [
|
|
|
35
33
|
'[美国 Cloudflare CDN] - 该公益加速源由 [@yionchiii lau] 提供'],
|
|
36
34
|
['https://gh.jiasu.in/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@0-RTT] 提供'],
|
|
37
35
|
['https://dgithub.xyz', '美国', '[美国 西雅图] - 该公益加速源由 [dgithub.xyz] 提供'],
|
|
38
|
-
['https://download.ixnic.net', '美国', '[美国 洛杉矶] - 该公益加速源由 [
|
|
36
|
+
['https://download.ixnic.net', '美国', '[美国 洛杉矶] - 该公益加速源由 [@黃埔興國] 提供'],
|
|
39
37
|
['https://download.nuaa.cf', '美国', '[美国 洛杉矶] - 该公益加速源由 [FastGit 群组成员] 提供'],
|
|
40
|
-
['https://download.yzuu.cf', '美国', '[美国 纽约] - 该公益加速源由 [FastGit 群组成员] 提供']
|
|
41
|
-
['https://download.scholar.rr.nu', '美国', '[美国 纽约] - 该公益加速源由 [FastGit 群组成员] 提供'],
|
|
42
|
-
['https://hub.whtrys.space', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [FastGit 群组成员] 提供']
|
|
38
|
+
['https://download.yzuu.cf', '美国', '[美国 纽约] - 该公益加速源由 [FastGit 群组成员] 提供']
|
|
43
39
|
]
|
|
44
40
|
|
|
45
41
|
download_url = [
|
|
@@ -48,7 +44,7 @@ download_url = [
|
|
|
48
44
|
['https://ghproxy.net/https://github.com', '日本',
|
|
49
45
|
'[日本 大阪] - 该公益加速源由 [ghproxy] 提供 提示:希望大家尽量多使用前面的美国节点(每次随机 负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'],
|
|
50
46
|
['https://kkgithub.com', '香港',
|
|
51
|
-
'[中国香港、日本、新加坡等] - 该公益加速源由 [help.kkgithub.com] 提供 提示:希望大家尽量多使用前面的美国节点(每次随机 4 个来负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~']
|
|
47
|
+
'[中国香港、日本、新加坡等] - 该公益加速源由 [help.kkgithub.com] 提供 提示:希望大家尽量多使用前面的美国节点(每次随机 4 个来负载均衡), 避免流量都集中到亚洲公益节点,减少成本压力,公益才能更持久~'],
|
|
52
48
|
]
|
|
53
49
|
|
|
54
50
|
|
|
@@ -63,12 +59,13 @@ class GithubMultiDownloader:
|
|
|
63
59
|
def __init__(self, app_config, exit_event):
|
|
64
60
|
self.app_config = app_config
|
|
65
61
|
self.exit_event = exit_event
|
|
66
|
-
self.proxys =
|
|
62
|
+
self.proxys = parse_url(download_url) + parse_url(download_url_us)
|
|
67
63
|
logger.debug(f'proxys = {self.proxys}')
|
|
68
64
|
self.fast_proxys = []
|
|
69
65
|
random.shuffle(self.proxys)
|
|
66
|
+
self.proxys = ["", "", "", "", ""] + self.proxys # try to use no proxy first
|
|
70
67
|
self.lock = threading.Lock()
|
|
71
|
-
self.num_parts =
|
|
68
|
+
self.num_parts = 5
|
|
72
69
|
self.downloaded = 0
|
|
73
70
|
self.start_time = 0
|
|
74
71
|
self.size = 0
|
|
@@ -131,7 +128,7 @@ class GithubMultiDownloader:
|
|
|
131
128
|
with open(file, 'ab') as f:
|
|
132
129
|
for chunk in response.iter_content(chunk_size=1024): # 1 KB chunks
|
|
133
130
|
with self.lock:
|
|
134
|
-
if time.time() - last_chunk_time >
|
|
131
|
+
if time.time() - last_chunk_time > 1 and time.time() - start_time > 10: # If more than 1 seconds have passed since the last chunk
|
|
135
132
|
response.close()
|
|
136
133
|
logger.error(f'{proxy} Server is not responding with the chunk every 0.5 seconds')
|
|
137
134
|
break
|
|
@@ -99,7 +99,7 @@ for /D %%D in ("%source_dir%\*") do (
|
|
|
99
99
|
xcopy /E /I "%%D" "%target_dir%\%%~nxD" >nul
|
|
100
100
|
)
|
|
101
101
|
echo %time% Update Success
|
|
102
|
-
start "" %exe%
|
|
102
|
+
start "" "%exe%"
|
|
103
103
|
endlocal
|
|
104
104
|
|
|
105
105
|
|
|
@@ -109,8 +109,10 @@ goto :eof
|
|
|
109
109
|
set "elapsed_time=0"
|
|
110
110
|
:check_loop
|
|
111
111
|
echo %time% - Waiting for PID %1 to exit...
|
|
112
|
-
tasklist /fi "PID eq %1" | find "
|
|
113
|
-
|
|
112
|
+
tasklist /fi "PID eq %1" | find /C "Image Name" > temp.txt
|
|
113
|
+
set /p count=<temp.txt
|
|
114
|
+
del temp.txt
|
|
115
|
+
if %count% leq 1 (
|
|
114
116
|
echo %time% - PID %1 has exited.
|
|
115
117
|
goto :eof
|
|
116
118
|
) else (
|
|
@@ -160,8 +162,10 @@ class Updater:
|
|
|
160
162
|
def do_check_for_updates(self, proxied_url=None):
|
|
161
163
|
|
|
162
164
|
try:
|
|
165
|
+
url = proxied_url or self.update_url
|
|
166
|
+
logger.info(f'do_check_for_updates: {url}')
|
|
163
167
|
# Send GET request to the API endpoint
|
|
164
|
-
response = requests.get(
|
|
168
|
+
response = requests.get(url, timeout=10)
|
|
165
169
|
|
|
166
170
|
# Raise an exception if the request was unsuccessful
|
|
167
171
|
response.raise_for_status()
|
|
@@ -243,7 +247,7 @@ class Updater:
|
|
|
243
247
|
except Exception as e:
|
|
244
248
|
logger.error('download error occurred', e)
|
|
245
249
|
self.downloading = False
|
|
246
|
-
communicate.download_update.emit(0, "", True,
|
|
250
|
+
communicate.download_update.emit(0, "", True, "download error")
|
|
247
251
|
|
|
248
252
|
def extract(self, file, release, debug):
|
|
249
253
|
version = release.get('version')
|
|
@@ -261,6 +265,7 @@ class Updater:
|
|
|
261
265
|
logger.error('extract error occurred', e)
|
|
262
266
|
self.check_package_error()
|
|
263
267
|
return
|
|
268
|
+
|
|
264
269
|
update_package_folder = find_folder_with_file(folder, 'md5.txt')
|
|
265
270
|
|
|
266
271
|
if update_package_folder is None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ok-script-0.0.128 → ok-script-0.0.129}/ok/capture/windows/DesktopDuplicationCaptureMethod.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ok-script-0.0.128 → ok-script-0.0.129}/ok/rotypes/Windows/Security/Cryptography/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|