#valve #source-engine #cli #closed-captions

app caption-compiler

Compiles and describes Valve's closed caption files

3 releases

new 0.1.2 Jun 17, 2024
0.1.1 Jun 1, 2024
0.1.0 May 31, 2024

#95 in Game dev

Download history 323/week @ 2024-05-30 25/week @ 2024-06-06 111/week @ 2024-06-13

459 downloads per month

GPL-3.0 license

87KB
226 lines

caption-compiler

A CLI tool that allows you to compile and describe Valve's closed captions.

Build Status Crates Status

Install

This tool can be installed via cargo:

$ cargo install caption-compiler

Usage

Usage: caption-compiler --input <INPUT> <COMMAND>

Commands:
  compile   Compiles to .DAT file
  describe  Describes .DAT file
  help      Print this message or the help of the given subcommand(s)

Options:
  -i, --input <INPUT>  Input filepath
  -h, --help           Print help

Examples

$ caption-compiler -i closecaption_english.dat describe

Caption: "<sfx><norepeat:4><clr:255,176,0>[Heavy gun firing]\0"
Hash: 2399413701
Block: 0
Offset: 0
Length: 102

Caption: "<sfx><norepeat:4>[Mudskipper Engine Start]\0"
Hash: 3280962098
Block: 0
Offset: 102
Length: 86

Caption: "<sfx><norepeat:4>[Mudskipper Engine Stop]\0"
Hash: 4243304205
Block: 0
Offset: 188
Length: 84

...

Dependencies

~7.5MB
~194K SLoC