Skip to content

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

License

Notifications You must be signed in to change notification settings

Gjum/CursingSpock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]

Licensed under the MIT License, see LICENSE.txt.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages