#subtitle #parse #write #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

#1590 in Parser implementations

Download history 68/week @ 2023-11-20 39/week @ 2023-11-27 21/week @ 2023-12-04 35/week @ 2023-12-11 25/week @ 2023-12-18 72/week @ 2023-12-25 13/week @ 2024-01-01 53/week @ 2024-01-08 43/week @ 2024-01-15 28/week @ 2024-01-22 47/week @ 2024-01-29 44/week @ 2024-02-05 45/week @ 2024-02-12 68/week @ 2024-02-19 108/week @ 2024-02-26 58/week @ 2024-03-04

285 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

~23MB
~335K SLoC