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.1.tar.gz (43.8 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.1-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylyr-1.0.1.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pylyr-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6f605004c86ec66d1ab22401435c556c67a0900863571c0b337e73dbe805b661
MD5 164c2e857419a51e1d0ebdc3649f49a2
BLAKE2b-256 4e3b0592ef61e1cc38dd6b29b6df4097295c56ff33a32c52a0176f7e82458c18

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylyr-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pylyr-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8cf7dc77e9bbb49f6515c45a9869578eb1a0192cbbf8b0a8a16b9a1ce4942d61
MD5 3ce09729eec1f86da78bef595c8dbaeb
BLAKE2b-256 970ba19672e743eb1ea8446e90bd793ce6dea51cce717dc1559c5adb8be6c44b

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