diff --git a/hello.py b/examples/chord_charts.py similarity index 95% rename from hello.py rename to examples/chord_charts.py index fb3dd54..bd741be 100644 --- a/hello.py +++ b/examples/chord_charts.py @@ -25,6 +25,7 @@ all_chords = sorted(CHARTS["western"].keys()) print("Standard Guitar Chord Charts:") print("-" * 30) + def fingering_to_tab(fingering): if not fingering: return "" @@ -39,7 +40,9 @@ def fingering_to_tab(fingering): if fret == 0: strings[string_num] = "0" + strings[string_num][1:] else: - strings[string_num] = "-" * (fret - 1) + str(fret) + strings[string_num][fret:] + strings[string_num] = ( + "-" * (fret - 1) + str(fret) + strings[string_num][fret:] + ) # Combine strings with newlines, and add string names tab = "e|" + strings[0] + "\n" @@ -50,6 +53,7 @@ def fingering_to_tab(fingering): tab += "E|" + strings[5] + "\n" return tab + for chord_name in all_chords: # Store original chord name for lookup lookup_name = chord_name diff --git a/song.py b/examples/song.py similarity index 100% rename from song.py rename to examples/song.py