commands Package¶
commands Package¶
Command line tools for TiddlyWeb are accessed via the twanager
script. Each command is named by the first argument passed to the
script.
The commands defined in this package are added to a list of available
commands using the twanager plugin mechanism. That list is extensible
via twanager_plugins in tiddlyweb.config and
tiddlyweb.manage.make_command().
Typical commands do things like starting a server, creating a user and listing existing entities.
-
tiddlyweb.commands.init(config)¶ Establish the commands during
twanagerstartup.
interact Module¶
This module provides a twanager command interact which
provides a Python shell preloaded with the necessary local
variables to interact with the current instance’s store and the entities within. The locals are:
RecipeBagTiddlerUserPolicySerializercontrolutilweb- An
environcontainingtiddlyweb.configand tiddlyweb.store` keys and values. - A
configcontaining the currenttiddlyweb.config.
These are enough to do most operations.
-
class
tiddlyweb.commands.interact.TabCompleter(namespace=None)¶ Bases:
rlcompleter.CompleterTab completion for the interactive shell that allows pressing the tab character to indicate an indent.
-
complete(text, state)¶ Complete the provided
text. If there is no text, indent.
-
-
class
tiddlyweb.commands.interact.TiddlyWebREPL(locals=None, filename='<console>')¶ Bases:
code.InteractiveConsoleAn interactive console for the current TiddlyWeb instance.
This augments it’s super class by adding tab completion and establishing a set of useful local variables.
-
tiddlyweb.commands.interact.launch_shell(config, store, args)¶ Establish the basic environment for the shell and then start it.