|
This (somewhat lengthy) document will go through most of the detail of building a particular application using ant. It will also explain the purpose of that application, and a bit about its coding. the purposeOften we need to show various sourcecode files or scripts, and would like to have them arranged so we can jump back and forth while perusing them. We may also want some explanation other than just possible comments in the code. ShowCode produces html files which contain content files arranged so that it is easy to jump back and forth between the listings. The listings themselves are wrapped for display within HTML (it would be "easy" to colorize the listings, but that has not yet been done). There is a table of contents toward the top of the HTML page which allows you to click to go to a particular listing, and a tag with each listing that allows you to go back to the table of contents. There is also provision for a link to a zip file containing whatever you wish: the ShowCode program does not create the zip file (although that would not be difficult to provide if desired). This file is in fact produced itself by ShowCode. This link gives you showcode.jar which you should put in a library somewhere, and this link gives you showcode, which is a shell script you can run that should be edited to point to the jar file. Using the program
My build file has a
To create a file such as the one you are reading you might use a command such as:
This says make me a file "index.html" (or whatever the -w argument says) with
HTML title "ShowCode" (or whatever the -t argument says) and with header "Showcode" (or whatever the -h tag says) beginning with the contents of the file "preface" (or whatever the -p tag says) [which should be HTML markup which can go inside a
This is actually done using the class
The default for the ShowCode uses the Java regexp package to wrap the codefiles for HTML inclusion. |
Code linksListings
|