Git Product home page Git Product logo

pylrc's People

Contributors

doakey3 avatar ffriese avatar lparam avatar simonit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pylrc's Issues

parser doesn't work

import re

synced_line_regex = re.compile(r'^(\[[0-5]\d:[0-5]\d(\.\d\d)?\])+.*', flags=re.MULTILINE)
synced_line_regex.findall('[00:06.466]') // []

Release Request

My last PR #8 fixed an annoying bug for me. It would be kind if you release this lib with this PR.
Thanks

Negative offset shift not working as it should

Currently when passing in a negative offset (for example -1100), the timestamps will have negative values. When going from .lrc to .srt like this, the timestamps in the .srt start overlapping.

ValueError: time data '2000' does not match format '[%M:%S.%f]'

I got this lrc and wanna parse it with pylrc.parse(). I get this error: ValueError: time data '2000' does not match format '[%M:%S.%f]'

[id: cy_ooazhasi]
[offset:2000]
[ar:Martin Solveig]
[ti:Hello (single version)]
[00:03.35][00:18.26][00:20.01][00:23.63][00:28.03][01:17.40][01:22.52][01:25.52][01:31.15][02:02.75][02:05.80][02:09.42][03:24.78][03:30.71][03:34.07][03:37.69][04:18.63][04:32.36]
[00:15.39][00:19.14][00:22.63][00:26.03][02:43.23][02:46.78][02:50.40][02:54.27][02:58.08][03:01.76][03:05.50][03:09.31][03:13.12][03:16.80][03:20.54]Hey
[00:46.11][02:23.72]I could stick around and get along with you,
[00:49.35][00:56.90][01:27.64][01:35.27][01:42.69][02:26.78][02:35.30][03:36.70][03:44.25][03:51.73]hello.
[00:53.59]It doesn't really mean that i'm into you,
[01:01.68][02:39.61][02:43.73][02:47.22][02:50.84][02:54.65][02:58.45][03:02.20][03:05.94][03:09.68][03:13.43][03:17.17]You're alright but I'm here, darling, to enjoy the party.
[01:04.83]Don't get too excited 'cause thats all you get from me,
[01:08.13][01:53.92][02:08.61][04:03.03][04:26.12]hey.
[01:08.88]Yeah I think you're cute,
[01:10.32]but I really think that you should know.
[01:14.53][01:59.66][03:22.28][04:08.89]I just came to say hello,
[01:20.02][01:24.02][03:28.02][03:32.95]hello,
[01:32.08][03:41.06]I'm not the kinda girl to get messed up with you,
[01:39.38][03:48.43]I'ma let you try to convince me to,
[01:47.00]It's alright I'm getting dizzy just enjoy the party.
[01:50.68][03:59.85]It's OK with me if you dont have that much to say,
[01:54.55][04:03.59]Kinda like this game but there's something you should know.
[02:04.99]hey,
[02:31.99]It doesn't really mean that I'm into you,
[03:55.98]It's alright, I'm getting dizzy, just enjoy the party.

The problem is the offset. It doesn't match the other time format.

AttributeError: 'Lyrics' object has no attribute 'shift'

I tried to follow your "Usage" example but when I do subs.shift(milliseconds=-1100) I get the attribute error that Lyrics doesn't have the attribute shift.
Am I doing something wrong? Or if it got removed, could it be readded?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.