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 embed lyrics for a given folder:
lrcup autoembed /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.4.4.tar.gz
(5.8 kB
view details)
Built Distribution
lrcup-0.4.4-py3-none-any.whl
(7.5 kB
view details)
File details
Details for the file lrcup-0.4.4.tar.gz
.
File metadata
- Download URL: lrcup-0.4.4.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b195b8f0856db15d6628d2c6e815166ed8ccd0c07f239a1f0147e39ec65e9aee |
|
MD5 | 51cd67c92a13314f1a26616c3f7d28a6 |
|
BLAKE2b-256 | 69c73b5c603f454e1ae744df759a8d8439797de2f0e4111fbda62a1c4575deff |
File details
Details for the file lrcup-0.4.4-py3-none-any.whl
.
File metadata
- Download URL: lrcup-0.4.4-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d8595a2631d90e1472aa32f7cbe0440beb9749e2332aede58ac5b2a6f189008 |
|
MD5 | 9707da032028b1a8c37115eb26eb925c |
|
BLAKE2b-256 | 29915b8c3f63cdbcca19c636803cfc5e675e29ab7897738ca913bcdbe4118efb |