updates
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
import zipfile
|
import zipfile
|
||||||
import os
|
import os
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
import argparse
|
||||||
|
|
||||||
def printProgressBar(iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█', printEnd = "\r"):
|
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
|
# Example usage
|
||||||
# input_zip_path = 'path/to/your/large.zip'
|
# 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'
|
output_folder = 'output'
|
||||||
|
|
||||||
split_zip(input_zip_path, output_folder, max_group_size)
|
split_zip(input_zip_path, output_folder, max_group_size)
|
||||||
|
|||||||
Reference in New Issue
Block a user