Skip to content

A CLI Tool to Scrape & Display Lyrics from terminal either using Rofi or FZF (default).

License

Notifications You must be signed in to change notification settings

Sidmaz666/lyrica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lyrica

A CLI Tool to Scrape Lyrics from Terminal either using Rofi or FZF(default). The script scrapes lyrics from A-Z Lyrics using curl, fzf or rofi as a menu and uses bat to display the lyrics.

Showcasae

Dependencies

Set the TERM Variable

Rofi will spawn bat or cat in the default Terminal, as set in the TERM Variable in .zshrc, .bashrc , .xinitrc or in the /etc/environment file.

  1. curl (for scrapping)
  2. sed (for regex)
  3. grep (for regex)
  4. fzf (for menu)
  5. bat (for displaying lyrics, pager)
  6. rofi (for menu-optional)
  7. nerd-font (for uicode support-very optional)

Installation

You can run the script as usual!

   ./lyrica Monster
   ./lyrica --rofi

However, if you search for lyric from your terminal or would like to bind lyrica to a keybinding then run the following command to install Lyrica system-wide

   sudo cp lyrica /usr/bin/lyrica

Usage

 [USAGE]: lyrica [SEARCH_QUERY]
 lyrica --rofi To Launch Lyrica With Rofi
              By Default Menu is set to FZF	       
 lyrica [SEARCH_SONG_NAME] > [LYRIC_FILE_NAME].txt To Download
 lyrica -h | --help To See Usage!

Download

 lyrica Dancing in my room > lyrics.txt

Misc

  • Change the default Pager bat to cat by modifying the DISPLAY_LYRIC variable.
  • To change the Rofi Search Prompt Theme, change the variable ROFI_PROMPT.
  • Additional FZF flags can be added by modifying the FZF_PROMPT variable.
  • Select the last option, 0. Go to Next Page to scrape more lyrics!

Licensed under GPL-3.0