From fe04c184309157d6ddd172f6605bb747a735c6b9 Mon Sep 17 00:00:00 2001 From: Carlos Galindo Date: Thu, 15 Oct 2020 11:39:26 +0200 Subject: [PATCH] removed brackets from lyrics --- src/song_types.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/song_types.py b/src/song_types.py index 3896063..79eebd3 100644 --- a/src/song_types.py +++ b/src/song_types.py @@ -98,6 +98,7 @@ class Line: self.chord_arr = [] self.lyric_arr = [] self.build() + self.remove_brackets() def __str__(self): assert len(self.chord_arr) == len(self.lyric_arr) @@ -174,6 +175,9 @@ class Line: for i in range(len(self.lyric_arr)): 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): for key in self.extras: for i in self.extras[key]: