v04 zip update

This commit is contained in:
13339479676 2022-01-19 09:41:09 +08:00
parent d2e9293edf
commit 9c40a41443
2 changed files with 4 additions and 5 deletions

View File

@ -189,7 +189,8 @@ def webcam_opencv(device_index="0",
# ------------------压缩文件------------------
if (is_compress):
webcam_zip(is_autoZipName, f'{ROOT_PATH}/{zipName}', frame_savePath) # 自定义压缩文件名称
# 自定义压缩文件名称
webcam_zip(is_autoZipName, f'{ROOT_PATH}/{zipName}', frame_savePath)
def main(args):

View File

@ -20,9 +20,7 @@ def is_zipFile(zipName):
# zip压缩
def webcam_zip(is_autoZipName, zipName, preZipFilePath):
if (is_autoZipName):
auto_zipName = str(preZipFilePath).split('/')[-1]
zip_file = zipfile.ZipFile(f'{auto_zipName}.zip', 'a')
zipName = str(preZipFilePath).split('/')[-1] + '.zip'
else:
is_zipFile(zipName)
zip_file = zipfile.ZipFile(zipName, 'a')