Metadata-Version: 2.3
Name: lrcup
Version: 0.5.0
Summary: Python module and CLI for the LRCLIB API
Project-URL: Homepage, https://github.com/iiPythonx/lrcup
Project-URL: Issues, https://github.com/iiPythonx/lrcup/issues
Author-email: iiPython <ben@iipython.dev>
License-File: LICENSE.txt
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: click
Requires-Dist: mutagen
Requires-Dist: requests
Description-Content-Type: text/markdown

# LRCUP

Python CLI and library for interacting with the [LRCLIB.net API](https://lrclib.net/).  
Also includes tools for embedding lyrics, along with general LRC tools.

## Installation

Install via PyPI:
```sh
pip install lrcup
```

## CLI Usage

```sh
# 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.

```py
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*"
)
```
