This commit is contained in:
2024-12-21 10:11:13 -06:00
parent baa1a3c66e
commit 66bd40e2b9

View File

@@ -2,6 +2,7 @@
import zipfile
import os
from io import BytesIO
import argparse
def printProgressBar(iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '', printEnd = "\r"):
"""
@@ -89,8 +90,30 @@ def split_zip(input_zip_path, output_folder, max_group_size):
# Example usage
# input_zip_path = 'path/to/your/large.zip'
max_group_size = get_max_size()
input_zip_path = get_zip_path()
# Create an argument parser object
parser = argparse.ArgumentParser(description='Check for a specific flag.')
# Add a flag argument to the parser
parser.add_argument('-gs', '--group_size', help='Specify Group Size')
parser.add_argument('-f', '--file_location', help='Specify File Location')
# Parse the command-line arguments
args = parser.parse_args()
if args.group_size:
mx_group_size = args.group_size
if can_float(mx_group_size):
max_group_size = float(mx_group_size)
else:
max_group_size = get_max_size()
else:
max_group_size = get_max_size()
if args.file_location:
input_zip_path = args.file_location
else:
input_zip_path = get_zip_path()
output_folder = 'output'
split_zip(input_zip_path, output_folder, max_group_size)