#subtitle #write #parse #library #parser

subparse

Load, change and write common subtitle formats (srt/ass/idx/sub)

9 releases (breaking)

0.7.0 Apr 11, 2021
0.6.2 Sep 30, 2019
0.6.1 Aug 16, 2019
0.5.0 Feb 28, 2019
0.1.0 Mar 12, 2017

#1807 in Parser implementations

Download history 33/week @ 2024-07-22 55/week @ 2024-07-29 51/week @ 2024-08-05 77/week @ 2024-08-12 43/week @ 2024-08-19 91/week @ 2024-08-26 74/week @ 2024-09-02 94/week @ 2024-09-09 87/week @ 2024-09-16 139/week @ 2024-09-23 93/week @ 2024-09-30 74/week @ 2024-10-07 56/week @ 2024-10-14 43/week @ 2024-10-21 82/week @ 2024-10-28 73/week @ 2024-11-04

266 downloads per month
Used in 8 crates

MPL-2.0 and LGPL-3.0

94KB
2K SLoC

Introduction

subparse is a Rust library that lets use load, change and store subtitle files in various formats. Formatting and other data will be preserved.

You can find an examples how to use this library under examples/.

Currently supported are:

  • SubStationAlpha .ssa/.ass
  • MicroDVD .sub
  • SubRip .srt
  • VobSub .idx and .sub

Documentation

Crates.io

How to use the library

Add this to your Cargo.toml:

[dependencies]
subparse = "0.7.0"

lib.rs:

This crate provides a common interface for popular subtitle formats (.srt, .ssa, .ass, .idx, .sub).

Files can be parsed, modified and saved again - some formats can be created from scratch. The focus is on non-destructive parsing, meaning that formatting and other information are preserved if not explicitely changed.

Dependencies

~14–20MB
~341K SLoC