Code Monkey home page Code Monkey logo

wolf_quake's Introduction

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

wolf_quake's People

Contributors

nicolasauler avatar

Watchers

 avatar

wolf_quake's Issues

doc: publish documentation to a page

Maybe publish cargo doc to a Github Pages

Possible path: setting up Github Actions to call CircleCI and then use GA to publish an artifact to Github Pages.

sec: remove codecov token if making repo public

To get codecov badge in private repositories, a token needs to be sent as a Query param.
If repo is made public, one needs to remove the current url to the badge and substitute with the new url for public repositories, avoiding leakage of codecov token.

Change player score from u32 to i32

When kills a player, their score is decremented by 1.
Since it doesn't specify in the gist that the scores must be positive, it's more guaranteed if we change score to be a signed integer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.