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
grepcommand:grep -ri 'lyric string' ~/.lyrics
- A nice corollary is that song titles can be determined with a
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
Release history Release notifications | RSS feed
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.2.tar.gz
(43.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pylyr-1.0.2-py3-none-any.whl
(31.1 kB
view details)
File details
Details for the file pylyr-1.0.2.tar.gz.
File metadata
- Download URL: pylyr-1.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eac702235a3768289248d899db83d4bc586789ef913e4fce163f0731bc068105
|
|
| MD5 |
166e374e74f8d34a954f5c61e081b87f
|
|
| BLAKE2b-256 |
01e4aefbbcd8a8689e846222eb5f544da1688321cee5cdabf5670ae5b49de7f2
|
File details
Details for the file pylyr-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pylyr-1.0.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
013c8979c15cb7272255f6dbc8d6ce81eab4aada22eb9bf5f7bfe985ff49d225
|
|
| MD5 |
5d97bb2d7e0499a38427ca4d8727ee4f
|
|
| BLAKE2b-256 |
bc9e639d57213676219adb1a6b817e0c539ebe01fed1f0209f4c2fda3da103d6
|