Mineserver Community

Mineserver => Development => Topic started by: krono on December 14, 2010, 12:09:47 pm



Title: Commandline-only interface, --help argv
Post by: krono on December 14, 2010, 12:09:47 pm
Hi,

I'd like to propose two functionalities:

1) While the NCurses gui is nice, I'd like to use a command-line (i.e., stdout)
    only version. This is useful when using tools like daemontools, that keep
    programs running as daemons and can take care of logging.

2) It is common to have a --help switch for the basic usage of a tool,
    hence, having a --help switch would greatly improve the `first-run-experience`.


So Long,
    -krono


Title: Re: Commandline-only interface, --help argv
Post by: poizan42 on January 11, 2011, 11:59:36 am
I have implemented a cli interface. It is available here: https://github.com/poizan42/mineserver/commit/8741b5f4cd884350fa43e94cdb1133b4d839da40
You can choose whether to use cli or curses with the following config file entry:
Code:
# Interface. Either "curses" or "cli"
system.interface = "cli"

EDIT: it works on linux now (and probably other posix systems)
EDIT2: it has been merged into the main repository


Title: Re: Commandline-only interface, --help argv
Post by: krono on January 14, 2011, 03:39:31 pm
Thanks, that makes things easier.


Title: Re: Commandline-only interface, --help argv
Post by: donno on January 30, 2011, 04:32:53 am
A change as been made to this feature, as the curses interface is now a plugin, so the configuration is different.

To use the 'cli' interface, ensure the cursesui is not being loaded and
system.interface.use_cli = true;