Skip to main content

pyLRCtool

Library to create and modify lrc files.

Functionality

  • parse lrc files and modify them
  • create new lrc files
  • export to srt file
  • import from srt file
  • add delay

Installation

git clone https://github.com/varyg1001/pylrctool
cd pylrctool
pip install .

Library usage

from pathlib import Path

import pendulum
from pylrctool import LRCEvent, LRCFile

lrc_file = LRCFile()

file = Path('test.lrc')
file2 = Path('test.srt')

# Both statements below are equivalent
lrc_file.from_file(file)
lrc_file.from_string(file.read_text())
lrc_file.from_srt(file2)

# add new events
event = LRCEvent(
    time=pendulum.duration(minutes=0, seconds=29, milliseconds=130),
    data="And I ain't gon' kill my vibe",
)
lrc_file.add(event)

# other event types
title = LRCEvent(data="Don't Be Afraid", type=LRCEvent.Type.Title)
author = LRCEvent(data="Azahriah / BLANKS", type=LRCEvent.Type.Author)
length = LRCEvent(data="02:52", type=LRCEvent.Type.Length)
lrc_file.add(title)
lrc_file.add(author)
lrc_file.add(author)

# shift with 1 minute
lrc_file.shift(minutes=1)

# merge lines to create repeat ie. [00:35.06][00:36.06]Don't be afraid
lrc_file.merge_lines()

# saved to out.lrc
output = Path('out.lrc')
lrc_file.dump(output)

# saved to out.scr
output = Path('out.src')
lrc_file.dump_to_srt(output)

# dumps lyrics only
lrc_file.dumps(data_only=True)

Metadata

Release files for pylrctool 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylrctool 0.2.0
File Size Uploaded
pylrctool-0.2.0.tar.gz 18.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylrctool 0.2.0
File Interpreter ABI Platform
pylrctool-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.6 kB

Release files / pylrctool-0.2.0.tar.gz

Download URL pylrctool-0.2.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
dd472efafc6af2a19a8ecd4a8c89ae8bec39611b0fe9b3fc7ec159e4d424a7c4
BLAKE2b-256 checksum
How to use checksums
39e9c190e63dc4bc5576fac8bd82ff8fcd46723d93d4d0a7a9c9e4b94e80e1c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.5

Release files / pylrctool-0.2.0-py3-none-any.whl

Download URL pylrctool-0.2.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1de172ae241c0cc2d72636387751970abd383379df7b6ba77b9b2a42ede789c4
BLAKE2b-256 checksum
How to use checksums
c6d08c291e1b1f9a119f3ab6e929dba43364d4a890c91170b2ac57e91d349b21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page