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"}
Metadata
Release files for minetest-log-parser 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| minetest_log_parser-0.0.2.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minetest_log_parser-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / minetest_log_parser-0.0.2.tar.gz
| Download URL | minetest_log_parser-0.0.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
047cd361151cae014beaac7bcd8df7207a104f06e5262519aa345f47f556d127
|
|
BLAKE2b-256 checksum How to use checksums |
4125359f66ebef34cc88455409b3f417bece68647e3f69e4efde16ad5708a062
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / minetest_log_parser-0.0.2-py3-none-any.whl
| Download URL | minetest_log_parser-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13c39602253d666c52e7c771d7151d48b50ec843dd4a73f1b5c87ffe1245d4f3
|
|
BLAKE2b-256 checksum How to use checksums |
436dcbb97802a4cb541f32b463e9e902698eaeafd3df1449ef9e6aa78d3355e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|