Giter VIP home page Giter VIP logo

Comments (2)

wwevo avatar wwevo commented on September 2, 2024
2017-12-20T15:19:34 37150.553 INF Executing command 'lp' by Telnet from 127.0.0.1:48194
0. id=293844, NemoTheTerrible, pos=(-31.4, 19.2, -5612.3), rot=(-75.9, -2700.0, 0.0), remote=True, health=196, deaths=42, zombies=2582, players=0, score=2372, level=200, steamid=76561198237200194, ip=197.234.149.102, ping=200
1. id=1516522, Cyborg Pirate Ninja Jesus, pos=(-2870.6, 108.3, 1802.0), rot=(-21.1, 1586.3, 0.0), remote=True, health=37, deaths=33, zombies=400, players=0, score=243, level=83, steamid=76561198084399656, ip=188.3.54.47, ping=51
2. id=1657080, pixiu Hellcase.com, pos=(-5651.3, 96.1, 8102.5), rot=(-26.7, -57.7, 0.0), remote=True, health=48, deaths=0, zombies=4, players=0, score=4, level=2, steamid=76561198404967309, ip=217.99.167.30, ping=56
3. id=1615908, hannesschmoschmannes, pos=(-2638.5, 39.3, 2708.5), rot=(-90.0, 354.4, 0.0), remote=True, health=56, deaths=7, zombies=114, players=0, score=79, level=35, steamid=76561198003209403, ip=79.200.233.46, ping=39
4. id=1459, Penny Blush, pos=(5482.0, 68.1, 5249.7), rot=(-40.2, -2211.3, 0.0), remote=True, health=212, deaths=3, zombies=2308, players=0, score=2293, level=148, steamid=76561198020235763, ip=184.153.202.112, ping=122
5. id=1613144, GogataBG, pos=(-5270.3, 98.7, 6653.6), rot=(-26.7, -88.6, 0.0), remote=True, health=31, deaths=34, zombies=78, players=0, score=0, level=23, steamid=76561198375205410, ip=87.126.176.217, ping=36
Total of 6 in the game

This is a typical response if players are present. I'd need an array containing all players each with their own data.
So a regexp and a function is needed t convert this to a database-ready (possibly orm) format

from 7dtd-chrani-server.

wwevo avatar wwevo commented on September 2, 2024

\d{1,2}. id=(\d+), ([\w+]+), pos=\((.?\d+.\d), (.?\d+.\d), (.?\d+.\d)\), rot=\((.?\d+.\d), (.?\d+.\d), (.?\d+.\d)\), remote=(\w+), health=(\d+), deaths=(\d+), zombies=(\d+), players=(\d+), score=(\d+), level=(\d+), steamid=(\d+), ip=(\d+\.\d+\.\d+\.\d+), ping=(\d+)\n*

wrote A regexp, not a neat one. It works for now

from 7dtd-chrani-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.