Metadata-Version: 2.4
Name: rapsong-lrc
Version: 0.1.0
Summary: Validate LRC lyric timestamps, shift timing and export SRT subtitles
License-Expression: MIT
Project-URL: Homepage, https://rapsong.io/
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# RapSong LRC

A small, dependency-free Python tool to validate standard LRC lyric files,
shift their timestamps and export SRT subtitles for lyric-video editing.
Works with any music genre. It does not generate songs, transcribe audio or
create timestamps from untimed text.

## Install

Python 3.10 or newer:

```sh
pip install rapsong-lrc
```

## Usage

```sh
rapsong-lrc lyrics.lrc --check
rapsong-lrc lyrics.lrc --output lyrics.srt
rapsong-lrc lyrics.lrc --shift-ms 250 --output delayed.srt
rapsong-lrc lyrics.lrc --shift-ms -500 --format lrc --output shifted.lrc
rapsong-lrc lyrics.lrc --last-duration-ms 5000 --output longer-ending.srt
```

Example input (original sample text):

```text
[ti:Practice Session]
[00:01.00]Count the rhythm, find the light
[00:03.50]Write another line tonight
```

Existing output files are never overwritten. Input is UTF-8 (BOM accepted).
Supported timestamps: `[mm:ss]`, `[mm:ss.x]`, `[mm:ss.xx]`, `[mm:ss.xxx]`.
Multiple timestamps on one line are expanded; entries are sorted by time.
Standard metadata tags are ignored and `[offset:milliseconds]` is applied.
Negative resulting times clamp to zero. Simultaneous nonempty lines share one
SRT cue. Empty timestamped lines end the preceding cue. A cue ends at the next
timestamp; the final cue defaults to three seconds. Long gaps can therefore
produce long cues. Enhanced word-level LRC and untimed text are rejected.
Metadata is not retained in normalized LRC output. This is timing conversion,
not beat detection or forced alignment. Exit code 1 indicates a read, validation
or write error; argument errors use exit code 2.

## Related website

[RapSong](https://rapsong.io/) is the related music-creation website. This utility
is a standalone local companion for lyric timing workflows. No website account,
API key, uploads or network access are required by the package.

## Python API

```python
from rapsong_lrc.cli import convert
srt = convert('[00:01.00]Original lyric line', shift=250, srt=True)
```

## License

MIT. Use lyrics you own or have permission to process.
