aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-08-14 09:20:15 +0200
committerKarel Kočí <cynerd@email.cz>2015-08-14 09:20:15 +0200
commitbad6ea7151132c8904c2f298bd7b0702884b0499 (patch)
tree8b8b40047ccb8a0691e3f98219f71a4ac53cffcf
parent7a6a101f42b935e8b8405a70e8430986fa9fdff2 (diff)
downloadmcserver-wrapper-0.1.tar.gz
mcserver-wrapper-0.1.tar.bz2
mcserver-wrapper-0.1.zip
Add READMEv0.1
-rw-r--r--README.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c750bba
--- /dev/null
+++ b/README.md
@@ -0,0 +1,58 @@
+MINECRAFT-WRAPPER
+=================
+
+Python server wrapper for extracting informations about server status and list of online players.
+
+Requires:
+-----------------
+* Unix-like OS (preferred an only tested is Linux)
+* Python3
+* Dependencies for Minecraft server (Java)
+
+Usage
+-----------------
+mcwrapper ACTION {IDENTIFIER} [args...]
+ This script is executing Minecraft server and reads its output. From output is extracted server
+ status and list of online players.
+
+ ACTION
+ start Starts server specified with IDENTIFIER. As arguments takes command line for starting
+ Minecraft server.
+ stop Sends stop command to Minecraf server specified with IDENTIFIER.
+ say Sends arguments to server chat as server message. Server is specified using IDENTIFIER.
+
+ IDENTIFIER
+ Identifier can be any word without spaces and preferably without special characters.
+ It is used for identifying server instances, so that multiple servers can run with
+ this wrapper on single system.
+
+How it works
+-----------------
+Script is reading Minercraft server standard and error output. It's looking for known lines that
+signals change of server output and players joining and leaving. Minecraft server output is well
+designed for information parsing. Informations are in default exported to folder /dev/shm/mcwrapper_IDENTIFIER
+where IDENTIFIER is specified as argument to script. From now on will be replaced with *.
+
+###Status file
+This file is in default configuration in path /dev/shm/mcwrapper_*/status.
+If it exists, it contains in what status is server in the moment.
+Status can be:
+* Starting
+* Running
+* Stopping
+
+If file not exists, then server is not running at all.
+
+###Players file
+This file in in default configuration in path /dev/shm/mcwrapper_*/players
+If server is running, it constains online players. Player name per line.
+If server isn't runnint, it content don't have to be valid.
+
+##Input pipe
+This is unit pipe. In default configuration is in path /dev/shm/mcwrapper_*/input_pipe.
+This pipe is input to Minercraft server standard input. If you have write access rights
+(default 640), then you can send any command to Minecraft server by writing to this pipe.
+
+###Logging
+Minecraft output is automatically logged to date-time stamped file in configuration specified
+folder (default /home/minecraft/log/INDETIFIER/ where IDENTIFIER is argument to script).