Pipe the lyrics to the $PAGER - lyrics - Print lyrics of songs given the artist and title
(HTM) hg clone https://bitbucket.org/iamleot/lyrics
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) changeset c3c54aeb68a2cf0144e9994e252a42ab0208f495
(DIR) parent c3d8e0daf04f4c2dc97cff7dd6611b0243337eb9
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Fri, 10 May 2019 11:42:54
Pipe the lyrics to the $PAGER
Diffstat:
lyrics.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff -r c3d8e0daf04f -r c3c54aeb68a2 lyrics.py
--- a/lyrics.py Wed Mar 27 00:43:11 2019 +0100
+++ b/lyrics.py Fri May 10 11:42:54 2019 +0200
@@ -36,6 +36,7 @@
"""
+from pydoc import pager
from urllib import request
from bs4 import BeautifulSoup, SoupStrainer
@@ -87,6 +88,7 @@
try:
lf = Genius(artist, title)
- print(lf.lyrics())
+ lyric = lf.lyrics()
+ pager(lyric)
except Exception:
exit(1)