From 8f20c9b825cabab7a3f0f5dd2cfe000cc7f72c28 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Tue, 28 Jun 2022 03:22:30 +0300 Subject: 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 --- tools/esp32cam_captures_to_video.py | 7 ++++--- tools/merge-recordings.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'tools') 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: -- cgit v1.2.3