The StaticHTMLExporter Task
The StaticHTMLExporter is a task that downloads HTML pages from a server and saves them as HTML files. It needs the following parameters:
-
server-uri : the server uri, e. g.
http://authoring.yourdomain.com
- server-port : the server port, e. g. 8080
- publication-id : the publication id
- export-path-prefix : the path to save the files to
- uris : a comma-separated list of uris to download (without server + port)
- substitute-regexp : a regular expression to substitute a part of the path
Usually, the path information is read
from the [publication-directory]/config/publishing/publisher.xconf
file:
<publication> ... <export> <destination href="work/export/pending"/> <substitution regexp="s/\/lenya\/unipublic//g"/> </export> </publication>
You can override the paths in the task configuration file tasks.xconf
,
e. g. to use several publishers to publish into different directories:
<tasks> <task id="export-pending" class="org.apache.lenya.cms.publishing.StaticHTMLExporter"> <parameter name="export-path" value="work/export/pending"/> <parameter name="substitute-regexp" value="s/\/lenya\/your-publication//g"/> </task> <task id="export-backup" class="org.apache.lenya.cms.publishing.StaticHTMLExporter"> <parameter name="export-path" value="work/backup"/> <parameter name="substitute-regexp" value="s/\/lenya\/your-publication//g"/> </task> </tasks>