v04 zip update
This commit is contained in:
parent
d2e9293edf
commit
9c40a41443
|
@ -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):
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue