removed brackets from lyrics

This commit is contained in:
Carlos Galindo 2020-10-15 11:39:26 +02:00
parent 5e3ca2ad3a
commit fe04c18430

View file

@ -98,6 +98,7 @@ class Line:
self.chord_arr = [] self.chord_arr = []
self.lyric_arr = [] self.lyric_arr = []
self.build() self.build()
self.remove_brackets()
def __str__(self): def __str__(self):
assert len(self.chord_arr) == len(self.lyric_arr) assert len(self.chord_arr) == len(self.lyric_arr)
@ -174,6 +175,9 @@ class Line:
for i in range(len(self.lyric_arr)): for i in range(len(self.lyric_arr)):
self.lyric_arr[i] = re.sub(r"(^ | $)", " ", self.lyric_arr[i]) self.lyric_arr[i] = re.sub(r"(^ | $)", " ", self.lyric_arr[i])
def remove_brackets(self):
self.lyric_arr = [l.replace('}', '').replace('{', '') for l in self.lyric_arr]
def chorded(self): def chorded(self):
for key in self.extras: for key in self.extras:
for i in self.extras[key]: for i in self.extras[key]: