diff options
Diffstat (limited to '')
-rwxr-xr-x | convert.py | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -4,16 +4,25 @@ import sys import os import subprocess import re -#from subprocess import PIPE, CalledProcessError, check_call, Popen from subprocess import check_output, STDOUT, CalledProcessError, Popen, PIPE import pexpect import time -import progressbar +#import progressbar import datetime +if len(sys.argv) == 3: + sourcedir = sys.argv[1] + outdir = sys.argv[2] -sourcedir = "/home/neodarz/video_save/ZXAAA Demo ZX Spectrum/Cracktro" -outdir = "/home/neodarz/video_save/ZXAAA Demo ZX Spectrum_mp3/Cracktro" + if not os.path.isdir(sourcedir): + print("No such file or directory: '"+str(sourcedir)+"'") + sys.exit() +else: + print("Simple tool for convert mp4 file to mp3") + print("Usage:\nconvert.py [SOURCE] [DESTINATION]") + +#sourcedir = "/home/neodarz/video_save/ZXAAA Demo ZX Spectrum/Cracktro" +#outdir = "/home/neodarz/video_save/ZXAAA Demo ZX Spectrum_mp3/Cracktro" def dirSize(path,ext1,ext2): list_dir = [] |