diff options
| author | Daniel Schadt <kingdread@gmx.de> | 2020-05-02 14:33:07 +0200 | 
|---|---|---|
| committer | Daniel Schadt <kingdread@gmx.de> | 2020-05-02 14:33:07 +0200 | 
| commit | 5741abdfe2dfa6a93e7d71c39ecedadbff9b65ee (patch) | |
| tree | 5ec118b07af6dd659142484eae39bf0bef3187c5 | |
| parent | cea9d932c57c065492f900b9c465423f5a529a2a (diff) | |
| download | evtclib-5741abdfe2dfa6a93e7d71c39ecedadbff9b65ee.tar.gz evtclib-5741abdfe2dfa6a93e7d71c39ecedadbff9b65ee.tar.bz2 evtclib-5741abdfe2dfa6a93e7d71c39ecedadbff9b65ee.zip | |
update README
| -rw-r--r-- | README.md | 34 | 
1 files changed, 29 insertions, 5 deletions
| @@ -1,20 +1,44 @@  evtclib  ======= +[](https://crates.io/crates/evtclib) +[](https://docs.rs/evtclib) +  `evtclib` is a Rust library that allows you to parse `.evtc` files, as  generated by the [arcdps addon](https://www.deltaconnected.com/arcdps/) for the  Guild Wars 2 video game. -It supports a low-level parsing interface and a higher-level interface which -interprets some of the data and converts it to a more appropriate interface. +Features: -`evtclib` uses `cargo` as its build tool and as such can be included as a -dependency in other Rust projects. API docs can be generated locally by running -`cargo doc`. +* A low-level parsing interface with structs mimicking the arcdps C structs. +* A high-level interface, intended for consumption within Rust applications. +* Support for reading zipped evtc files (`.evtc.zip` or `.zevtc`). +* Backwards compatible for older revisions of the evtc format.  `evtclib` is currently in beta-stage. Not all evtc events are supported, and  the API is not yet set in stone. +Example +------- + +```rust +use std::fs::File; + +fn main() -> Result<(), Box<dyn std::error::Error>> { +    // Open a file for processing +    let mut file = File::open("Skorvald/20200421-183243.evtc")?; +    // Parse the raw content of the file +    let raw_log = evtclib::raw::parse_file(&mut file)?; +    // Process the file to do the nitty-gritty low-level stuff done +    let log = evtclib::process(&raw_log)?; +    // Do work on the log +    for player in log.players() { +        println!("Player {} participated!", player.account_name()); +    } +    Ok(()) +} +``` +  License  ------- | 
