Hi all,

Nuxeo shell is supporting now script commands. See 
http://jira.nuxeo.org/browse/NXP-2533

Also, nsxhell can connect now to an embedded repository. So you can use 
nxshell for debugging and developing
without having to connect to a live nuxeo server.
For this reason now the -h option (--host) is mandatory if you want to 
connect to a remote repository
(in previous versions a default value of localhost were used)
Anyway the default nxshell build is not assembling all the JARs and 
configuration files needed to embed a repository.
You can see an example of embedding the repository in webengine 
(http://www.nuxeo.org/webengine)
(webengine is using nxshell as the command line launcher).
We may provide later a build of nxshell that will do this.

To deploy a script command copy it into scripts directory of nxshell.
To contribute script documentation and to enable autocompletion you need 
to add a header at the top of your script source.
For more details on this look here http://jira.nuxeo.org/browse/NXP-2533

For now nxshell will not automatically detect if you copy or delete 
scripts from this directory while nxshell is running.
If you are doing this you can manually use the "reload" command to 
reload all script commands.
Anyway, modified scripts will be reloaded automatically by nxshell.


There are 2 sample scripts in the scripts folder: hello.groovy and 
publish.groovy.
Comment headers (command description by comments) are implemented only 
for groovy and jython.
To write a python script header use """ comments.

"""
command synopsis

command syntax

command help
"""

In groovy you can use:

/*
command synopsis

command syntax

command help
*/

The command synopsis should be a short description of the command
The command syntax is used to describe the command syntax and will be 
used for auto-completion and command line validation
The command help section contains the help text that will be displayed 
when calling "help mycommand" in nxshell.

Each section is separated by at least one empty line.
Note that the comment headers are not mandatory.

Bogdan


_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to