[daisy] Automatic HTMLHelp Publishing
Bruno Dumon
bruno at outerthought.org
Wed Apr 11 11:47:13 CDT 2007
On Tue, 2007-04-10 at 11:44 +0200, Robert Kindl wrote:
> I'm currently solving following problem:
> a) I want to create/write content in daisy and prepare book
> b) compile book to HTMLHelp (in adition to producting HTML and PDF)
> c) On daily schedule (or any time during build-time of other things in our
> integration process) produce book with all this outputs.
> d) Automatically bundle result in our installation scripts
>
> Now my comments:
> ad b) I already realized custom book PublicationType which is able to
> produce .hhp .hhc and .hhk files
> But I'm missing posibility to compile and release .chm during this process:
>
> Suggested solution b1:
> <custom class="ExecuteCommandTask"
> program="C:\Program Files\HTML Help Workshop\hhc.exe"
> commandline="output\book.hhp"
> workingdir="output"
> errorlevel="1" <!--HHC returns errorlevel=1 on success -->
> />
> <custom class="ExecuteCommandTask"
> program="copy"
> commandline="/b book.chm D:\LatestBook"
> workingdir="output"
> errorlevel="0"
> />
>
> Suggested solution b2:
> <zip>
> <custom class="ExecuteCommandTask"
> program="copy"
> commandline="/b *.zip D:\LatestBook"
> workingdir="output"
> errorlevel="0"
> />
>
> Suggested solution b3:
> <zip>
> <copyResource from="currentpublicationdir:/output/*.zip"
> to="D:\LatestBook" />
>
> In solutions b2 and b3 I will run HTMLHelp compiler as part of my
> integration process - it's not problem.
>
> Can anyone help me with writing this custom ExecuteCommandTask?
> I'm not able to do this personally as I'm not Java programmer.
> I will share my .xsl for HTMLHelp publication in exchange ;-)
I've attached a first attempt at this.
Throw the jar in DAISY_HOME/daisywiki/webapp/WEB-INF/lib
and use like this:
<custom class="org.outerj.daisy.books.publisher.impl.publicationprocess.ExecuteCommandTask"
program="/bin/ls" workingDir="/home/bruno/tmp" exitValue="0">
<args xmlns="">
<arg>-l</arg>
<arg>-a</arg>
</args>
</custom>
workingDir, exitValue and args are optional. I've only tested it on
linux. The output of the command is included in the publication log.
Please let me know if it works, we could then look into including it
with the default tasks.
>
> ad c) There should be some posibility (API) to trigger book publication
> externally.
>
> Suggested solution:
>
> Currently book publication start with following URL:
> http://server:8888/books/createBookInstance?bookDefinitionDocumentId=112-EX&bookDefinitionBranchId=1&bookDefinitionLanguageId=2
>
> I suggest adding one parameter useDefaultSettings=true
> http://server:8888/books/createBookInstance?bookDefinitionDocumentId=112-EX&bookDefinitionBranchId=1&bookDefinitionLanguageId=2&useDefaultSettings=true
> which will simply start publication right now (without asking for any
> parameters)
>
> Now it would be simple to use WGET.exe to trigger book publication at any
> time
Ideally we'd have a full HTTP+XML API to access the books functionality.
Your suggestion might serve as a simple solution too, though I can't
look into that now.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org bruno at apache.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: execute-command-task.jar
Type: application/x-jar
Size: 2672 bytes
Desc: not available
Url : http://lists.cocoondev.org/pipermail/daisy/attachments/20070411/b67e4621/execute-command-task-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExecuteCommandTask.java
Type: text/x-java
Size: 4002 bytes
Desc: not available
Url : http://lists.cocoondev.org/pipermail/daisy/attachments/20070411/b67e4621/ExecuteCommandTask-0001.java
More information about the daisy
mailing list