# mvdparser [![Test](https://github.com/vikpe/mvdparser/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/vikpe/mvdparser/actions/workflows/test.yml) [![crates](https://img.shields.io/crates/v/mvdparser)](https://crates.io/crates/mvdparser) [![docs.rs](https://img.shields.io/docsrs/mvdparser)](https://docs.rs/mvdparser/) > Extract information from QuakeWorld MVD demos ## Functions ### duration ```rust mvdparser::countdown_duration(&data) // Option mvdparser::match_duration(&data) // Option mvdparser::demo_duration(&data) // Option ``` ### timestamp Gets timestamp from `epoch` in serverinfo (preferred) _or_ from `matchdate` print. ```rust mvdparser::timestamp(&data) // Option> ``` ### clients ```rust mvdparser::clients(&data) // Result> struct Client { pub number: u8, pub name: String, pub team: String, pub color: [u8; 2], pub is_spectator: bool, pub is_bot: bool, } ``` ### players ```rust mvdparser::players(&data) // Result> struct Player { pub name: String, pub team: String, pub color: [u8; 2], pub frags: i32, pub ping: u32, pub is_bot: bool, } ``` ### teams ```rust mvdparser::teams(&data) // Result> struct Team { pub name: String, pub color: [u8; 2], pub frags: i32, pub ping: u32, pub players: Vec, } ``` ### prints ```rust mvdparser::prints(&data) // Vec struct Print { pub id: PrintId, pub content: Vec, } ``` ### ktxstats See crate [ktxstats](https://github.com/vikpe/ktxstats) for full definition. ```rust mvdparser::ktxstats_v3(&data) // Option pub struct KtxstatsV3 { pub version: i32, pub date: DateTime, pub map: String, pub hostname: String, pub ip: String, pub port: i32, pub mode: String, pub tl: i32, pub dm: i32, pub tp: i32, pub duration: i32, pub demo: String, pub teams: Vec, pub players: Vec, } ``` ### serverinfo See crate [quake_serverinfo](https://github.com/vikpe/quake_serverinfo) for more info. ```rust mvdparser::serverinfo(&data) // Option struct Serverinfo { pub admin: Option, pub deathmatch: Option, pub epoch: Option, pub fpd: Option, pub fraglimit: Option, pub gamedir: Option, pub hostname: Option, pub ktxmode: Option, pub ktxver: Option, pub map: Option, pub matchtag: Option, pub maxclients: Option, pub maxfps: Option, pub maxspectators: Option, pub mode: Option, pub needpass: Option, pub pm_ktjump: Option, pub progs: Option, pub qvm: Option, pub status: Option, pub serverdemo: Option, pub sv_antilag: Option, pub teamplay: Option, pub timelimit: Option, pub version: Option, pub z_ext: Option, } ```