File UniDoc.icn

Summary

Generate HTML documentation from Unicon (or Icon) source files.

Syntax: unidoc arg...

where arg may be an option or a Unicon source file name or a directory name. Options apply from the point of occurrence until changed later in the argument list. When given a directory name, all Unicon source files in that directory are processed as if they appeared at that point in the argument list.

Options:
--resolve -- Attempt to generate HTML from files listed in link and import statements.
--noresolve -- Don't try to find files listed in link and import statements. (default)
--linkSrc -- Include links from documentation back to source code.
--nolinkSrc -- Don't include links from documentation back to source code. (default)
--indexFile=FILE -- Name of base HTML file (default is index.html)
--targetDir=DIR -- where to put generated HTML documents
--sourcePath=PATH -- where to look for source files (besides ".") PATH is a space-separated list of directories
--linkPath=PATH -- where to look for existing HTML files for entities that can't be found in source files. This is a comma-separated list of directories. Not yet implemented
--title=TITLE -- Title for display on base HTML index page. (default is "Generated Documentation"

Methods, constructors, and procedures may include some special UniDoc tag fields:

As a special case, placing procedure and method parameters on separate lines with a comment describing each parameter on the same line, as in:


    # <p>
    # Invoke a class method by name.
    # <[returns the outcome of the invocation]>
    # <[fails if no method exists with that name]>
    # </p>
    method invoke(mName,    # Name of method to call
                  args[]    # Remaining arguments are arguments to call
                  )
        if hasMethod(mName) then {
            suspend (self.__m[mName]) ! push(args, self)
            }
    end
is the same as using the <[param name description]> tag:

    # <p>
    # Invoke a class method by name.
    # <[param mName Name of method to call]>
    # <[param args[] Remaining arguments are arguments to call]>
    # <[returns the outcome of the invocation]>
    # <[fails if no method exists with that name]>
    # </p>
    method invoke(mName, args[])
        if hasMethod(mName) then {
            suspend (self.__m[mName]) ! push(args, self)
            }
    end

This version is preliminary and no doubt contains numerous bugs and omissions.

Author: Steve Wampler (sbw@tapestry.tucson.az.us)

This file is in the public domain.

Procedures:
helpMesg, main, processArgs

Global variables:
debug, indexFile, linkPath, title

Imports:
UniDoc, lang, util

This file is part of the (main) package.

Source code.

Details
Procedures:

helpMesg()

Quit after displaying a short usage message.


main(args)


processArgs(uniAll)

Parameter:
uniAll
Unicon parser (instance of <tt>UniAll</tt>)

Process the arguments, passing flags as appropriate to parser.


Global variables:
debug -- Debug flag

indexFile -- Name of base index file

linkPath -- Path to search when looking for already-generated HTML

title -- Title for base document


This page produced by UniDoc on 2021/04/15 @ 23:59:54.