Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.73 KB

README.md

File metadata and controls

65 lines (47 loc) · 1.73 KB

Lyrics Search for the CLI

A basic CLI lyrics search in Python 3, using the lyrics-extractor library.

Because I spend a lot of time in the terminal, I wanted the most straight-forward way to search for lyrics from the CLI without knowing the exact song name or title, or by searching for some of the lyrics. This script returns the lyrics of the best match for your search terms.

Key features:

  • CLI-only version
  • TK GUI version as well
  • Library supports flexible input (artist name, title, lyrics)
  • Library can handle misspellings

Prerequisites

  • Install required required libraries

    pip install -r requirements.txt
  • Create Google API key

  • Create Engine ID

See the lyrics-extractor readme for these prerequisites.

Installation

  1. Modify the script with your API key and Engine ID:

    extract_lyrics = SongLyrics(GCS_API_KEY, GCS_ENGINE_ID)
  2. If you want to execute the script directly:

    chmod +x lyrics.py
  3. (Optional) If you want to use the GUI script, install the python3-tk library for your distro (Debian for example):

    sudo apt install python3-tk

Usage Examples

Search using any combination of artist, title, or lyrics:

python3 lyrics.py artist title lyrics

Or execute directly:

./lyrics.py artist artist title lyrics

Search using song lyrics:

./lyrics.py some song lyrics

Or run without input get a prompt:

./lyrics.py
Lyrics search: