Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain text output #3

Open
Naheel-Azawy opened this issue Dec 2, 2020 · 4 comments
Open

Plain text output #3

Naheel-Azawy opened this issue Dec 2, 2020 · 4 comments

Comments

@Naheel-Azawy
Copy link

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

@gee842
Copy link
Owner

gee842 commented Dec 3, 2020 via email

@Naheel-Azawy
Copy link
Author

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.

@gee842
Copy link
Owner

gee842 commented Dec 3, 2020 via email

@Naheel-Azawy
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants