io.github.killergerbah:jsubtitle

Subtitle file parsing library

License

License

GroupId

GroupId

io.github.killergerbah
ArtifactId

ArtifactId

jsubtitle
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

io.github.killergerbah:jsubtitle
Subtitle file parsing library
Project URL

Project URL

https://github.com/killergerbah/jsubtitle
Source Code Management

Source Code Management

https://github.com/killergerbah/jsubtitle/tree/main

Download jsubtitle

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.killergerbah/jsubtitle/ -->
<dependency>
    <groupId>io.github.killergerbah</groupId>
    <artifactId>jsubtitle</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.killergerbah/jsubtitle/
implementation 'io.github.killergerbah:jsubtitle:0.1.0'
// https://jarcasting.com/artifacts/io.github.killergerbah/jsubtitle/
implementation ("io.github.killergerbah:jsubtitle:0.1.0")
'io.github.killergerbah:jsubtitle:jar:0.1.0'
<dependency org="io.github.killergerbah" name="jsubtitle" rev="0.1.0">
  <artifact name="jsubtitle" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.killergerbah', module='jsubtitle', version='0.1.0')
)
libraryDependencies += "io.github.killergerbah" % "jsubtitle" % "0.1.0"
[io.github.killergerbah/jsubtitle "0.1.0"]

Dependencies

test (1)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar

Project Modules

There are no modules declared in this project.

jsubtitle

Bare-bones subtitle file parsing in Java. Currently supports SRT and ASS files.

Example Usage

ASS parsing

File file = new File("subtitles.ass");
AssFile assFile = AssFile.read(file);
EventSection eventSection = assFile.getEventSection();

for (DialogEvent event : eventSection.getEvents()) {
    String text = event.getText();
    long start = event.getStart();
    long end = event.getEnd();
    // ...
}

SRT parsing

File file = new File("subtitles.srt");
List<SrtSubtitle> subtitles = SrtSubtitle.read(file);

for (SrtSubtitle subtitle : subtitles) {
    String text = subtitle.getText();
    long start = subtitle.getStart();
    long end = subtitle.getEnd();
    // ...
}

Versions

Version
0.1.0