songs2slides

A tool that automatically finds song lyrics and creates lyric slideshows
git clone https://git.ashermorgan.net/songs2slides/
Log | Files | Refs | README

commit 4ac7b10610fc8f2d6100f7c5c3aa7b4a73e6cd34
parent e6faaf8419f4e43fc92f307fee9b647659b9055f
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date:   Mon, 27 Apr 2020 12:32:22 -0700

Simplify lyric review in the CLI.

Diffstat:
Mcliapp.py | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/cliapp.py b/cliapp.py @@ -40,9 +40,7 @@ if (__name__ == "__main__"): try: # Create temp file temp = tempfile.NamedTemporaryFile(mode="w+t", suffix=".txt", delete=False) - for line in lyrics: - temp.writelines(line) - temp.writelines("\n\n") + temp.writelines("\n\n".join(lyrics)) temp.close() # Open temp file and wait @@ -53,9 +51,7 @@ if (__name__ == "__main__"): rawLines = f.read() # Parse lyrics - newLyrics = rawLines.split("\n\n") - del newLyrics[-1] - lyrics = newLyrics + lyrics = rawLines.split("\n\n") except: print("There was an error while reviewing the lyrics. The unrevised lyrics will be used instead.") finally: