;+ ; NAME: ; www_help_master ; PURPOSE: ; Recreate the master help file for 'destination' ; CATEGORY: ; gen/idl ; CALLING SEQUENCE: PRO www_help_master, destination, style, copyright=copyright ; INPUTS: ; destination scalar; type: string ; destination directory of html files ; style array[1]; type: structure ; www_help_style structure ; OUTPUTS: ; (html file for master catalogue to destination directory) ; INCLUDE: @compile_opt.pro ; On error, return to caller @www_help_version.pro ; Defines version ; CALLS: ; IsType, www_help_crosslinks, www_help_frames, www_help_mailto ; PROCEDURE: ; All catalogues in the destination directory (*_list.htm) files ; are combined into a single master catalogue. Hyperlinks to all ; of the individual catalogues are also provided. ; MODIFICATION HISTORY: ; FEB-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- print print title = style.master type = style.html_type ; Get a list of all catalogues (keep current catalogue; the master catalogue ; is omitted by default) www_help_crosslinks, destination, style, crosslinks, list, /keep_style CASE IsType(crosslinks, /defined) OF 0: BEGIN message, /info, 'master catalogue not updated' RETURN END 1: message, /info, 'updating master catalogue' ENDCASE rsi_present = IsType(list,/defined) IF rsi_present THEN rsi_present = (where(list EQ 'rsi'))[0] NE -1 ; This is needed to make sure the text frame in the html help page can ; be filled with a valid html file. first = list[0]+'_'+strlowcase( strmid(crosslinks[0,0],0,1) ) crosslinks = crosslinks[*,sort(strupcase(crosslinks[0,*]))] name = reform(crosslinks[0,*]) link = reform(crosslinks[1,*]) count = n_elements(name) ;======================================== ; Write file defining positions of frames content = ['' , $ '
','This page uses frames
' , $ '' , $ '
']
; Set up a one-line list of letters A-Z with links to the first routine starting with each letter.
; This file (*_alphabet.htm) will fill in the top frame of the help window
; The links created have the form
; R
firstchar = strupcase( strmid(name,0,1) )
isfirst = intarr(count)
FOR i=(byte('A'))[0],(byte('Z'))[0] DO BEGIN ; Loop over uppercase letters
tmp = string(i) ; Uppercase single char
iunit = (where(firstchar EQ tmp))[0]
IF iunit NE -1 THEN BEGIN
isfirst[iunit] = 1
tmp = ''+tmp+''
ENDIF
content = [content, tmp]
ENDFOR
content = [content,'','','']
openw , iu, /get_lun, /stream, filepath(root=destination, title+'_alphabet'+type)
FOR i=0L,n_elements(content)-1 DO printf, iu, content[i]
free_lun, iu
;========================================
; Write the alphabetical list of routine names
; This file (*_list.htm) will fill the frame on the left
; First set up the links to the first routine for each letter (where isfirst = 1)
content = replicate('