Python script to batch create lyric files on PC

  • tolgainci
  • tolgainci's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 4 days ago - 1 month 4 days ago #440 by tolgainci
tolgainci created the topic: Python script to batch create lyric files on PC
Hello,

I wrote a simple Python script, which finds the lyrics for mp3 files in a folder, downloads the lyrics from genius.com and saves them in txt format in another folder. It adds @!title and @!duration tags from the mp3 file. The mp3 files should be named in the format band-name-song-name.mp3 for it to work. Otherwise you can edit the script according to your requirements.

You can find the script here:
https://github.com/tolgainci/lyricpad-lyricsdownloader

Best Regards,

Tolga
Last Edit: 1 month 4 days ago by tolgainci.
The following user(s) said Thank You: dneilsen

Please Log in or Create an account to join the conversation.

More
1 month 4 days ago #441 by dneilsen
dneilsen replied the topic: Python script to batch create lyric files on PC
Awesome idea tolga
Any chance you could also write a quick how to for our less tech savvy users so they can use the python script?

Please Log in or Create an account to join the conversation.

More
1 month 10 hours ago - 1 month 10 hours ago #450 by dneilsen
dneilsen replied the topic: Python script to batch create lyric files on PC
Content supplied by Tolgainci




1. Download and install Python 3.6.3 from this link:
https://www.python.org/downloads/
2. Download and install the dependencies. Change to the directory of the downloaded file on a terminal/command prompt window which contains setup.py file and run the following:
python3 setup.py install
3. BeautifulSoup
https://www.crummy.com/software/BeautifulSoup/bs4/download/4.6/beautifulsoup4-4.6.0.tar.gz
4. Requests
https://github.com/requests/requests/tarball/master
5. Mutagen
https://github.com/quodlibet/mutagen/releases/download/release-1.39/mutagen-1.39.tar.gz
6. Download the script from here:
https://github.com/tolgainci/lyricpad-lyricsdownloader/blob/master/LyricPadLyricsDownloader.py
7. Edit this part of the script, replacing my folder paths with yours and save it:
keywords={"lyricsfolder":"/Users/tolgainci/Lyrics/",
          "mp3folder":"/Users/tolgainci/Lyrics/mp3/*.mp3"
         }
8. Run the script from the terminal/command prompt window:
python3 LyricPadLyricsDownloader.py

Your mp3 file names should be in the format band-name-song-name.mp3 with a dash in between each word. You can lookup the exact name from the genius website at genius.com/ to be sure. Enjoy :)
Last Edit: 1 month 10 hours ago by dneilsen.

Please Log in or Create an account to join the conversation.

Time to create page: 0.266 seconds