LyricsGenius
LyricsGenius copied to clipboard
Feature request: add a path option to the genius.save_lyrics()-function
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 :)
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).
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.