https://github.com/quakeworld/ktxstats
A crate for handling QuakeWorld KTX stats JSON.
https://github.com/quakeworld/ktxstats
json ktx quake quakeworld
Last synced: about 1 month ago
JSON representation
A crate for handling QuakeWorld KTX stats JSON.
- Host: GitHub
- URL: https://github.com/quakeworld/ktxstats
- Owner: quakeworld
- Created: 2024-05-03T17:57:05.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-30T12:42:16.000Z (about 1 year ago)
- Last Synced: 2025-03-30T13:32:51.896Z (about 1 year ago)
- Topics: json, ktx, quake, quakeworld
- Language: Rust
- Homepage: https://crates.io/crates/ktxstats
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.YML
Awesome Lists containing this project
README
# ktxstats [](https://github.com/quakeworld/ktxstats/actions/workflows/test.yml) [](https://crates.io/crates/ktxstats) [](https://docs.rs/ktxstats/)
> A crate for handling QuakeWorld KTX stats JSON files
* See [Ktxstats V3](./src/v3.rs) struct definition.
## Usage
```rust
let content = fs::read_to_string( "20250124-0556_4on4_blue_vs_red[dm3].mvd.ktxstats.json").unwrap();
let stats = KtxstatsV3::try_from(content.as_str()).unwrap();
// stats.version 3
// stats.date 2025-01-24 06:16:38 +0000
// stats.map "dm3"
// stats.hostname "la.quake.world:28501 NAQW"
// stats.ip "127.0.1.1"
// stats.port 8501
// stats.mode "team"
// stats.tl 0
// stats.dm 0
// stats.tp 0
// stats.duration 200
// stats.demo "4on4_red_vs_blue[dm3]20250124-0556.mvd"
// ...
```