just updates

This commit is contained in:
Elghinnarisa
2023-03-26 18:32:35 +02:00
parent 790fd3538e
commit c326143eb8
49 changed files with 3117 additions and 167 deletions

29
append_to_textfile.py Normal file
View File

@@ -0,0 +1,29 @@
import sys
from pathlib import Path
import os
import re
output_folder_name ="/bulk_convert_out/"
droppedFile = sys.argv[1]
droppedName = Path(droppedFile).name
originalfiles = sys.orig_argv[2:]
#long path shenanigans
joined = (' '.join(originalfiles))
re.sub (' +', ' ', joined)
listed = re.split(r'(.+?mkv)', joined)
listed = list(filter(None, listed))
listed = [i.lstrip() for i in listed]
#droppedFile= ['test.mkv0out.mkv', "test.mkv1out.mkv","test.mkv2out.mkv","test.mkv3out.mkv","test.mkv4out.mkv","test.mkv5out.mkv"]
#get path of script location and remove the tail
head_tail = os.path.split(sys.argv[0])
output_path = head_tail[0]
with open ('test.txt', 'a', encoding="utf-8") as file:
for each in listed:
file.write(each+"\n")