kills module

This commit is contained in:
Robin Appelman 2026-11-12 18:10:44 +01:00
commit c8664f9e47
Signed by: robin
SSH key fingerprint: SHA256:kifqgrqnut7q1YUIrI0AdMNC23qiKAS/T9uGFmIYvbE
13 changed files with 233 additions and 36 deletions

17
examples/kills.rs Normal file
View file

@ -0,0 +1,17 @@
use main_error::MainError;
use std::env::args;
use std::fs;
use tf_log_parser::module::Kills;
use tf_log_parser::parse_with_handler;
fn main() -> Result<(), MainError> {
let path = args().nth(1).expect("No path provided");
let content = fs::read_to_string(path)?;
let kills = parse_with_handler::<Kills>(&content)?.0;
for kill in kills {
println!("{}", serde_json::to_string(&kill)?);
}
Ok(())
}