Fetch the currently playing song from Spotify and display lyrics on cmd or in a browser tab.
Project description
SwagLyrics-For-Spotify
Fetches the currently playing song from Spotify on Windows, Linux and macOS and displays the lyrics in the command-line or in a browser tab.
Refreshes automatically when song changes. The lyrics are fetched from Genius.
Turns out Deezer already has this feature in-built but with swaglyrics
, you can have it in Spotify as well.
I'm mainly trying to build this project as far as I can, for practice and to learn and work with more technologies and platforms.
Initially developed this for personal use. Pretty much functionality oriented -- I usually develop something that I can see helping me and other users in the same situation. Packaged so I can first hand handle production-ready code to an extent and to make distribution and usage easier.
Community
- SwagLyrics participated in Google Code-in 2018 with CCExtractor Development.
- SwagLyrics is participating in Google Summer of Code with CCExtractor Development. Interested? Read more about it here.
Changelog
-
v0.2.6
- Added favicon
- Removed extra dependency
-
v0.2.5
- Refactored stripper to support more songs straightaway
- Fixed bugs
- Added -n argument (helps while testing)
- Added more test cases
-
v0.2.4
- Added server-side database
- All songs with lyrics on Genius supported now!
- Global sync of unsupported songs
- Added more tests (85% coverage)
- Improved issue-making using Spotify API
-
v0.2.3
- Added macOS support
- Added more tests
- Added unidecode to support songs with diacritics
- Fixed commandline not clearing b/w songs on Linux
- Improved issue-making
-
v0.2.1
- Added Linux support
- Added more tests
- Set up code coverage and continuous integration
-
v0.1.9
- A GitHub issue is created automatically on the repo when an unsupported song is encountered (implemented server-side using pythonanywhere).
Installation
Requires Python3. Use pip or pip3 depending on your installation.
pip install swaglyrics
Make sure to use a version >= 0.1.6 since the previous ones don't have the tab
option supported.
Usage
swaglyrics [-h] [-t] [-c]
Either the tab or cli argument is required to output lyrics.
Arguments:
-h, --help show this help message and exit
-t, --tab Display lyrics in a browser tab.
-c, --cli Display lyrics in the command-line.
You can quit by pressing Ctrl+C
Compiling SwagLyrics for Development
- Clone the repo by
git clone https://github.com/SwagLyrics/SwagLyrics-For-Spotify.git
or use ssh. cd
into the cloned repo.pip install -e .
the -e flag installs it locally in editable mode.
Improvements Planned
Linux and macOS support doneBetter logging of unsupported songs, the isolated unsupported.txt is sub-optimal for multiple users since the file will only update locally with songs which worked fine when it was just me but since I hope others use it too, I'll try to add a better method with server support.- Better tests to test all of the functionality.
- Perhaps a tiny app using Electron that could fit in your tray to be opened whenever you want lyrics for a song.
- Supporting more songs, currently the program sometimes fails at remixes since while the lyrics are same as original, the artist is the remixer.
- Documenting all the files.
SwagLyrics on Windows with Firefox Side-View
Screencast - SwagLyrics on Linux
Screencast - SwagLyrics on macOS
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for swaglyrics-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3513b97c654ffb19bd7275842eea633c3af72113af0e58fb5b789d242d81057b |
|
MD5 | ea6c7a7d1f852e3e6b8894cf3c1e5b03 |
|
BLAKE2b-256 | 7fdcdcca99b7bdf68b5b80cb10e3b8ec74655dc548219bf3a90ba04e413edcac |