diff options
author | neodarz <neodarz@neodarz.net> | 2017-07-10 18:27:54 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2017-07-10 18:27:54 +0200 |
commit | 64e26e695f6522aa9cf678c3308aa4de18b2fe3e (patch) | |
tree | d29447e614b335805e4a322848875444dcb53469 | |
parent | 5656ca6b16d050cd0c3f1f404915ed2c55855c7d (diff) | |
download | video_save-64e26e695f6522aa9cf678c3308aa4de18b2fe3e.tar.xz video_save-64e26e695f6522aa9cf678c3308aa4de18b2fe3e.zip |
Add argument option for choose input folder and output folder
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 = [] |