|
@@ -25,6 +25,8 @@ except (IndexError, ValueError):
|
|
# get commandline argument motiv's which already are determined
|
|
# get commandline argument motiv's which already are determined
|
|
try:
|
|
try:
|
|
already_given = str(sys.argv[2])
|
|
already_given = str(sys.argv[2])
|
|
|
|
+ # strip whitespaces
|
|
|
|
+ already_given = already_given.strip()
|
|
# raise exception if not letter only
|
|
# raise exception if not letter only
|
|
if not already_given.isalpha():
|
|
if not already_given.isalpha():
|
|
raise ValueError("Does not contain only letters")
|
|
raise ValueError("Does not contain only letters")
|
|
@@ -42,6 +44,8 @@ for i in already_given:
|
|
name = 'motiv-' + i
|
|
name = 'motiv-' + i
|
|
if not path.exists(name):
|
|
if not path.exists(name):
|
|
working_list.remove(i)
|
|
working_list.remove(i)
|
|
|
|
+ elif not check_gizmo_notation(name):
|
|
|
|
+ working_list.remove(i)
|
|
already_given = working_list
|
|
already_given = working_list
|
|
|
|
|
|
# format the remaining (motiv) argument in a list;
|
|
# format the remaining (motiv) argument in a list;
|
|
@@ -101,7 +105,6 @@ def motiv_gen(motiv_commandline_argument, name):
|
|
|
|
|
|
"""this program should produce a little song without accompaniment yet"""
|
|
"""this program should produce a little song without accompaniment yet"""
|
|
|
|
|
|
-
|
|
|
|
# compute missing motives
|
|
# compute missing motives
|
|
for i in range(len(diff_motiv_list)):
|
|
for i in range(len(diff_motiv_list)):
|
|
name = 'motiv-' + diff_motiv_list[i]
|
|
name = 'motiv-' + diff_motiv_list[i]
|