-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop.py
39 lines (34 loc) · 969 Bytes
/
loop.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#from frames_stitcher import frames_stitcher
import os
import time
from scripts.frames_stitcher import stitchy_code
#log start time
start_time = time.perf_counter()
#add paths
inputPath = ".//input//"
outputPath = ".//output//"
extension = ".png"
#get chapter
list_of_files = os.listdir(inputPath)
print("\n\t\tMachi Image-Stitcher")
print("\nDetected folders in .\input:\n")
print("\t[+] - Input")
print("\t | ")
for files in list_of_files:
print(f"\t └ {files}")
chapter = (input(f"\nChoose a folder to stitch or press enter to stitch all: "))
if chapter != "":
try:
stitchy_code(chapter)
except:
print('interation failed! skipping...')
pass
else:
for files in list_of_files:
try:
stitchy_code(int(files[:2]))
except:
print('interation failed! skipping...')
pass
print(f"\nProcess completed in {time.perf_counter()-start_time} seconds.")
input('\nPress ENTER to exit')