rcue
Simple CUE sheet reader for Rust. Has no dependencies and compiles on stable.
Usage
See generated documentation or tests in parser.rs for usage and some examples.
Add this to your Cargo.toml under [dependencies]
via crates.io
= "0.1.1"
or from GitHub directly
= { = "https://github.com/gyng/rcue" }
In your program:
extern crate rcue;
use parse;
use parse_from_file;
Limitations and notes
The current implementation has the following known limitations:
-
Indentation is treated as insignificant (= no proper contextual support). For example, if
REMfields appear after aTRACKfield (but are indented to theFILE's level, it will be wrongly assigned to theTRACKinstead.FILE "audio.wav" WAVE TRACK 01 AUDIO TITLE "track1" REM DISCID 860B640B ← This is wrongly(?) assigned to the TRACK -
Extraneous whitespace between fields causes parsing to fail.
REM COMMENT "A lot of extra spaces" -
Escaped double quotation marks in strings
\"are escaped into".
Consider leoschwarz/cue_sheet if this implementation is unsuitable for your use case.
Development
Verbose log information
For verbose logging to STDOUT and details on skipped lines in lenient mode, run rcue with the environment variable RCUE_LOG set to 1. For example:
# myapp.rs
RCUE_LOG=1 cargo run
Fuzzing
The parser fuzz test for rcue can be run using cargo fuzz in nightly.
cargo install cargo-fuzz -f
cargo +nightly fuzz run fuzz_parser
Clippy
Run clippy using
rustup install nightly # if not installed
rustup update nightly
cargo +nightly install clippy --force # --force to update
rustup run nightly cargo clippy
TODO
- Significant indentation/context support
- Serializer
- Clean up parsing even more