Predefined functions
There are a number of functions which are predefined.
These functions are in no way special, and can be used as a pattern
for writing your own functions which you can include with the
localcode directive. The output of the
these functions is stylized. This is on purpose.
Functions are invoked by saying:
#call FUNCTION
Functions get the text after the function name as a single string
parameter which it can use as appropriate.
The standard functions are:
- Modified
This is probably the simplist function. This displays
the modification date of the source file into the generated
HTML file.
- HotBar PAGELIST.FILE HOTBAR.FILE
This function generates a Hot Button bar when invoked.
This function generates a Previous and Next
button to thread your pages together for those throwbacks
(like me) who want to be able to run through the entire
document.
The PAGELIST.FILE file contains all
of the source files in the appropriate order, one per line.
Items in this file can be commented out by putting
a "#" as the first character. It is a fairly simple task
using the commands find, sort, and diff
to ensure that all of the source files actually are in the
PAGELIST.FILE file.
(See the Makefile for an example.)
In addition, the HOTBAR.FILE file
contains lines which have a URL followed by a caption.
This data is used to contruct a series of buttons with links
to the appropriate pages. However, there will be no link
which would lead directly back to the page being processed.
Note that the PAGELIST.FILE and HOTBAR.FILE are assumed to
be relative to the file which #calls the HotBar function.
This might be a little surprising if the #call is made
from a different directory than the source file is in.
[Previous]
[Introduction]
[Overview]
[Directives]
[Variables]
[Functions]
[Invocation]
[Suggestions]
[Examples]
[Perl API]
[Next]
Source for this file can be found in funcs.wc.