diff --git a/README-PYPI.md b/README-PYPI.md index c9a1ed6..6e3f3aa 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -36,6 +36,22 @@ Library for creating Stream Deck plugins in Python. **Supported Python versions:** 3.8 or later +## Installation + +> ⚠️ To work correctly on Windows, you need to enable `LongPaths` support in +> the system: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/). +> Without this setting, installation problems may occur! + +```shell +pip install streamdeck-sdk +``` + +or + +```shell +pip install streamdeck_sdk +``` + ## Features * Ease of use. You can quickly create your own plugin without having to understand how websockets and @@ -50,11 +66,31 @@ Library for creating Stream Deck plugins in Python. * Build the project using the `streamdeck_sdk build` console command. * Property Inspector Generator. Write code in Python and get html and js for PI. +## ⚠️ Limitations + +1. During installation and update of the plugin, the Internet must be available. + +### Windows + +1. Plugin requirements should take no longer than 30 seconds to install. This is a feature of Stream Deck on Windows, + since the program restarts the plugin if a websocket connection has not been established within 30 seconds. + Therefore, you need a good Internet connection when installing and updating the plugin. +2. You need to enable `LongPaths` support in the system + registry: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/). + + Without this setting, the created plugins will not work! + ## Examples [LoremFlickr](https://github.com/gri-gus/loremflickr-streamdeck-plugin) - Plugin for installing images on a button from the LoremFlickr site. Supports MacOS and Windows. +[Proxy Manager](https://github.com/gri-gus/proxymanager-streamdeck-plugin) - Plugin for enabling and disabling +proxies on MacOS. Periodically polls the proxy status through a separate thread. + +[One-time password](https://github.com/gri-gus/otp-streamdeck-plugin) - Plugin for generating one-time passwords, +like in Google Authenticator. Has several Actions. Supports MacOS and Windows. + --- See full description and usage examples on diff --git a/README.md b/README.md index b036ea6..8c17834 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ Library for creating Stream Deck plugins in Python. ## Installation +> ⚠️ To work correctly on Windows, you need to enable `LongPaths` support in +> the system: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/). +> Without this setting, installation problems may occur! + ```shell pip install streamdeck-sdk ``` @@ -69,6 +73,20 @@ pip install streamdeck_sdk * Build the project using the `streamdeck_sdk build` console command. * Property Inspector Generator. Write code in Python and get html and js for PI. +## ⚠️ Limitations + +1. During installation and update of the plugin, the Internet must be available. + +### Windows + +1. Plugin requirements should take no longer than 30 seconds to install. This is a feature of Stream Deck on Windows, + since the program restarts the plugin if a websocket connection has not been established within 30 seconds. + Therefore, you need a good Internet connection when installing and updating the plugin. +2. You need to enable `LongPaths` support in the system + registry: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/). + + Without this setting, the created plugins will not work! + ## Quick Start 1. Install Python. diff --git a/README.ru.md b/README.ru.md index 612ca34..a9fa0d2 100644 --- a/README.ru.md +++ b/README.ru.md @@ -45,6 +45,10 @@ ## Установка +> ⚠️ Для корректной работы на Windows нужно включить поддержку `LongPaths` в +> системе: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/). +> Без этой настройки возможны проблемы с установкой! + ```shell pip install streamdeck-sdk ``` @@ -69,6 +73,20 @@ pip install streamdeck_sdk * Сборка проекта через консольную команду `streamdeck_sdk build`. * Генератор Property Inspector. Пишите код на Python и получите html и js для PI. +## ⚠️ Ограничения + +1. Во время установки и обновления плагина должен быть доступен интернет. + +### Windows + +1. Зависимости плагина должны устанавливаться не дольше 30 секунд. Это особенность Stream Deck на Windows, так как + программа перезапускает плагин, если в течение 30 секунд не было установлено websocket соединение. Поэтому нужен + хороший интернет при установке и обновлении плагина. +2. Нужно включить поддержку `LongPaths` в реестре + системы: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/). + + Без этой настройки созданные плагины не будут работать! + ## Быстрый старт 1. Установите Python. diff --git a/setup.py b/setup.py index 3518b2f..e0419f8 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import setuptools -VERSION = "1.1.0" +VERSION = "1.1.1" PACKAGE_DIR = "." REQUIREMENTS_FILE = "./requirements.txt" README = "README-PYPI.md" diff --git a/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/code/requirements.txt b/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/code/requirements.txt index eb35fae..1a5d9e2 100644 --- a/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/code/requirements.txt +++ b/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/code/requirements.txt @@ -1 +1 @@ -streamdeck-sdk>=1.1.0 \ No newline at end of file +streamdeck-sdk>=1.1.1 \ No newline at end of file diff --git a/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/manifest.json b/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/manifest.json index 8eb3bfa..8da5485 100644 --- a/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/manifest.json +++ b/streamdeck_sdk/executable/assets/base_project/com.bestdeveloper.mytestplugin.sdPlugin/manifest.json @@ -23,7 +23,7 @@ "Description": "Open streamdeck_sdk github page.", "Icon": "assets/plugin_icon", "Name": "MyTestPlugin", - "Version": "0.0.2", + "Version": "0.0.3", "SDKVersion": 2, "OS": [ { diff --git a/streamdeck_sdk/logger.py b/streamdeck_sdk/logger.py index 394c6d1..2b6ffba 100644 --- a/streamdeck_sdk/logger.py +++ b/streamdeck_sdk/logger.py @@ -45,8 +45,11 @@ def log_errors(func): def wrapper(*args, **kwargs): try: result = func(*args, **kwargs) + except SystemExit as err: + _log_errors_decorator_logger.exception(str(err)) + raise err except BaseException as err: - _log_errors_decorator_logger.error(str(err), exc_info=True) + _log_errors_decorator_logger.exception(str(err)) return return result diff --git a/streamdeck_sdk/mixins/event_routing_mixin.py b/streamdeck_sdk/mixins/event_routing_mixin.py index 2e7d23f..e0611e2 100644 --- a/streamdeck_sdk/mixins/event_routing_mixin.py +++ b/streamdeck_sdk/mixins/event_routing_mixin.py @@ -35,6 +35,7 @@ def ws_on_close( ) -> None: logger.debug(f"{close_status_code=}; {close_msg=}") logger.info(f"WS CLOSED") + exit(0) @log_errors def ws_on_error(