See
for an example of using ant to run Xilize.
Because Xilize is now dependent on BeanShell, when running from the command line you need to have BeanShell functionality on your classpath. Use one of these jars (ordered from smallest to largest):
| bsh-core-2.0b4.jar | This is all that Xilize requires. | download from www.beanshell.org or here (the one used during development but same as the one on beashell.org) |
| bsh-2.0b4.jar | The entire BeanShell application. | download from www.beanshell.org |
| jedit.jar | The jEdit editor v4.2 — which contains all of bsh-core. | download from sourceforge.net (if you are a jEdit user you already have this file) |
The new command line:
java -cp classpath com.centeredwork.xilize.Main arguments
where arguments may have one of two forms:
-cf filetarget is a file or directory tree to translate. If it is the root of a project tree then qualifier may be a file or directory within that tree and translation will be restricted to its scope. qualifier may be expressed as a relative path from target.
options:
-cf file |
--config file |
reads configuration file before translation |
-do |
--directory-only |
translate single directory only |
-fr |
--find-root |
automatically locate root directory |
-h |
--help |
this message |
Examples for Linux:
java -cp /path/to/xilize-jEdit.jar:/path/to/bsh-core-2.0b4.jar com.centeredwork.xilize.Main SomeFileOrDir java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar com.centeredwork.xilize.Main SomeFileOrDir java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar com.centeredwork.xilize.Main -do SomeDir java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar com.centeredwork.xilize.Main RootDir SubDir java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar com.centeredwork.xilize.Main -fr SubDir
On Windows replace the : (colon) used in the classpath with a ; (semicolon).
xilize-jEdit.jar contains both the translation engine and the jEdit plugin functionality. xilize-engine.jar contains only the translation engine which is all you need for command line use.
On Linux with bash shell, create an alias in .bashrc:
alias xilize='java -cp /path/to/xilize-engine.jar:/path/to/bsh-core-2.0b4.jar com.centeredwork.xilize.Main'
and use as
xilize -fr someFile.xil
Xilize command line
See &{next()} for an example of using ant to run Xilize.
h2. command line
Because Xilize is now dependent on BeanShell, when running from the command line
you need to have BeanShell functionality on your classpath. Use *one* of these
jars (ordered from smallest to largest):
| bsh-core-2.0b4.jar | This is all that Xilize requires. | "download from
www.beanshell.org":http://www.beanshell.org/download.html or "here
":../../Snapshot/index.html#dl (the one used during development but same as the
one on beashell.org)
| bsh-2.0b4.jar | The entire BeanShell application. | "download from
www.beanshell.org":http://www.beanshell.org/download.html
| jedit.jar | The jEdit editor v4.2 -- which contains all of bsh-core. |
"download from
sourceforge.net":http://prdownloads.sourceforge.net/jedit/jedit42install.jar (if
you are a jEdit user you already have this file)
The new command line:
pre. java -cp _classpath_ com.centeredwork.xilize.Main _arguments_
where _arguments_ may have one of two forms:
* @-cf@ _file_
* [ _options_ ] _target_ [ _qualifier_ ]
_target_ is a file or directory tree to translate. If it is the root of a
project tree then _qualifier_ may be a file or directory within that tree and
translation will be restricted to its scope. _qualifier_ may be expressed as a
relative path from _target_.
_options_:
| @-cf@ _file_ | @--config@ _file_ | reads configuration _file_ before
translation
| @-do@ | @--directory-only@ | translate single directory only
| @-fr@ | @--find-root@ | automatically locate root directory
| @-h@ | @--help@ | this message
Examples for Linux:
defadd. style pre.small {font-size:0.8em;}
pre(small). {{
java -cp /path/to/xilize-jEdit.jar:/path/to/bsh-core-2.0b4.jar
com.centeredwork.xilize.Main SomeFileOrDir
java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar
com.centeredwork.xilize.Main SomeFileOrDir
java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar
com.centeredwork.xilize.Main -do SomeDir
java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar
com.centeredwork.xilize.Main RootDir SubDir
java -cp /path/to/xilize-jEdit.jar:/path/to/jedit.jar
com.centeredwork.xilize.Main -fr SubDir
}}
On Windows replace the @:@ (colon) used in the classpath with a @;@
(semicolon).
h3. notes
xilize-jEdit.jar contains both the translation engine and the jEdit plugin
functionality. xilize-engine.jar contains only the translation engine which is
all you need for command line use.
On Linux with bash shell, create an alias in @.bashrc@:
pre(small). alias xilize='java -cp
/path/to/xilize-engine.jar:/path/to/bsh-core-2.0b4.jar
com.centeredwork.xilize.Main'
and use as
pre. xilize -fr someFile.xil
Long lines are wrapped in this listing.
Use your web browser's "View Page Source" feature to examine the HTML