@@ -21,6 +21,8 @@ def extract_vex(vex_file_location: str, temp_location: str, progress):
2121 progress ("extracting json from .vex tar file" )
2222 with tarfile .open (vex_file_location ) as vex_file :
2323 vex_file .extractall (temp_location )
24+ progress ("json extracted" )
25+
2426
2527
2628def pack_vex (save_folder_location : str , save_file_name : str , temp_location : str , progress ):
@@ -36,12 +38,13 @@ def pack_vex(save_folder_location: str, save_file_name: str, temp_location: str,
3638 except :
3739 progress ("Not a replace or it is a error" )
3840
39- progress ("extracting json from .vex tar file " )
41+ progress ("pack json into .vex" )
4042 with tarfile .open (save_folder_location + "/" + save_file_name , "w" ) as vex_file :
4143 vex_file .add (
4244 temp_location +
4345 "/___ThIsisATemPoRaRyFiLE___.json" ,
4446 "/___ThIsisATemPoRaRyFiLE___.json" )
47+ progress ("packing done!" )
4548
4649
4750def decode_json (code_folder_location : str , temp_location : str , progress ):
@@ -74,7 +77,7 @@ def update_json(code_folder: str, temp_location: str, progress):
7477 encode_files : list = os .listdir (code_folder )
7578 progress ("replacing file inside json" )
7679 for x in encode_files :
77- with open (code_folder + x , "rb" ) as file :
80+ with open (code_folder + "/" + x , "rb" ) as file :
7881 dot_vex_json ["files" ][x ] = base64 .b64encode (file .read ()).decode ("utf-8" )
7982 progress ("replace the json file" )
8083 try :
0 commit comments