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

Uploaded Source

Built Distribution

lrcup-0.4.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lrcup-0.4.3.tar.gz
Algorithm Hash digest
SHA256 565d24e75bd44c4d141e024c01cad251a3f1d181665b0e06dc9408d9529ff3a6
MD5 2f6556e269b8eb0f2e18df56b0e06499
BLAKE2b-256 572bf5434a04f75064c6b29bfb9f5614dfad9e08c593112e6ee8546506cd0ac0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lrcup-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a8f6b9546b347f10013fb13b49e93ba4ff16b04d18106bd591f0649d21cb25b6
MD5 2adeba7f2a28d068adab2a837894836b
BLAKE2b-256 342a5000d7e01cea0ebda5f64816f68aaa42f168eb15bcc6cf3c5c2e9a1471ae

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