Python module and CLI for the LRCLIB API
Project description
LRCUP
Python CLI and library for interacting with the LRCLIB.net API.
Also includes tools for embedding lyrics, along with general LRC tools.
Installation
Install via PyPI:
pip install lrcup
CLI Usage
# Upload a synced/unsynced LRC file:
lrcup upload example.lrc
# Upload lyrics from an already embedded track:
lrcup upload file.flac
# Embed lyrics into a file:
lrcup embed lyrics.lrc track.flac
# Search for lyrics and download them:
lrcup search never gonna give you up
# Search and download lyrics for a given folder:
lrcup autosearch /mnt/music/
# Search and embed lyrics for a given folder:
lrcup autosearch --embed /mnt/music/
# Search and embed lyrics for a given folder, also save lrc files:
lrcup autosearch --embed --download /mnt/music/
Module Usage
The class method names are based off of the LRCLIB API endpoints.
Please refer to them for more information.
from lrcup import LRCLib
lrclib = LRCLib()
# Fetch synced lyrics via search
results = lrclib.search(
track = "Never Gonna Give You Up",
artist = "Rick Astley"
)
print(results[0]["syncedLyrics"])
# Fetch synced lyrics directly
track = lrclib.get(
track = "Never Gonna Give You Up",
artist = "Rick Astley",
album = "Whenever You Need Somebody",
duration = 215
)
if track is not None:
print(track["syncedLyrics"])
# Publish synced lyrics
lrclib.publish(
token = lrclib.request_challenge(),
track = "Never Gonna Give You Up",
artist = "Rick Astley",
album = "Whenever You Need Somebody",
duration = 215,
plain_lyrics = "*Rickrolling*",
synced_lyrics = "[00:00.00] *Rickrolling*"
)
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
lrcup-0.8.0.tar.gz
(8.7 kB
view details)
Built Distribution
lrcup-0.8.0-py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file lrcup-0.8.0.tar.gz
.
File metadata
- Download URL: lrcup-0.8.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c02a1cf805f29056ba0d6565cdc429ca06947c406a2b9cd2cb97c8d6687a81ce |
|
MD5 | ffdd28a22db66d40b074711483290428 |
|
BLAKE2b-256 | 92b98495fd6c8f684ed08f8e7fd69084ca6e180bf1a8e4e5b0411288187a0a26 |
File details
Details for the file lrcup-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: lrcup-0.8.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d46e44d7c5c6fd72a8f10dbb7bcb07a711f32965ff104d0927ed5ee1bf81ed6 |
|
MD5 | ed818b4fd792b220e02a60873dc4cb6f |
|
BLAKE2b-256 | f58c817099f21b108401a10b60ab069c25dc31d908221fc288d74c6beb010f84 |