Viewing contents of file '../idllib/deutsch/local/mk_local_help3.pro'
pro mk_local_help3,dummy
;+
; NAME:
;   MK_LOCAL_HELP3
; PURPOSE:
;   This program modifies the headers of large HTML help files generated
;   by mk_local_help (using RSI's mk_html_help) to have a nicer header.
; CALLING SEQEUNCE:
;   mk_local_help3
; NOTES:
;   This program should be run on bluemoon (where all the IDL libraries
;   reside).
;   See /host/bluemoon/usr2/idllib/deutsch/local/=Making_html_help.notes
;-

  files=findfile('libr*.html',count=nfiles)

  for i=0,nfiles-1 do begin
;  for i=1,1 do begin
    openr,1,files(i)
    openw,3,'tmp'+files(i)
    print,files(i)
    lin=''
    while (lin ne '<UL>') do begin
      readf,1,lin
      if (lin eq '<body>') then lin='<body bgcolor="#ffffff" link="#ee0000" vlink="#992200" text="#00000">'
      if (strmid(lin,0,9) eq 'This page') then begin
	printf,3,'This page is a listing of the entire contents of this library for IDL.'
	printf,3,'This listing is the long version.  Viewing the <A HREF="s'+files(i)+'">'
	printf,3,'much more compact listing</A> may be handier.<P>'
	printf,3,''
	printf,3,'<H3>[<A HREF="/deutsch/idl/htmlhelp/index.html">Go Back to Main IDL Libraries Search Page</A>]</H3>'
	printf,3,'<HR SIZE=5 noshade>'
        while (strmid(lin,0,8) ne '<STRONG>') do begin
          readf,1,lin
          endwhile
        endif
      if (strmid(lin,0,3) eq '<HR') then lin=''
      printf,3,lin
      endwhile

    while (not EOF(1)) do begin
      readf,1,lin
      printf,3,lin
      endwhile

    close,/all

    spawn,'/usr/bin/rm '+files(i)
    spawn,'/usr/bin/mv tmp'+files(i)+' '+files(i)


    endfor

  return

end