fixed casing
This commit is contained in:
parent
f2506cd785
commit
e9326b22d9
11
mzk/main.py
11
mzk/main.py
@ -12,11 +12,10 @@ import functions
|
|||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
functions.print_help()
|
functions.print_help()
|
||||||
else:
|
else:
|
||||||
sys.argv[1] = sys.argv[1].lower()
|
|
||||||
if sys.argv[1].startswith('--chord='):
|
if sys.argv[1].startswith('--chord='):
|
||||||
chord = sys.argv[1][8:]
|
chord = sys.argv[1][8:]
|
||||||
key = chord.split('_')[0]
|
key = chord.split('_')[0].upper()
|
||||||
type = chord[len(key)+1:]
|
type = chord[len(key)+1:].lower()
|
||||||
if key in constants.notes and type in constants.scales:
|
if key in constants.notes and type in constants.scales:
|
||||||
functions.print_chord(key, type)
|
functions.print_chord(key, type)
|
||||||
else:
|
else:
|
||||||
@ -25,13 +24,13 @@ else:
|
|||||||
elif sys.argv[1] == '--chords':
|
elif sys.argv[1] == '--chords':
|
||||||
functions.print_chords()
|
functions.print_chords()
|
||||||
elif sys.argv[1] == '--circle':
|
elif sys.argv[1] == '--circle':
|
||||||
functions.print_circle()
|
functions.print_circle_of_fifths()
|
||||||
elif sys.argv[1] == '--intervals':
|
elif sys.argv[1] == '--intervals':
|
||||||
functions.print_intervals()
|
functions.print_intervals()
|
||||||
elif sys.argv[1].startswith('--scale='):
|
elif sys.argv[1].startswith('--scale='):
|
||||||
scale = sys.argv[1][8:]
|
scale = sys.argv[1][8:]
|
||||||
key = scale.split('_')[0]
|
key = scale.split('_')[0].upper()
|
||||||
type = scale[len(key)+1:]
|
type = scale[len(key)+1:].lower()
|
||||||
if key in constants.notes and type in constants.scales:
|
if key in constants.notes and type in constants.scales:
|
||||||
functions.print_scale(key, type)
|
functions.print_scale(key, type)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user