Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.96 KB

README.md

File metadata and controls

48 lines (32 loc) · 1.96 KB

CursingSpock

A SpockBot plugin for controlling the client from the terminal. Built with Curses.

screenshot of a CursingSpock session

Thanks to gamingrobot for the inspiration.

Installation

  • Install the latest SpockBot
  • Install CursingSpock: pip install CursingSpock (or get the code and run setup.py install)
  • Add these lines to your starting script (example) in the right places:
# probably at the very top
import cursingspock

# before initializing the Client
plugins.append(('curses', cursingspock.CursesPlugin))`

Note that this plugin does not implement any commands itself. Other plugins need to listen on cmd_* events and actually execute the command (example). The emitted events per command are:

command, *args = 'somecommand arg1 arg2'.split(' ')
self.event.emit('cmd', {'cmd': command, 'args': args})
self.event.emit('cmd_%s' % command, {'args': args})

Usage

Move the cursor with the Left/Right arrow and Home/End keys. When holding Ctrl, the cursor skips words.

Load a previously used command by using the Up/Down arrow keys.

Scroll the logs with the PageUp/PageDown keys.

While the client runs, any log messags are saved in curses.log and any commands you enter are saved in curses.cmds. You can configure these file names by changing cursingspock.log_path and cursingspock.cmd_path.


Copyright (c) 2015 Gjum code.gjum@gmail.com

Licensed under the MIT License, see LICENSE.txt.