Expand description
A deterministic parser for movie and television release names.
Parsing is split into a small lexer and recognizers for structural markers and technical vocabulary. Each input yields one identification and metadata record.
§Example
use cinekey::{MediaKind, parse};
let media = parse("Arrival.2016.1080p.BluRay.mkv");
assert_eq!(media.kind, MediaKind::Movie);
assert_eq!(media.title.as_deref(), Some("Arrival"));
assert_eq!(media.year, Some(2016));Structs§
- EnumSet
- An efficient set type for enums.
- Extra
Info - Parse
Context - Hints and ancestors belonging to the input’s own directory path.
- Parsed
Media - Identification and technical metadata parsed from one media name.
- Token
- A token borrows the original input; offsets are UTF-8 byte offsets.
Enums§
- Audio
Profile - A profile qualifying an audio codec.
- Edition
- Edition and presentation qualifiers explicitly present in a release name.
- Episode
Numbering - The numbering system used by a parsed episode.
- Expected
Kind - An optional movie or series hint supplied by the caller.
- Extra
Category - Media
Kind - The structural interpretation of a media name.
- Release
Flag - Release status and packaging markers.
- Separator
- The delimiter immediately before a token.
- Streaming
Service - The platform named by a release’s service marker.
Functions§
- parse
- Parse a release name or the final component of a path-like string.
- parse_
with_ context - Parse a name with movie/series hints and local ancestor context.
- tokenize
- Split a release name into Unicode-aware word tokens that borrow the input. Punctuation remains represented by each token’s preceding separator and span.