Skip to main content

See song lyrics in the terminal

Project description

PyLyr

Get lyrics of a song playing through mpd via api requests and webscraping

  • Lyrics are cached in ~/.lyrics/ to avoid repeated requests for the same song
    • A nice corollary is that song titles can be determined with a grep command:
      grep -ri 'lyric string' ~/.lyrics
      

Usage

Run pylyr -h to see an overview of command flags

  • Output is to stdout by default to allow for easy manipulation

Examples

Downloading lyrics for all of a specific artist's songs:

ARTIST="<artist>"
mpc -f 'pylyr -v -t "%title%" -a "%artist%"' search artist "$ARTIST" \
| while read line
do
    sh -c "$line"
done

Downloading lyrics for your entire library:

mpc -f 'if \[ ! -f ~/.lyrics/"%artist% - %title%.txt" \]; \
then pylyr -v -t "%title%" -a "%artist%"; fi' listall | while read line
do
    sh -c "$line"
done

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylyr-1.0.0.tar.gz (43.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylyr-1.0.0-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file pylyr-1.0.0.tar.gz.

File metadata

  • Download URL: pylyr-1.0.0.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for pylyr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d07707b53275d82eb68016a5e3354115332cc3b0700aa2b72ab1fae2c3ce7f87
MD5 7a96c5726a7cb23099b834c092f0b488
BLAKE2b-256 fae10df0710ea7fa66a280b9a43a8f7bf5bfbb82ba946e27e51ea0c66071967c

See more details on using hashes here.

File details

Details for the file pylyr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pylyr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for pylyr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c805e1f48c7cda808cbf5159f490a46c504ecf0bd96248122c06c1f1a7548de8
MD5 ec5593c7c755dabde53cfbcda533fb96
BLAKE2b-256 e387f1a57daf17ed3f0035c35bc9330d99a2121ae3e553baa789e2ad16170764

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page