The "games.log" file is generated by the Quake 3 Arena server. It contains information about the matches, information such as: when it starts, when it ends, who killed who, who "killed himself" (he fell into the void, blew himself up), among others.
The purpose of the parser is to read the file, group the data from each match, and organize its information in JSON format.
Example:
21:42 Kill: 1022 2 22: <world> killed Isgalamido by MOD_TRIGGER_HURT
- The player "Isgalamido" died because he was injured and fell from a height that killed him.
2:22 Kill: 3 2 10: Isgalamido killed Dono da Bola by MOD_RAILGUN
- The player "Isgalamido" killed the player "Dono da Bola" using the weapon "Railgun".
For each game the parser should generate something like:
[{
"game": 1,
"status": {
"total_kills": 45,
"players": [
{
"id": 1,
"nome": "Mocinha",
"kills": 5,
"old_names": ["Dono da bola"]
},
{
"id": 2,
"nome": "Isgalamido",
"kills": 18,
"old_names": []
},
{
"id": 3,
"nome": "Zeh",
"kills": 20,
"old_names": []
}
]
}
}]
<world>
is not a player and should not appear in the player list or kill dictionary.- When
<world>
kills the player or the player kills himself, he loses -1 kill. total_kills
are game kills, this includes<world>
kills.- Players who disconnected from the match have their information removed from the log.