Skip to main content

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minetest-log-parser 0.0.1
File Size Uploaded
minetest_log_parser-0.0.1.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for minetest-log-parser 0.0.1
File Interpreter ABI Platform
minetest_log_parser-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / minetest_log_parser-0.0.1.tar.gz

Download URL minetest_log_parser-0.0.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7fb27cdc221f30e8ae77ad9caab47755cb55f454bd382b68b1eb74373a32a0d0
BLAKE2b-256 checksum
How to use checksums
c3841d348dbca14eb9e978777c5130803c88b795305f115bbd911c8b4a0c359f
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.1-py3-none-any.whl

Download URL minetest_log_parser-0.0.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cba21611308e2fc2368741dd84f1a738ce0f49642b86f4d0c41647a438893d86
BLAKE2b-256 checksum
How to use checksums
f99ddfa1ae24e5d287d2472f25c80076de93291b0928867399b43ba2d7e62d25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page