A simple parser for the Quake 3 Arena game log.
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.
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}}