garantizar que los acordes están alineados encima del texto

This commit is contained in:
Carlos Galindo 2022-11-21 19:48:34 +01:00
parent 890c2397e3
commit d41e4d2824

View file

@ -149,7 +149,7 @@ class Line:
self.lyric_arr.append(Line.ECHO_BEGIN if inside_echo else '')
mid = True
self.lyric_arr[-1] += self.text[i]
self.lyric_arr = [re.sub(r"(^ | $)", " ", l) for l in self.lyric_arr]
self.lyric_arr = [l if l != "" else " " for l in self.lyric_arr]
def remove_brackets(self):
self.lyric_arr = [l.replace('}', '').replace('{', '') for l in self.lyric_arr]
@ -173,7 +173,7 @@ class Chord:
ENG_INDEX = {'C': 0, 'C#': 1, 'D&': 1, 'D': 2, 'D#': 3, 'E&': 3, 'E': 4, 'F&': 4, 'F': 5, 'E#': 5, 'F#': 6, 'G&': 6, 'G': 7, 'G#': 8, 'A&': 8, 'A': 9, 'A#': 10, 'B&': 10, 'B': 11, 'C&': 11, 'B#': 0}
def __init__(self, text, base_transpose=0):
self.text = text
self.text = text + " "
self.items = []
self.base_transpose = base_transpose
ignore = False