Open Naheel-Azawy opened 3 years ago
Thanks for taking interest in my toy project!
Is it possible to remove html tags on your side using regex and replace? If not I will be happy to take a look at adding a no-html option
On Thu, Dec 3, 2020, 7:21 AM Naheel notifications@github.com wrote:
Hi, great work! best lyrics source so far.
I have a tiny request, can you add an option that outputs only the lyrics as a plain text (i.e. no html)? This would make my script https://github.com/Naheel-Azawy/naheel-dotfiles/blob/master/scripts/lyrics#L56 a bit cleaner
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gee842/lyrica/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSQK2WV3AOIATEJ7LOTMQ3SS3DXBANCNFSM4ULFUJQQ .
Of course it's possible and I already did that. You can see awk handling html tags HERE. But it's kinda nasty. Also, if you make a tiny change in the html format, say for example, you remove one <hr>
, then I'll probably get garbage until I check the new style and handle it again. Overall, I think web scrapping is a bad practice.
To be clear, what my little script do is that it automatically checks my music player (mpd) or the browser (e.g. playing a music video on youtube). Once it finds out what music is playing, it shows the lyrics in the terminal. There's also an option to translate the lyrics as I have music from different languages and I need to understand them.
Thats a cool implementation idea, will check out your repo, sounds very useful
Anyway, I won't be changing this program for the forseeable future so you can use your script indefinitely into the future (I don't do web anymore)
Also I might break something permanently if I push changes to my heroku dyno, since I haven't used it for ages
On Thu, Dec 3, 2020, 6:10 PM Naheel notifications@github.com wrote:
Of course it's possible and I already did that. You can see awk handling html tags HERE https://github.com/Naheel-Azawy/naheel-dotfiles/blob/master/scripts/lyrics#L62. But it's kinda nasty. Also, if you make a tiny change in the html format, say for example, you remove one
, then I'll probably get garbage until I check the new style and handle it again. Overall, I think web scrapping is a bad practice.To be clear, what my little script do is that it automatically checks my music player (mpd) or the browser (e.g. playing a music video on youtube). Once it finds out what music is playing, it shows the lyrics in the terminal. There's also an option to translate the lyrics as I have music from different languages and I need to understand them.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gee842/lyrica/issues/3#issuecomment-737825863, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSQK2T5QXYI4NW2I3VPAXDSS5PZTANCNFSM4ULFUJQQ .
ok no problem then as far as it's doing what I want. For my script, maybe some day I'll keep it on it's own repo. And maybe I'll mess around with your server and send you pull requests. But probably not soon.
Hi, great work! best lyrics source so far.
I have a tiny request, can you add an option that outputs only the lyrics as a plain text (i.e. no html)? This would make my script a bit cleaner