Running PowerForms
The PowerForms jar-file (see the download
page) can be executed
directly to run PowerForms as a commandline tool.
Invoking
The jar-file is run by executing the following command in a
shell
java -jar powerforms.jar [options] [input]
See below for a description of options accepted by
PowerForms. Input is read from the standard input stream if no input
file is specified. Output is written to the standard output
stream unless the `-output' option is used.
Note: The jar-file requires a J2SDK v1.4 runtime
environment which includes classes for parsing Xml. If used
with a different runtime environment the file xerces.jar
has to be included in the classpath when
invoking PowerForms. The complete spell to be cast in order to
run PowerForms is then:
java -classpath powerforms.jar:xerces.jar dk.brics.powerforms.Main [options] [input]
Options
-help
- Write a short help message to the standard output stream and
exit.
-pwf <file>
- Specify a file that contains a PowerForms specification to
be used for transformations.
-export <name>
- Export a regular expression named name in the
PowerForms specification to the standard output stream. The actual
output is a serialized instance of the Java class dk.brics.automaton.Automaton,
which can be imported via the <regexp
url=url
/> construction.
-miscurl <url>
- Set the url from which to include generic JavaScript code
and images. The url must point to a directory
(i.e. end with `/') and the default value is
``http://www.brics.dk/~ricky/powerforms/misc/''
-status <type>
- Set the type of automatically inserted status-elements.
<type> can be either `css' or `image' of which the
latter is the default.
-output <filename>
- Write output to the file named filename.
-xhtml
- Parse html-input as XHtml.
-crap-mode
- Will make PowerForms try to parse (almost) any input as html
. . . Use with caution!