https://github.com/danitrod/quake-log-parser
https://github.com/danitrod/quake-log-parser
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/danitrod/quake-log-parser
- Owner: danitrod
- License: mit
- Created: 2023-10-01T23:42:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T04:37:00.000Z (about 2 years ago)
- Last Synced: 2025-02-05T06:29:49.561Z (11 months ago)
- Language: Rust
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Quake Log Parser
This is a CLI tool to parse and summarize Quake games from a log file.
## Usage
First, make sure you have [Rust](https://www.rust-lang.org/tools/install) installed and setup in
your environment. Then simply clone this repository, and run the application, feeding it a Quake
log file from stdin. Example:
```sh
cargo run -- < tests/qgames.log
```
You should get a JSON report of kills in the games printed to stdout.
## Approach
The project focuses on reading the following events from the logs:
- `InitGame`: This event is read to start a new game.
- `ClientUserinfoChanged`: This event is read to identify a new connecting player name and add it
to the game summary.
- `Kill`: This event is read to process a game kill.
Every other event is ignored by the parser for simplicity.
## External dependencies used
The [serde](https://docs.rs/serde/latest/serde/) struct serializer/deserializer framework and its
JSON library [serde_json](https://docs.rs/serde_json/latest/serde_json/) were used in this project
to safely serialize the output into JSON format.
The [assert-cmd](https://crates.io/crates/assert_cmd) crate was used as a development dependency,
for CLI end to end tests.
## Tests
You can run the application's unit and end to end tests with the following command:
```sh
cargo test
```
## License
[MIT](./LICENSE.md)