A command line lyrics utility tool which search and add lyrics to your offline songs.
Project description
🎼 lyricy
A command line lyrics utility tool which search and add lyrics to your offline songs.
Why lyricy ?
We can use spotDL/spotify-downloader to download our spotify playlist and songs along with album art and metadata. But it does not add the lyrics of the songs in song metadata. lyricy search for the lyrics of the song add to song metadata.
you can use Retro music player for android to listen the offline local songs with synced lyrics.
Features
- Used as a Python package and Command Line Interface (CLI)
- Easy to add lyrics to your offline songs
- Preview of lyrics
- Synced lyrics with lrc time tags
- Lyrics without lrc tags
- Save lyrics as lrc file
- Add your own lyrics or downloaded lyrics to songs
Usage
CLI
Installation
Using pip
pip install lyricy
Windows user download this executable file
Usage: python -m lyricy [OPTIONS] COMMAND [ARGS]...
A command line lyrics utility tool which search and add lyrics to your
offline songs.
Options:
--help Show this message and exit.
Commands:
add Search and add lyrics to given TRACK.
remove Remove lyrics from given TRACK.
search Search for lyrics for given track or query
show Show the lyrics of TRACK if available.
- Searching for lyrics using your queries
- Searching for lyrics for your track
- Adding lyrics
- Remove lyrics
- Changing lyrics provider
- Show lyrics
- Downloading lrc file
- Add lrc file to song
Searching for lyrics using your queries
Usage: python -m lyricy search [OPTIONS]
Search for lyrics for given track or query
Options:
-t, --track PATH file path of track
-d, --disable-preview Disable the preview
-l, --only-lyrics Show Lyrics Only (without LRC tag)
-s, --save TEXT Save file as .lrc
-q, --query TEXT search query of track name
-p, --provider TEXT Lyrics provider name [rc] or [mo]
--help Show this message and exit.
lyricy search --query "jolly yo gymkanna"
Searching for lyrics for your track
Track must have album metadata title
lyricy search --track 'Imagine Dragons - Believer.mp3'
After searching it print list of lyrics, enter the index number lyrics to get the full lyrics
Adding lyrics
Adding lyrics to track metadata to get synced lyrics
Usage: python -m lyricy add [OPTIONS] TRACK
Search and add lyrics to given TRACK.
TRACK can be the filepath of a track or a directory path.
Options:
-q, --query TEXT search for this query instead of track name
-d, --disable-preview Disable the preview
--show Print the lyrics and ask for confirmation
--lrc PATH Lyrics file to add on track
-p, --provider TEXT Lyrics provider name: [lr] (LRCLIB), [bl] (BetterLyrics), [rc] (RcLyricsBand), or [mo] (Megalobiz)
-r, --recursive Recursively process directories
-a, --auto Auto-match and save lyrics without prompting
--help Show this message and exit.
lyricy add 'Imagine Dragons - Believer.mp3'
Select the preferred lyrics for the song to add it.
If the track does not have metadata title or has an irrelevant filename, you can use the --query option to override this:
lyricy add 'some-track.mp3' --query "vikram title track"
Flagship Automation (Bulk Tagging & Auto-Match)
You can recursively tag an entire directory of tracks and automatically match/save lyrics using the default smart fallback chain without any interactive prompting:
lyricy add --recursive --auto ./my_music_directory/
Changing lyrics provider
By default, the lyrics provider uses a smart fallback chain starting with LRCLIB (our flagship premium provider). You can manually lock it to a specific provider:
lrfor https://lrclib.net (Default, lightning-fast, high-quality synchronized/plain lyrics)blfor BetterLyrics (Direct timed XML TTML parsing)rcfor https://rclyricsband.com/ (Scraped synchronized lyrics)mofor https://www.megalobiz.com/ (Scraped synchronized lyrics)
lyricy add 'some-track.mp3' --query "vikram title track" --provider bl
lyricy search --query "karka kark" --provider lr
Remove lyrics
Usage: lyricy remove [OPTIONS] TRACK
Remove lyrics from given TRACK.
TRACK is the filepath of track.
Options:
--help Show this message and exit.
lyricy remove 'Imagine Dragons - Believer.mp3'
Show lyrics
Usage: lyricy show [OPTIONS] TRACK
Show the lyrics of TRACK if available.
TRACK is the filepath of track.
Options:
-l, --only-lyrics Show Lyrics Only (without LRC tag)
--help Show this message and exit.
lyricy show 'Imagine Dragons - Believer.mp31
Downloading lrc file
lyricy search --query "new york" --save "new_york"
This search and ask for the prompt, select any song it will download and save as lrc file
Add lrc file to song
lyricy add track.mp3 --lrc track.lrc
It will add the lyrics to song metadata
Python Package
Install
Using pip
pip install lyricy
Simple Usage
>>> from lyricy import Lyricy
>>> l = Lyricy()
>>> results = l.search("karka karka")
>>> selected_lyrics = results[0]
>>> selected_lyrics.fetch()
>>> selected_lyrics.lyrics
>>> selected_lyrics.lyrics_without_lrc_tags
Saving and adding lyrics to track
>>> selected_lyrics.save("lyrics.lrc")
>>> selected_lyrics.add_to_track("path_to_track.mp3")
Using Other Providers
By default, the provider is LRCLIB (Providers.LRCLIB), but you can specify other providers like Providers.BETTERLYRICS, Providers.RCLYRICSBAND, or Providers.MEGALOBIZ.
>>> from lyricy import Lyricy, Providers
>>> l = Lyricy()
>>> results = l.search("vikram", provider=Providers.BETTERLYRICS)
>>> selected_lyrics = results[0]
>>> selected_lyrics.fetch()
>>> selected_lyrics.lyrics
>>> selected_lyrics.lyrics_without_lrc_tags
Dev Setup
- Clone repo
- Install package requirements
pip install -r requirements
- Install dev requiremnts
pip install black flake8 pytest
- Linting
black
flake8 -v
- Test
pytest -v
Lyrics Providers
- LRCLIB (https://lrclib.net) - Lightning-fast default provider.
- BetterLyrics (https://lyrics-api.boidu.dev) - Timed XML TTML.
- RcLyricsBand (https://rclyricsband.com/) - Scraped synced lyrics.
- Megalobiz (https://www.megalobiz.com/) - Scraped synced lyrics.
Contributions
Contributions are Welcome. Feel free to report bugs in issue and fix some bugs by creating pull requests. Comments, Suggestions, Improvements and Enhancements are always welcome.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lyricy-1.5.tar.gz.
File metadata
- Download URL: lyricy-1.5.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7c8a743dbe86cbe82b21f63908f335cd1c3f75aacacce48aa6e1560959e77ca
|
|
| MD5 |
9749eecbcbba2e9431c61a5808a89c68
|
|
| BLAKE2b-256 |
4b210a807ba0f2372e7c7bf8b9070e984bb78807097d780675c5ef267ef379c4
|
Provenance
The following attestation bundles were made for lyricy-1.5.tar.gz:
Publisher:
python-publish.yml on yogeshwaran01/lyricy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lyricy-1.5.tar.gz -
Subject digest:
c7c8a743dbe86cbe82b21f63908f335cd1c3f75aacacce48aa6e1560959e77ca - Sigstore transparency entry: 1652382094
- Sigstore integration time:
-
Permalink:
yogeshwaran01/lyricy@362bf6123ee8ea45fbc7501efa98ae89538c6bcd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/yogeshwaran01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@362bf6123ee8ea45fbc7501efa98ae89538c6bcd -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file lyricy-1.5-py3-none-any.whl.
File metadata
- Download URL: lyricy-1.5-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d17578572890fc6bb808bf0a8d62d3c2465ceb8baebfac9381716f036305a0b9
|
|
| MD5 |
5ee97c64c00ab6ac1f7fe78778fd81aa
|
|
| BLAKE2b-256 |
f3842307bc3bde715db3a27aad5aac5de45c0d55ca6a7135b05293e57edc7985
|
Provenance
The following attestation bundles were made for lyricy-1.5-py3-none-any.whl:
Publisher:
python-publish.yml on yogeshwaran01/lyricy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lyricy-1.5-py3-none-any.whl -
Subject digest:
d17578572890fc6bb808bf0a8d62d3c2465ceb8baebfac9381716f036305a0b9 - Sigstore transparency entry: 1652382286
- Sigstore integration time:
-
Permalink:
yogeshwaran01/lyricy@362bf6123ee8ea45fbc7501efa98ae89538c6bcd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/yogeshwaran01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@362bf6123ee8ea45fbc7501efa98ae89538c6bcd -
Trigger Event:
workflow_dispatch
-
Statement type: