Minetest player action log parser
Project description
Minetest log parser
Simple parser for Minetest logs. Parses Minetest logs to JSON.
Description
It only asks for player actions on the server, including authorization and events such as digs, places, moves, actives, punched etc.
Using
Simple example reading via generator parsed dicts:
from src.minetest_log_parser.Parser.MinetestLogParser import MinetestLogParser
if __name__ == '__main__':
input = "./debug.txt"
minetestParser = MinetestLogParser(input)
for parsedLog in minetestParser.read():
playerNames = ['littlePrettyCat', 'Melon', 'Player']
if parsedLog['name'] in playerNames:
print(parsedLog)
Example for import logs to JSON:
from src.minetest_log_parser.Parser.MinetestLogParser import MinetestLogParser
if __name__ == '__main__':
input = "./debug.txt"
output = "./debug.json"
minetestParser = MinetestLogParser(input)
minetestParser.importToJson(output)
Parsed line output examples:
Action:
{"timestamp": 1698474247, "name": "Player", "action": "places node", "meta_action": null, "node": "default:dirt", "count": 1, "coords": null, "type": null, "logType": "action"}
Beowulf auth:
{"timestamp": 1698471091, "name": "Player", "ip": "127.0.0.1", "protocolVersion": "40", "formspecVersion": "4", "lang": "en", "logType": "beowulfAuth"}
Default auth:
{"timestamp": 1698471091, "name": "Player", "ip": "127.0.0.1", "logType": "auth"}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for minetest_log_parser-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fb27cdc221f30e8ae77ad9caab47755cb55f454bd382b68b1eb74373a32a0d0 |
|
MD5 | d3bbe12e5d18ef1b518221bca80d0b03 |
|
BLAKE2b-256 | c3841d348dbca14eb9e978777c5130803c88b795305f115bbd911c8b4a0c359f |
Close
Hashes for minetest_log_parser-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cba21611308e2fc2368741dd84f1a738ce0f49642b86f4d0c41647a438893d86 |
|
MD5 | 8bb7a8aa6df97b7e0d70edcd2dd87561 |
|
BLAKE2b-256 | f99ddfa1ae24e5d287d2472f25c80076de93291b0928867399b43ba2d7e62d25 |