Contents 
 Index 
 "Perl Program Reference" 
 < Previous 
 Next > 

voyant_nav.pl File Reference

Swaps out tagged areas in all HTML files in a given directory. More...

Go to the source code of this file.

Defines

Functions

Variables


Detailed Description

Swaps out tagged areas in all HTML files in a given directory.

Parameters:
globe::path  location to find the HTML files. The name should be terminated with a slash (\). Although the directory_name is the first command line parameter, the true input are the HTML files contained within that directory.
globe::master_nav_file  [optional path and] filename for the HTML file to use as the master for information. This file has several specially flagged HTML comment sections that are required. Information from the tagged sections are lifted and placed into the tagged sections of the input HTML files.
Return values:
input_html_file  is modified with new information in the tagged areas. This includes the information in the head, navigation at the top of the body, and copyright information at the bottom of the body.
_file_list  is a temporary file with a list of all HTML files in the given directory.
_index_list  is a temporary file with extracted index tokens.
tree.html  is a temporary file with a mini-TOC (table of contents) for the given book.
This program does most of the work in creating a comprehensive HTML system that spans the mini-HTML systems generated by Doxygen and Mif2Go (from FrameMaker source). The reason it does most of the work is that it has to read the files anyway.

It started out as a tool just to swap out the header, navigation, and copyright areas. However, as long as it was visiting each and every HTML file in the input directory and "knew" what was in those files and how the files related to one another, this tool was expanded to handle generating a mini-TOC file () and an index file. It:

Before writing a _temp file (and then copying this back over the original input file) and as it processes the file:
Limitations and Caveats:
In order for this to work correctly, the file names for the chapters have to be named correctly so that they sort into a natural order. This is achieved by having the generation place the same prefix on all HTML files for a given chapter. I chose a two-digit number followed by an underscore. In this manner, all files for a given chapter are grouped together by the prefix. Earlier processing of the files determined which of those topics was the first and last for the chapter.
Rather than passing in variables which can create copies in memory, many items use global variables that are defined in globe.pm. When a variable is known to be global, its name begins with "$globe::". The intent is to facilitate maintenance by having all user-defined tags in one place outside of the program.

This used information that came specifically from our implementation of styles in FrameMaker. In particular, we know what the format names are that are used for chapter headings. The number is picked off of that.

Author:
Glenn C. Maxey

Definition in file voyant_nav.pl.


Define Documentation

#define _file_list   $_[0]
 

#define globe   ::have_dox 0
 

#define globe   ::have_common_top 0
 

#define globe   ::have_footer 0
 

#define globe   ::have_header 0
 

#define globe   ::entire_file ""
 

#define htree_file   "tree.html"
 

#define in_file   $_[0]
 

#define nested_script   1
 

#define out_file   "_temp"
 

out_file   "_temp"
 

Definition at line 759 of file voyant_nav.pl.

#define out_line   ""
 

#define rel_to_file   ""
 

#define script_file   "tree.script"
 

#define t_next   ""
 

#define t_prev   ""
 

#define target_cnt   0
 

#define target_prefix   "_ggg_"
 

#define temp_content   ""
 

#define temp_html   ""
 


Function Documentation

int BEGIN  
 

Definition at line 218 of file voyant_nav.pl.

if  
 

Definition at line 751 of file voyant_nav.pl.

if @globe::index_info   
 

Definition at line 445 of file voyant_nav.pl.

if $globe::path    = ~ /cref/i
 

Definition at line 433 of file voyant_nav.pl.

if !&generate_and_step_through_list($_file_list)   
 

Definition at line 426 of file voyant_nav.pl.

if   ARGV,
  _arg_inc
 

Definition at line 285 of file voyant_nav.pl.

& organize_topic_order  
 

unless open(OUT_HTML,">$out_file")   
 

Definition at line 773 of file voyant_nav.pl.

Referenced by globe_file_cnt(), and unless().

unless open(IN_HTML,$in_file)   
 

Definition at line 761 of file voyant_nav.pl.

int using_voy_nav  
 

Definition at line 476 of file voyant_nav.pl.

while < IN_HTML >   
 

Definition at line 768 of file voyant_nav.pl.


Variable Documentation

_arg_inc
 

Definition at line 311 of file voyant_nav.pl.



 "Perl Program Reference" 
 < Previous 
 Next > 



Open-Source tools compliments of Voyant Technologies, Inc. and Glenn C. Maxey.
01/13/2003

TP Tools v2-00-0a

# tpt-perl-hcr-02