Skip to main content

Crate cinekey

Crate cinekey 

Source
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.
ExtraInfo
ParseContext
Hints and ancestors belonging to the input’s own directory path.
ParsedMedia
Identification and technical metadata parsed from one media name.
Token
A token borrows the original input; offsets are UTF-8 byte offsets.

Enums§

AudioProfile
A profile qualifying an audio codec.
Edition
Edition and presentation qualifiers explicitly present in a release name.
EpisodeNumbering
The numbering system used by a parsed episode.
ExpectedKind
An optional movie or series hint supplied by the caller.
ExtraCategory
MediaKind
The structural interpretation of a media name.
ReleaseFlag
Release status and packaging markers.
Separator
The delimiter immediately before a token.
StreamingService
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.