Like Zope 2.13, you can register scripts for the zopectl.command
entry zopectl.command
. They will be processed as new commands on the bin/instance
script controller.
For example, the following will bind calls in your egg to commands:
[zopectl.command] mybatch = example.egg.commands:mybatch
You will be given the root level application object and the rest of the command line arguments:
def mybatch(app, args): site = app.mysiteid
Use arguments to implement command line options for the script.
See Configuring and Running the Zope Documentation ; note that your command names cannot use dashes ( -
) in the name.
source share