Implements the Lamson command line tool's commands, which are run by
the lamson.args module dynamically. Each command has it's actual user
displayed command line documentation as the __doc__ string.
You will notice that all of the command functions in this module end
in _command. This is not required by the lamson.args module but it is
the default. You could easily use any other suffix, or none at all.
This is done to disambiguate the command that it implements so that
your command line tools do not clash with Python's reserved words and
built-ins. With this design you can have a list_command without clashing
with list().
You will also notice that commands which take trailing positional
arguments give a TRAILING=[] or TRAILING=None (if it's required). This is
done instead of *args because we need to use None to indicate that this
command requires positional arguments. TRAILING=[] is like saying they
are optional (but expected), and TRAILING=None is like saying they are
required. You can't (afaik) do TRAILING=None with *args.
See lamson.args for more details.
|
|
log_command(port=8825,
host='127.0.0.1',
chroot=False,
chdir='.',
uid=False,
gid=False,
umask=False,
pid='./run/log.pid',
FORCE=False)
Runs a logging only server on the given hosts and port. |
source code
|
|
|
|
send_command(port=8825,
host='127.0.0.1',
username=False,
password=False,
ssl=False,
starttls=False,
debug=1,
sender=None,
to=None,
subject=None,
body=None,
attach=False)
Sends an email to someone as a test message. |
source code
|
|
|
|
sendmail_command(port=8825,
host='127.0.0.1',
debug=0,
TRAILING=None)
Used as a testing sendmail replacement for use in programs like mutt
as an MTA. |
source code
|
|
|
|
start_command(pid='./run/smtp.pid',
FORCE=False,
chroot=False,
chdir='.',
boot='config.boot',
uid=False,
gid=False,
umask=False)
Runs a lamson server out of the current directory: |
source code
|
|
|
|
|
|
|
|
|
|
status_command(pid='./run/smtp.pid')
Prints out status information about lamson useful for finding out if
it's running and where. |
source code
|
|
|
|
|
|
|
queue_command(pop=False,
get=False,
keys=False,
remove=False,
count=False,
clear=False,
name='run/queue')
Let's you do most of the operations available to a queue. |
source code
|
|
|
|
routes_command(TRAILING=['config.testing'],
path='/home/zedshaw/projects/lamson',
test='')
Prints out valuable information about an application's routing
configuration after everything is loaded and ready to go. |
source code
|
|
|
|
gen_command(project=None,
FORCE=False)
Generates various useful things for you to get you started. |
source code
|
|
|
|
web_command(basedir='.',
port=8888,
host='127.0.0.1')
Starts a very simple files only web server for easy testing of
applications that need to make some HTML files as the result of their
operation. |
source code
|
|
|
|
cleanse_command(input=None,
output=None)
Uses Lamson mail cleansing and canonicalization system to take an
input maildir (or mbox) and replicate the email over into another
maildir. |
source code
|
|
|
|
blast_command(input=None,
host='127.0.0.1',
port=8823,
debug=0)
Given a maildir, this command will go through each email and blast it
at your server. |
source code
|
|
|
|
|