[WIP]lrcparser
A simple lyric file parser.
Why this parser?
Pros:
- ...
- Well, to be honest, there's no strong reasons.
Cons:
- Lack of tests
- Potential bugs that may screw your files up
- ...
...But if you have tried this library and think it useful...
then just keep using it, thank you for your support :)
Usage
[ti:test_lyric]
[al:TEST ~AVOIDING ERRORS~]
[by:283375]
[offset:250]
[00:00.02]Line 1
[00:00.28]Line 2
[00:02.83]Line 3
[00:28.33]Line 4 with translation | 一般大家都这么打翻译
[00:28.33]可惜我更喜欢换行
[00:28.33]你说得对,但是《lrcparser》是由……
[28:33.75]Line 6
from lrcparser import *
with open('example.lrc', 'r', encoding='utf-8') as lrc_file:
parsed = LrcParser.parse(lrc_file.read(), parse_translations=True)
offset, lrc_lines, attributes = parsed.values()
>>> offset
250
>>> lrc_lines
[
LrcLine(
start_time=LrcTime(0, 0, 20),
text=LrcText(LrcTextSegment(LrcTime(0, 0, 20), "Line 1")),
translations=None,
),
LrcLine(
start_time=LrcTime(0, 0, 280),
text=LrcText(LrcTextSegment(LrcTime(0, 0, 280), "Line 2")),
translations=None,
),
LrcLine(
start_time=LrcTime(0, 2, 830),
text=LrcText(LrcTextSegment(LrcTime(0, 2, 830), "Line 3")),
translations=None,
),
LrcLine(
start_time=LrcTime(0, 28, 330),
text=LrcText(
LrcTextSegment(LrcTime(0, 28, 330), "Line 4 with translation")
),
translations=[
LrcText(LrcTextSegment(LrcTime(0, 28, 330), "一般大家都这么打翻译")),
LrcText(LrcTextSegment(LrcTime(0, 28, 330), "可惜我更喜欢换行")),
LrcText(LrcTextSegment(LrcTime(0, 28, 330), "你说得对,但是《lrcparser》是由……")),
],
),
LrcLine(
start_time=LrcTime(28, 33, 750),
text=LrcText(LrcTextSegment(LrcTime(28, 33, 750), "Line 6")),
translations=None,
),
]
>>> attributes
{
"ti": "test_lyric",
"al": "TEST ~AVOIDING ERRORS~",
"by": "283375",
"offset": "250",
}
Metadata
Release files for lrcparser 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lrcparser-0.2.0.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lrcparser-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.8 kB
Release files / lrcparser-0.2.0.tar.gz
| Download URL | lrcparser-0.2.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c88064e390c3a05caee154ab65290d62c6f889049abe0a84af6ac9219abbff4e
|
|
BLAKE2b-256 checksum How to use checksums |
3d712ec1fcfe05bef61f4c345c301f6fc0101c50c19aa9bc392fd72b31e401af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / lrcparser-0.2.0-py3-none-any.whl
| Download URL | lrcparser-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f87db5e23b97b540d1e9a0ed97719179e753c26bea3823a4136f6105ffee402f
|
|
BLAKE2b-256 checksum How to use checksums |
51b604fe0f250f740d2ab6c0053f15047db08e8aadf7646639096639c667944d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency log