Skip to content

mauricio-prl/elixir-quake_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuakeParser

A simple parser for the Quake 3 Arena game log.

Installation

If available in Hex, the package can be installed by adding quake_parser to your list of dependencies in mix.exs:

def deps do
  [
    {:quake_parser, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/quake_parser.

Usage

Being in the project folder, start your elixir repl with iex:

iex -S mix

Then call start and death_report functions passing the filepath of the log:

QuakeParser.parse("path/to/log")

You should see an output like:

[
  %QuakeParser{
    kills: %{
      "Dono da Bola" => -1,
      "Isgalamido" => 1,
      "Mocinha" => 0,
      "Zeh" => -2
    },
    players: ["Dono da Bola", "Mocinha", "Isgalamido", "Zeh"],
    total_kills: 4
  }
]

Scoreboard:

QuakeParser.scoreboard("path/to/log")
%{
  "Assasinu Credi" => 22,
  "Chessus" => 0,
  "Dono da Bola" => 12,
  "Isgalamido" => 16,
  "Mal" => -3,
  "Oootsimo" => 20,
  "Zeh" => 9
}

Deaths report:

QuakeParser.death_report("path/to/log")
%{0 => %{"MOD_FALLING" => 1, "MOD_ROCKET" => 1, "MOD_TRIGGER_HURT" => 2}}

About

A simple parser for Quake games log

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages