Skip to content

Commit e8930d2

Browse files
committed
Command line option to dump chat from demos
1 parent b1cbb10 commit e8930d2

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "coldmaps"
3-
version = "0.4.3"
3+
version = "0.4.4"
44
authors = ["Tails8521 <tails8521@gmail.com>"]
55
edition = "2021"
66

src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ pub fn main() -> Result<(), iced::Error> {
4949
if arg == "--demoplayer" {
5050
demo_player::run().unwrap();
5151
return Ok(());
52+
} else if arg == "--chat" {
53+
let paths = args[2..].iter().map(|arg| PathBuf::from(arg)).collect::<Vec<_>>();
54+
let outputs = process_demos(paths);
55+
for (path, chat) in outputs.iter().filter_map(|output| output.heatmap_analysis.as_ref().map(|a| (output.path.clone(), chat::format_chat_messages(a)))) {
56+
println!("Chat of: {}\n{}\n", path.to_string_lossy(), chat.join("\n"));
57+
}
58+
return Ok(());
5259
}
5360
}
5461
App::run(Settings {

0 commit comments

Comments
 (0)