diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-06-28 03:22:30 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-06-30 03:47:49 +0300 |
commit | 8f20c9b825cabab7a3f0f5dd2cfe000cc7f72c28 (patch) | |
tree | b5d7446e7b2fcfd42b1e5029aeef33ecb5f9715f /tools | |
parent | ee09bc98aedfc6a65a5026432b399345a30a39c8 (diff) |
polaris pwk 1725cgld full support
- significant improvements, correctnesses and stability fixes in
protocol implementation
- correct handling of device appearances and disappearances
- flawlessly functioning telegram bot that re-renders kettle's state
(temperature and other) in real time
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/esp32cam_captures_to_video.py | 7 | ||||
-rwxr-xr-x | tools/merge-recordings.py | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tools/esp32cam_captures_to_video.py b/tools/esp32cam_captures_to_video.py index 12c6709..b34cb9f 100755 --- a/tools/esp32cam_captures_to_video.py +++ b/tools/esp32cam_captures_to_video.py @@ -7,6 +7,7 @@ import sys from datetime import datetime, timedelta from argparse import ArgumentParser +from typing import List input_fmt = '%Y-%m-%d-%H:%M:%S.%f' @@ -14,7 +15,7 @@ output_fmt = '%Y-%m-%d-%H:%M:%S' # declare types File = dict -FileList = list[File] +FileList = List[File] def get_files(source_directory: str) -> FileList: @@ -33,7 +34,7 @@ def get_files(source_directory: str) -> FileList: return files -def group_files(files: FileList, timedelta_val: int) -> list[FileList]: +def group_files(files: FileList, timedelta_val: int) -> List[FileList]: groups = [] group_idx = None @@ -52,7 +53,7 @@ def group_files(files: FileList, timedelta_val: int) -> list[FileList]: return groups -def merge(groups: list[FileList], +def merge(groups: List[FileList], output_directory: str, delete_source_files=False, cedrus=False, diff --git a/tools/merge-recordings.py b/tools/merge-recordings.py index 637858e..b93f75b 100755 --- a/tools/merge-recordings.py +++ b/tools/merge-recordings.py @@ -5,6 +5,7 @@ import subprocess import tempfile import sys +from typing import List from datetime import datetime, timedelta from argparse import ArgumentParser @@ -12,7 +13,7 @@ from argparse import ArgumentParser fmt = '%d%m%y-%H%M%S' File = dict -FileList = list[File] +FileList = List[File] def get_files(source_directory: str) -> FileList: @@ -31,7 +32,7 @@ def get_files(source_directory: str) -> FileList: return files -def group_files(files: FileList) -> list[FileList]: +def group_files(files: FileList) -> List[FileList]: groups = [] group_idx = None @@ -55,7 +56,7 @@ def group_files(files: FileList) -> list[FileList]: return groups -def merge(groups: list[FileList], +def merge(groups: List[FileList], output_directory: str, delete_source_files=False, vbr=False) -> None: |