NaturalDocs::Builder::HTML

NaturalDocs::Builder::HTML

A package that generates output in HTML.

All functions are called with Package->Function() notation.

Summary
NaturalDocs::Builder::HTMLA package that generates output in HTML.
Implemented Interface Functions
INITRegisters the package with NaturalDocs::Builder.
CommandLineOptionReturns the option to follow -o to use this package.
BuildFileBuilds the output file from the parsed source file.
BuildIndexBuilds an index for the passed type.
UpdateMenuUpdates the menu in all the output files that weren’t rebuilt.
Support Functions
UpdateFileUpdates an output file.
UpdateIndexUpdates an index’s output file.

Implemented Interface Functions

INIT

sub INIT

Registers the package with NaturalDocs::Builder.

CommandLineOption

sub CommandLineOption

Returns the option to follow -o to use this package.  In this case, “html”.

BuildFile

sub BuildFile #(sourceFile,
parsedFile)

Builds the output file from the parsed source file.

Parameters

sourcefileThe FileName of the source file.
parsedFileAn arrayref of the source file as NaturalDocs::Parser::ParsedTopic objects.

BuildIndex

sub BuildIndex #(type)

Builds an index for the passed type.

Parameters

typeThe TopicType to limit the index to, or undef if none.

UpdateMenu

sub UpdateMenu

Updates the menu in all the output files that weren’t rebuilt.  Also generates index.html.

Support Functions

UpdateFile

sub UpdateFile #(sourceFile)

Updates an output file.  Replaces the menu, HTML title, and footer.  It opens the output file, makes the changes, and saves it back to disk, which is much quicker than rebuilding the file from scratch if these were the only things that changed.

Parameters

sourceFileThe source FileName.

Dependencies

  • Requires <Builder::BuildMenu()> to surround its content with the exact strings “<div id=Menu>” and “</div><!--Menu-->”.
  • Requires <Builder::BuildFooter()> to surround its content with the exact strings “<div id=Footer>” and “</div><!--Footer-->”.

UpdateIndex

sub UpdateIndex #(type)

Updates an index’s output file.  Replaces the menu and footer.  It opens the output file, makes the changes, and saves it back to disk, which is much quicker than rebuilding the file from scratch if these were the only things that changed.

Parameters

typeThe index TopicType, or undef if none.
A base package for all the shared functionality in NaturalDocs::Builder::HTML and NaturalDocs::Builder::FramedHTML.
sub INIT
Registers the package with NaturalDocs::Builder.
A package that takes parsed source file and builds the output for it.
sub CommandLineOption
Returns the option to follow -o to use this package.
sub BuildFile #(sourceFile,
parsedFile)
Builds the output file from the parsed source file.
sub BuildIndex #(type)
Builds an index for the passed type.
sub UpdateMenu
Updates the menu in all the output files that weren’t rebuilt.
sub UpdateFile #(sourceFile)
Updates an output file.
sub UpdateIndex #(type)
Updates an index’s output file.
A string representing the absolute, platform-dependent path to a file.
A class for parsed topics of source files.
A string representing a topic type as defined in Topics.txt.
Close