Skip to main content

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


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.5.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

lrcup-0.5.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file lrcup-0.5.0.tar.gz.

File metadata

  • Download URL: lrcup-0.5.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for lrcup-0.5.0.tar.gz
Algorithm Hash digest
SHA256 11c6ccd22f8b2c6846d90e6e70e238b2797b991884568a00c092a7fe26a1836b
MD5 b25819d1d56ca64d8b6f1908722d8c0d
BLAKE2b-256 d6d4e5d834230998936c36418cda38965036efd02590bdd5ee9d775b14bd1634

See more details on using hashes here.

File details

Details for the file lrcup-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: lrcup-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for lrcup-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88a9d6e55d2021d31e1cff6ab42ea84c078e8c0e15bab28e6e59e4bc634a966f
MD5 c1145464dd45b79fbb335620690d9e47
BLAKE2b-256 e821f3cbdeaa18c148bebe100fc86786fffe4c35dfa21cf3d8598aeb641bc3d3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page