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

Feature request: add a path option to the genius.save_lyrics()-function #251

Open
Tr33Bug opened this issue Dec 2, 2022 · 2 comments
Open

Comments

@Tr33Bug
Copy link

Tr33Bug commented Dec 2, 2022

From my view, there is no option to give the save_lyrics()-function a path or destination, where to save. I think that should be added.
If I missed something or someone has a smart workaround, please let me know :)

@allerter
Copy link
Collaborator

allerter commented Dec 6, 2022

You're right. save_lyrics() has a filename parameter which actually should be a path or destination parameter to determine the path and the filename altogether. A PR doing this would be welcome.
One thing that's missing either way is that save_lyrics should return the JSON/TXT string if no filename/path is supplied (the method docs point this out, but it's not implemented).

@sufyan-siddiqui
Copy link

sufyan-siddiqui commented Jan 15, 2023

I think there should be a separate parameter for for the path as path or destination instead of using the filename parameter, since we are sanitizing special characters from the filename parameter before writing.
Although there should be an implementation for returning as string when filename is not mentioned, we are already setting the filename (based on artist/album and song) whenever the base.save_lyrics() is used. So, the method always gets the filename in all of the current use cases.

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

No branches or pull requests

3 participants