Initial Commit
This commit is contained in:
commit
8391ecf8b3
9 changed files with 197 additions and 0 deletions
24
FFMpeg-Compressor/main.py
Executable file
24
FFMpeg-Compressor/main.py
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/python3
|
||||
|
||||
from modules import compressor
|
||||
from modules import printer
|
||||
from modules import utils
|
||||
import os
|
||||
|
||||
orig_folder = input("Folder: ").replace("'", "")
|
||||
|
||||
try:
|
||||
os.mkdir(f"{orig_folder}_compressed")
|
||||
printer.info(f"Created {orig_folder}_compressed folder")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
printer.info("Compression started!")
|
||||
compressor.compress(orig_folder)
|
||||
|
||||
if len(os.listdir(path=orig_folder)) == len((os.listdir(path=f"{orig_folder}_compressed"))):
|
||||
printer.info("Success!")
|
||||
utils.get_compression(orig_folder, f"{orig_folder}_compressed")
|
||||
else:
|
||||
printer.warning("Some files failed to compress!")
|
||||
utils.get_compression(orig_folder, f"{orig_folder}_compressed")
|
Loading…
Add table
Add a link
Reference in a new issue