aboutsummaryrefslogtreecommitdiff
path: root/command.py
diff options
context:
space:
mode:
authortassaron2017-06-22 22:23:04 -0400
committertassaron2017-06-22 22:23:04 -0400
commit3c903794e3588560f2b9d342214009d55a675d5a (patch)
tree8b1b1a55343d2489b90c14020d5b174db5c7d7ea /command.py
parent49cda1bf3aa1800459d1085496291bec90ae6a5a (diff)
more commandline component options
commandline options that existed before the redesign are now back
Diffstat (limited to 'command.py')
-rw-r--r--command.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/command.py b/command.py
index 9012ca4..1a1e810 100644
--- a/command.py
+++ b/command.py
@@ -2,6 +2,7 @@ from PyQt4 import QtCore
from PyQt4.QtCore import QSettings
import argparse
import os
+import sys
import core
import video_thread
@@ -22,14 +23,14 @@ class Command(QtCore.QObject):
description='Create a visualization for an audio file',
epilog='EXAMPLE COMMAND: main.py myvideotemplate.avp '
'-i ~/Music/song.mp3 -o ~/video.mp4 '
- '-c 0 image ~/Pictures/thisWeeksPicture.jpg '
- '-c 1 video "preset=My Logo" -c 2 vis classic')
+ '-c 0 image path=~/Pictures/thisWeeksPicture.jpg '
+ '-c 1 video "preset=My Logo" -c 2 vis layout=classic')
self.parser.add_argument(
'-i', '--input', metavar='SOUND',
- help='input audio file', required=True)
+ help='input audio file')
self.parser.add_argument(
'-o', '--output', metavar='OUTPUT',
- help='output video file', required=True)
+ help='output video file')
# optional arguments
self.parser.add_argument(
@@ -71,7 +72,11 @@ class Command(QtCore.QObject):
for arg in args:
self.core.selectedComponents[i].command(arg)
- self.createAudioVisualisation()
+ if self.args.input and self.args.output:
+ self.createAudioVisualisation()
+ elif 'help' not in sys.argv:
+ self.parser.print_help()
+ quit(1)
def createAudioVisualisation(self):
self.videoThread = QtCore.QThread(self)