Skip to content

sypai/SiftSRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


SiftSRT: A complete Subtitle Parser & Editor

GSoC   CCExtractor Development

GPLv3 license


SiftSRT is a single header, simple and complete SRT parsing and editing library. It allows easy handling, processing and modifying subtitle files in SRT format. It is fast and efficient. It is an extension of a simple subtitle-parser by Oleksii Maryshchenko which was modified as simple-yet-powerful-subtitle-parser by Saurabh Shrivastava.

How to use SiftSRT

demo directory contains usage examples. Check it out.

  • Download the header file SiftSRT.h from SiftSRT.
  • As any other header file, include it in your program.

Create a SubtitleParserFactory object using the subtitle file to be edited.

SubtitleParserFactory* spf = new SubtitleParserFactory("inputFile.srt");

Use the SubtitleParserFactory object get a SubtitleParser object. Use this to get the subtitles.

SubtitleParser* sub;
sub = spf->getParser();

std::vector<SubtitleItem*> sub;
sub = parser->getSubtitles();

Using the SubtitleParser object create a co_oCCurEditor object.

co_oCCurEditor* edit;
edit = new co_oCCurEditor(sub);

Using the SubtitleParser object create a co_oCCurParser object.

co_oCCurParser* parse;
parse = new co_oCCurParser(sub);

The objects sub, edit and parse can be used to sift the given SRT file and are to be used for Subtitle Parsing and Editing.

Documentation

An extensive list of all the methods can be found @ sypai.github.io/SiftSRT.

Contribution

Contributions of any kind, suggestions, feedback, bug reports/fixes are will be highly appreciated!

Releases

No releases published

Packages

No packages published

Languages