For$
<!-- begin site header -->
<div id=

Author Topic: Commandline-only interface, --help argv  (Read 8291 times)

krono

  • Newbie
  • *
  • Posts: 6
    • View Profile
Commandline-only interface, --help argv
« 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

poizan42

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Commandline-only interface, --help argv
« Reply #1 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: [Select]
# 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
« Last Edit: January 12, 2011, 10:01:49 am by poizan42 »

krono

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Commandline-only interface, --help argv
« Reply #2 on: January 14, 2011, 03:39:31 pm »
Thanks, that makes things easier.

donno

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Commandline-only interface, --help argv
« Reply #3 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;