-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
108 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ mod ext { | |
pub mod agent; | ||
} | ||
|
||
pub use arcdps_evtc::*; | ||
pub use evtc::*; | ||
pub use ext::agent::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# arcdps_evtc | ||
# evtc | ||
|
||
Rust bindings for the ArcDPS EVTC API. | ||
Includes everything shared between Arc's realtime API used by plugins and Arc's log API consumed by parsers. | ||
|
||
Documentation can be found at [zerthox.github.io/arcdps-bindings/arcdps_evtc/](https://zerthox.github.io/arcdps-bindings/arcdps_evtc/). | ||
Documentation can be found at [zerthox.github.io/arcdps-bindings/evtc/](https://zerthox.github.io/arcdps-bindings/evtc/). |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "evtc_dump" | ||
version = "0.1.0" | ||
authors = ["Zerthox"] | ||
edition = "2021" | ||
description = "Dump ArcDPS EVTC log information" | ||
repository = "https://github.com/zerthox/arcdps-bindings" | ||
|
||
[dependencies] | ||
clap = { version = "4.4.6", features = ["derive"] } | ||
evtc_parse = { path = "../evtc_parse", features = ["serde", "zevtc"] } | ||
serde_json = "1.0.107" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
use clap::Parser; | ||
use evtc_parse::parse_file; | ||
use std::{ | ||
fs::File, | ||
io::BufWriter, | ||
path::{Path, PathBuf}, | ||
}; | ||
|
||
#[derive(Debug, Clone, Parser)] | ||
struct Args { | ||
/// Input path to EVTC file. | ||
pub input: String, | ||
|
||
/// Output path to JSON file. | ||
/// | ||
/// Defaults to input path with JSON file extension. | ||
pub output: Option<PathBuf>, | ||
} | ||
|
||
impl Args { | ||
fn output_path(&self) -> PathBuf { | ||
self.output | ||
.as_ref() | ||
.cloned() | ||
.unwrap_or_else(|| Path::new(&self.input).with_extension("json")) | ||
} | ||
} | ||
|
||
fn main() { | ||
let args = Args::parse(); | ||
|
||
let log = parse_file(&args.input).expect("failed to parse EVTC log"); | ||
|
||
let events = log | ||
.events | ||
.into_iter() | ||
.map(|event| event.into_kind()) | ||
.collect::<Vec<_>>(); | ||
|
||
let file = File::create(args.output_path()).expect("failed to create output file"); | ||
let writer = BufWriter::new(file); | ||
serde_json::to_writer_pretty(writer, &events).expect("failed to write events"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
[package] | ||
name = "arcdps_parse" | ||
name = "evtc_parse" | ||
version = "0.6.2" | ||
authors = ["Zerthox"] | ||
edition = "2021" | ||
description = "Parsing for ArcDPS EVTC logs" | ||
repository = "https://github.com/zerthox/arcdps-bindings" | ||
|
||
[dependencies] | ||
arcdps_evtc = { path = "../arcdps_evtc" } | ||
evtc = { path = "../evtc" } | ||
byteorder = "1.4.3" | ||
serde = { version = "1.0.160", features = ["derive"], optional = true } | ||
thiserror = "1.0.38" | ||
zip = { version = "0.6.4", optional = true } | ||
|
||
[features] | ||
serde = ["dep:serde", "arcdps_evtc/serde"] | ||
serde = ["dep:serde", "evtc/serde"] | ||
zevtc = ["dep:zip"] | ||
zip = ["zevtc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.