title_parser 0.1.2

Library for parsing SRT and VTT title cues
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented3 out of 7 items with examples
  • Size
  • Source code size: 22.17 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.94 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • internet-diglett/title_parser
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • internet-diglett

title_parser

Rust Publish in Crate Package Registry

Rust library for extracting plain text from SRT and WebVTT Subtitle Cues.

Getting Started

These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Requirements for the software and other tools to build, test and push

Installing

Add crate to your Cargo.toml

[dependencies]
title_parser = "0.1.2"

To parse a cue, such as:

1 - Cue Identifier
00:01:14.815 --> 00:01:18.114
- I'm text for a cue
- Me too!

You can import the trait to convert the cue string into a struct:

use title_parser::{CueTrait};

let text = "1 - Cue\n00:01:14.815 --> 00:01:18.114\n- I'm text for a cue\n- Me too!";
let cue = text.to_cue().unwrap();
assert_eq!(cue.text, "I'm text for a cue\nMe too!");

Development

Running the tests

cargo test

Docs

Opens local docsite for library and dependencies. Displays useful usage information

cargo docs --open

Style test

Checks if the best practices and the right coding style has been used.

cargo clippy

and

cargo fmt

Deployment

Add additional notes to deploy this on a live system

Built With

Versioning

We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • Billie Thompson - Provided README Template - PurpleBooth