Skip to content

nicolasauler/wolf_quake

Repository files navigation

Wolf Quake 🎮

Quake 3 Log Parser

🏞️ Overview

Wolf Quake is a parser for Quake 3 Arena log files.

You can find a log file: file

📜 Documentation

Documentation can be found in: DOCUMENTATION

🖱️ Usage

Quake 3 log parser

Usage: wolf_quake [OPTIONS] <LOG_FILE>

Arguments:
  <LOG_FILE>  The path to the log file, required

Options:
  -r, --report-type <REPORT_TYPE>      The type of report to generate - Report with player ranking and mean of death ranking - Report with player ranking - Report with mean of death ranking Default: all [default: all] [possible values: all, player-rank, mean-death]
  -f, --report-format <REPORT_FORMAT>  The format of the report to generate - Text table report in console - Html table report Default: text [default: text] [possible values: html, text]
  -o, --output-file <FILE>             The output file to write the report If not provided, the report will be printed to the console
  -h, --help                           Print help (see more with '--help')
  -V, --version                        Print version

Examples

Txt report

foo@bar:~$ wolf_quake -f text -o report.txt games.log
╭────────┬──────────────────┬─────────────────┬──────────────────╮
│        │                  │                 │                  │
│        │ Total game kills │ Kill Rank       │  Death Causes    │
│        │                  │ (Player: Score) │  (Cause: Count)  │
│        │                  │                 │                  │
├────────┼──────────────────┼─────────────────┼──────────────────┤
│        │                  │                 │                  │
│ Game 1 │        1         │   Player1: -1   │  TriggerHurt: 1  │
│        │                  │                 │                  │
├────────┼──────────────────┼─────────────────┼──────────────────┤
│        │                  │                 │                  │
│        │                  │   Player2: 1    │ Rocket Splash: 1 │
│ Game 2 │        2         │                 │                  │
│        │                  │   Player1: -1   │ TriggerHurt: 1   │
│        │                  │                 │                  │
╰────────┴──────────────────┴─────────────────┴──────────────────╯

Html report

foo@bar:~$ wolf_quake -f html -o report.html games.log

Not really formatted how it should be due to rendering in markdown, but you can open report.html to see the actual result in your browser.

Total game kills

Kill Rank

(Player: Score)

Death Causes

(Cause: Count)

Game 1

1

Player1: -1

TriggerHurt: 1

Game 2

2

Player2: 1

Player1: -1

Rocket Splash: 1

TriggerHurt: 1

🦺 Security and 💻 Software

Wolf Quake is written in Rust 🦀 and uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% safe Rust. It also heavily applies clippy lints to ensure the code is idiomatic and follows best practices.

Current status:

  • Enviroment setup: CI, local and github
  • Happy path log parsing and tests
  • Bug handling in original log file
  • CLI and tests
  • Documentation
  • Better docs.rs reference documentation

For testing, Wolf Quake uses the proptest crate, which is kind of a more purpose-oriented fuzzy testing tool.

⚗️ Contributing

Install pre-commit

  • Depends on Python installed (if not, add the git hook manually)
curl -LO https://github.com/pre-commit/pre-commit/releases/download/v3.7.0/pre-commit-3.7.0.pyz
python pre-commit-3.7.0.pyz install