Skip to content

hakerdefo/cmus-lyrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cmus-lyrics

cmus-lyrics is a simple bash script that fetches the lyrics of current song playing in CMus (C* Music Player).

Dependencies :

  • Perl - Perl (Practical Extraction and Reporting Language) originally developed by Larry Wall is a family of high-level, general-purpose, interpreted, dynamic programming languages. Perl is available in repositories of almost every Linux distribution under the sun. Use your distribution's package manager to install it. Perl Module URI::Escape is also needed.

  • Wget - Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. Most Linux distributions have Wget in their package repositories so you can easily install Wget via the package manager of your distribution in case it is not installed on your system.

Installation :

Very easy.

Obtain sudo privileges and download cmus-lyrics-master.zip,

sudo -s
wget --content-disposition https://github.com/hakerdefo/cmus-lyrics/archive/master.zip

Extract it,

unzip cmus-lyrics-master.zip

Make cmus-lyrics executable and copy it to /usr/local/bin/ directory,

chmod 755 cmus-lyrics-master/cmus-lyrics
cp cmus-lyrics-master/cmus-lyrics /usr/local/bin/

And finally clean up the leftovers and drop sudo privileges,

rm cmus-lyrics-master.zip
rm -rf cmus-lyrics-master/
exit

Usage :

Run cmus-lyrics and it will fetch and print lyrics of the song currently playing in CMus.

Bonus :

You can enable a few more lyrics providers by installing following optional dependencies,

  • curl - curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). curl is available in repositories of almost every linux distribution. You can easily install it from your package manager.

  • jq - jq is like sed for JSON data. You can use jq to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text. jq is available in the repositories of Debian, Ubuntu, Fedora, openSUSE, Arch (AUR), FreeBSD (FreshPorts), Solaris (OpenCSW), OS X (Homebrew). Linux and OS X binaries are also available from the Download section of jq website. If you decide to use the jq binary directly from the jq website you will have to rename it after downloading from jq-linux64 or jq-linux32 to simply jq. In case of OS X rename it to jq from jq-osx-amd64.

  • Glyr - Glyr is a search engine for music related metadata. It comes as a command-line interface tool & a C library. cmus-lyrics requires glyrc, which is the command-line interface to libglyr. You can install glyrc via your package manager. If your distribution doesn't have it in its repository, you can compile it your self following this instructions.

Support :

If you like cmus-lyrics, please consider supporting it, even the smallest contribution goes a long way. It is quick & easy via PayPal, Buy Me a Coffee or Liberapay:

Support via PayPal
"Buy Me A Coffee"
Support via Liberapay

Credits :

Federico Builes - cmus-lyrics wouldn't have been possible without wonderful makeitpersonal created by him.

License :

Public Domain Mark
This work (cmus-lyrics, by hakerdefo), identified by hakerdefo, is free of known copyright restrictions.