diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-02-27 00:01:50 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-02-27 00:01:50 +0300 |
commit | 7092c79b5693b239fec739c181d300301c434d22 (patch) | |
tree | ed1029051c70767d919a62f62fbac0ab6639e8c4 /bin | |
parent | d638bb4f58bf81c60ef218204b1fba75cf16b36a (diff) |
some include magic; add tools/ipcam_stream.py
Diffstat (limited to 'bin')
39 files changed, 38 insertions, 46 deletions
diff --git a/bin/__py_include.py b/bin/__py_include.py deleted file mode 100644 index 8f98830..0000000 --- a/bin/__py_include.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys -import os.path - -for _name in ('include/py',): - sys.path.extend([ - os.path.realpath( - os.path.join(os.path.dirname(os.path.join(__file__)), '..', _name) - ) - ])
\ No newline at end of file diff --git a/bin/camera_node.py b/bin/camera_node.py index 1485557..039b3c7 100755 --- a/bin/camera_node.py +++ b/bin/camera_node.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import asyncio import time -import __py_include +import include_homekit from homekit.config import config from homekit.media import MediaNodeServer, ESP32CameraRecordStorage, CameraRecorder diff --git a/bin/electricity_calc.py b/bin/electricity_calc.py index cff2327..a183095 100755 --- a/bin/electricity_calc.py +++ b/bin/electricity_calc.py @@ -3,7 +3,7 @@ import logging import os import sys import inspect -import __py_include +import include_homekit from homekit.config import config # do not remove this import! from datetime import datetime, timedelta diff --git a/bin/esp32_capture.py b/bin/esp32_capture.py index 839114d..c710b23 100755 --- a/bin/esp32_capture.py +++ b/bin/esp32_capture.py @@ -2,7 +2,7 @@ import asyncio import logging import os.path -import __py_include +import include_homekit from argparse import ArgumentParser from homekit.camera.esp32 import WebClient diff --git a/bin/esp32cam_capture_diff_node.py b/bin/esp32cam_capture_diff_node.py index d664c6d..b383222 100755 --- a/bin/esp32cam_capture_diff_node.py +++ b/bin/esp32cam_capture_diff_node.py @@ -3,7 +3,7 @@ import asyncio import logging import os.path import tempfile -import __py_include +import include_homekit import homekit.telegram.aio as telegram from homekit.config import config diff --git a/bin/gpiorelayd.py b/bin/gpiorelayd.py index 89ba78e..022bc81 100755 --- a/bin/gpiorelayd.py +++ b/bin/gpiorelayd.py @@ -2,7 +2,7 @@ import logging import os import sys -import __py_include +import include_homekit from argparse import ArgumentParser from homekit.util import Addr diff --git a/bin/include_homekit.py b/bin/include_homekit.py new file mode 120000 index 0000000..0cb1486 --- /dev/null +++ b/bin/include_homekit.py @@ -0,0 +1 @@ +../include_homekit.py
\ No newline at end of file diff --git a/bin/inverter_bot.py b/bin/inverter_bot.py index 0be5866..afa9727 100755 --- a/bin/inverter_bot.py +++ b/bin/inverter_bot.py @@ -6,7 +6,7 @@ import json import itertools import sys import asyncio -import __py_include +import include_homekit from inverterd import Format, InverterError from html import escape diff --git a/bin/inverter_mqtt_util.py b/bin/inverter_mqtt_util.py index 6003c62..cf64b66 100755 --- a/bin/inverter_mqtt_util.py +++ b/bin/inverter_mqtt_util.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit from argparse import ArgumentParser from homekit.config import config diff --git a/bin/inverterd_emulator.py b/bin/inverterd_emulator.py index 371d955..413f88d 100755 --- a/bin/inverterd_emulator.py +++ b/bin/inverterd_emulator.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import logging -import __py_include +import include_homekit from homekit.inverter.emulator import InverterEmulator diff --git a/bin/ipcam_capture.py b/bin/ipcam_capture.py index 25b101d..8968a0d 100755 --- a/bin/ipcam_capture.py +++ b/bin/ipcam_capture.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit import sys import os import subprocess diff --git a/bin/ipcam_ntp_util.py b/bin/ipcam_ntp_util.py index 0461cc2..fd9d7f9 100755 --- a/bin/ipcam_ntp_util.py +++ b/bin/ipcam_ntp_util.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit import hikvision, xmeye from enum import Enum, auto diff --git a/bin/ipcam_server.py b/bin/ipcam_server.py index cb2711c..f70afa7 100755 --- a/bin/ipcam_server.py +++ b/bin/ipcam_server.py @@ -4,7 +4,7 @@ import os import asyncio import time import shutil -import __py_include +import include_homekit import homekit.telegram.aio as telegram diff --git a/bin/lugovaya_pump_mqtt_bot.py b/bin/lugovaya_pump_mqtt_bot.py index 85402d1..fb56a25 100755 --- a/bin/lugovaya_pump_mqtt_bot.py +++ b/bin/lugovaya_pump_mqtt_bot.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import datetime -import __py_include +import include_homekit from enum import Enum from typing import Optional diff --git a/bin/mqtt_node_util.py b/bin/mqtt_node_util.py index 657fcf9..0c9ea3d 100755 --- a/bin/mqtt_node_util.py +++ b/bin/mqtt_node_util.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import os.path -import __py_include +import include_homekit from time import sleep from typing import Optional diff --git a/bin/openwrt_log_analyzer.py b/bin/openwrt_log_analyzer.py index 5b14a2f..e414af1 100755 --- a/bin/openwrt_log_analyzer.py +++ b/bin/openwrt_log_analyzer.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit import homekit.telegram as telegram from homekit.telegram.config import TelegramChatsConfig diff --git a/bin/openwrt_logger.py b/bin/openwrt_logger.py index ec67542..4122042 100755 --- a/bin/openwrt_logger.py +++ b/bin/openwrt_logger.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import os -import __py_include +import include_homekit from datetime import datetime from typing import Tuple, List, Optional diff --git a/bin/pio_build.py b/bin/pio_build.py index 539df44..dd54128 100644 --- a/bin/pio_build.py +++ b/bin/pio_build.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit if __name__ == '__main__': print('TODO')
\ No newline at end of file diff --git a/bin/pio_ini.py b/bin/pio_ini.py index ee85732..3eac3b2 100755 --- a/bin/pio_ini.py +++ b/bin/pio_ini.py @@ -2,7 +2,7 @@ import os import yaml import re -import __py_include +import include_homekit from argparse import ArgumentParser, ArgumentError from homekit.pio import get_products, platformio_ini diff --git a/bin/polaris_kettle_bot.py b/bin/polaris_kettle_bot.py index 05c2aae..eeedd4c 100755 --- a/bin/polaris_kettle_bot.py +++ b/bin/polaris_kettle_bot.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from __future__ import annotations -import __py_include +import include_homekit import logging import locale import queue diff --git a/bin/polaris_kettle_util.py b/bin/polaris_kettle_util.py index 4db0ed4..fa4f78e 100755 --- a/bin/polaris_kettle_util.py +++ b/bin/polaris_kettle_util.py @@ -4,7 +4,7 @@ import logging import sys import paho.mqtt.client as mqtt -import __py_include +import include_homekit from typing import Optional from argparse import ArgumentParser diff --git a/bin/pump_bot.py b/bin/pump_bot.py index e00e844..1e9a602 100755 --- a/bin/pump_bot.py +++ b/bin/pump_bot.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit import sys import asyncio diff --git a/bin/pump_mqtt_bot.py b/bin/pump_mqtt_bot.py index aea1451..6ef5dc8 100755 --- a/bin/pump_mqtt_bot.py +++ b/bin/pump_mqtt_bot.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import datetime -import __py_include +import include_homekit from enum import Enum from typing import Optional diff --git a/bin/relay_mqtt_bot.py b/bin/relay_mqtt_bot.py index 3ad0a9b..226329f 100755 --- a/bin/relay_mqtt_bot.py +++ b/bin/relay_mqtt_bot.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import sys -import __py_include +import include_homekit from enum import Enum from typing import Optional, Union diff --git a/bin/relay_mqtt_http_proxy.py b/bin/relay_mqtt_http_proxy.py index 866ead3..76ccb37 100755 --- a/bin/relay_mqtt_http_proxy.py +++ b/bin/relay_mqtt_http_proxy.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import logging -import __py_include +import include_homekit from aiohttp import web from homekit import http diff --git a/bin/sensors_bot.py b/bin/sensors_bot.py index 43932e1..5b84c6a 100755 --- a/bin/sensors_bot.py +++ b/bin/sensors_bot.py @@ -4,7 +4,7 @@ import socket import logging import re import gc -import __py_include +import include_homekit from io import BytesIO from typing import Optional diff --git a/bin/sound_bot.py b/bin/sound_bot.py index fa22ba7..ee6e82c 100755 --- a/bin/sound_bot.py +++ b/bin/sound_bot.py @@ -2,7 +2,7 @@ import logging import os import tempfile -import __py_include +import include_homekit from enum import Enum from datetime import datetime, timedelta diff --git a/bin/sound_node.py b/bin/sound_node.py index 4d0172c..608f131 100755 --- a/bin/sound_node.py +++ b/bin/sound_node.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import os -import __py_include +import include_homekit from typing import Optional diff --git a/bin/sound_sensor_node.py b/bin/sound_sensor_node.py index 39c3905..e178f39 100755 --- a/bin/sound_sensor_node.py +++ b/bin/sound_sensor_node.py @@ -2,7 +2,7 @@ import logging import os import sys -import __py_include +import include_homekit from homekit.config import config from homekit.util import Addr diff --git a/bin/sound_sensor_server.py b/bin/sound_sensor_server.py index fd7ff5a..3af64e2 100755 --- a/bin/sound_sensor_server.py +++ b/bin/sound_sensor_server.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import logging import threading -import __py_include +import include_homekit from time import sleep from typing import Optional, List, Dict, Tuple diff --git a/bin/ssh_tunnels_config_util.py b/bin/ssh_tunnels_config_util.py index d08a4f4..691c2ac 100755 --- a/bin/ssh_tunnels_config_util.py +++ b/bin/ssh_tunnels_config_util.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit from homekit.config import config if __name__ == '__main__': diff --git a/bin/temphum_mqtt_node.py b/bin/temphum_mqtt_node.py index 68ac579..0234211 100755 --- a/bin/temphum_mqtt_node.py +++ b/bin/temphum_mqtt_node.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit import asyncio import logging diff --git a/bin/temphum_mqtt_receiver.py b/bin/temphum_mqtt_receiver.py index e9ee397..355e86b 100755 --- a/bin/temphum_mqtt_receiver.py +++ b/bin/temphum_mqtt_receiver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import paho.mqtt.client as mqtt import re -import __py_include +import include_homekit from homekit.config import config from homekit.mqtt import MqttWrapper, MqttNode diff --git a/bin/temphum_nodes_util.py b/bin/temphum_nodes_util.py index aa46494..4015f19 100755 --- a/bin/temphum_nodes_util.py +++ b/bin/temphum_nodes_util.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit from homekit.mqtt.temphum import MqttTempHumNodes diff --git a/bin/temphum_smbus_util.py b/bin/temphum_smbus_util.py index 1cfaa84..48ec4f8 100755 --- a/bin/temphum_smbus_util.py +++ b/bin/temphum_smbus_util.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit from argparse import ArgumentParser from homekit.temphum import SensorType diff --git a/bin/temphumd.py b/bin/temphumd.py index 9ea436d..2585148 100755 --- a/bin/temphumd.py +++ b/bin/temphumd.py @@ -2,7 +2,7 @@ import asyncio import json import logging -import __py_include +import include_homekit from typing import Optional diff --git a/bin/vk_sms_checker.py b/bin/vk_sms_checker.py index 07d9953..ef25278 100755 --- a/bin/vk_sms_checker.py +++ b/bin/vk_sms_checker.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit import re from html import escape diff --git a/bin/web_api.py b/bin/web_api.py index 1804b30..5b6733f 100755 --- a/bin/web_api.py +++ b/bin/web_api.py @@ -2,7 +2,7 @@ import asyncio import json import os -import __py_include +import include_homekit from datetime import datetime, timedelta diff --git a/bin/web_kbn.py b/bin/web_kbn.py index f891675..9629598 100755 --- a/bin/web_kbn.py +++ b/bin/web_kbn.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import __py_include +import include_homekit import asyncio import logging import jinja2 |