GithubHelp home page GithubHelp logo

srt2lrc's Introduction

SRT to LRC Converter

This is a simple command-line tool written in Go that converts SubRip subtitle (.srt) files into Lyric (.lrc) files.

Usage

To use this tool, you need to have Go installed on your machine. Once you have Go installed, you can run the program with the following command:

go run srt2lrc.go input.srt output.lrc

Replace input.srt with the path to your .srt file, and output.lrc with the path where you want the .lrc file to be saved.

Functionality

The program works by parsing the .srt file and converting each subtitle into the .lrc format. The .lrc format is a simple text format that is often used for lyrics of songs, but it can also be used for subtitles.

The program assumes that the .srt file is structured like this:

1
00:00:20,000 --> 00:00:24,400
Example subtitle

Each subtitle is converted into two lines in the .lrc file: one line for the start time and text, and one line for the end time with a blank line.

Limitations

This tool is a simple example and might not work with all .srt files, as the .srt format can have many variations. It also does not handle errors, so it might fail if the .srt file is not formatted correctly.

License

This project is licensed under the terms of the MIT license.

srt2lrc's People

Contributors

safeoy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.