A Python application that allows you to search for song lyrics using the Genius API.
- Search for song lyrics by song title.
- Display a list of search results with song titles and artists.
- View formatted lyrics with song title, artist, and tags.
- Automatically copy lyrics to the clipboard.
- Save the history of the song you get to a CSV file.
- Python 3.x
tkinter
(usually included with Python)lyricsgenius
libraryazapi
library- Genius API token
- Go to the Genius Developer Portal and sign up (or sign in if you already have an account).
- Create a new Client Access Token by clicking on "Create New" under the "Client Access Tokens" section.
- Copy the token and replace
'YOUR_GENIUS_API_TOKEN_HERE'
in the code with your actual token.
- Install the
lyricsgenius
library by running the following command:pip install lyricsgenius
- Clone or download the project repository.
- Open the project in your preferred Python IDE (e.g., PyCharm, Visual Studio Code).
- Replace
'YOUR_GENIUS_API_TOKEN_HERE'
in the code with your actual Genius API token. - Run the
lyricsfinder.py
file. - Enter a song title in the search field and click the "Search" button or press Enter to search using Genius.
- Optionally, click the "AZLyrics" button to search using AZLyrics after entering a song title.
- Select a song from the list of search results.
- The formatted lyrics will be displayed in the lyrics text area and automatically copied to the clipboard.
- The lyrics will also be saved to a CSV file in the
./Song Finder/song_saved.csv
directory.
search_lyrics
: Searches for song lyrics based on the user's input.on_song_select
: Displays the formatted lyrics when a song is selected from the search results.auto_copy
: Automatically copies the lyrics to the clipboard.auto_save
: Saves the lyrics to a CSV file.reset_lyrics
: Resets the application and clears the search results and lyrics display.on_key_press
: Handles the 'r' key press event to reset the application.azLyrics_search
: Searches for lyrics using the AZLyrics API and displays them in the application.
tkinter
: Python's standard GUI library (usually included with Python).lyricsgenius
: A Python library for accessing song lyrics from Genius.com.re
: Python's regular expression library for text manipulation.threading
: Python's library for creating and managing threads.os
: Python's library for interacting with the operating system.csv
: Python's library for reading and writing CSV files.azapi
: A Python library for fetching lyrics from AZLyrics.
This project was developed using Python 3.x and can be opened and run in any Python IDE or text editor that supports Python development. Popular choices include PyCharm, Visual Studio Code, and Sublime Text.
This project is licensed under the MIT License.