summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/esp32cam_captures_to_video.py7
-rwxr-xr-xtools/merge-recordings.py7
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: