cdtext 0.1.0

A rough implementation of CD-Text parser.
Documentation
  • Coverage
  • 25%
    10 out of 40 items documented0 out of 10 items with examples
  • Size
  • Source code size: 13.73 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • NDRAEY/cdtext
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • NDRAEY

cdtext

A rough implementation of CD-Text parser. This crate can be used to read CD-Text binary data given by CD drive.

See examples/parse.rs for more info.

Getting the data

To dump the CD-Text info from your CD in Linux, open your terminal and run following command:

cdrecord dev=/dev/srX -vv -toc

Where X is your drive number.

cdrecord will print some info into console, and create a cdtext.dat file.

Parsing and working with data

Firstly, load data from somewhere by using std::fs::read or use any function that can give you a slice of u8.

Then create a parser:

let cdtext = CDText::from_data_with_length(&data);

Then parse:

let data: Vec<cdtext::CDTextEntry> = cdtext.parse();

Now data is ready for further processing.

See docs for more information.