;+ ; NAME: ; www_help_rsi ; PURPOSE: ; Creates html help files for IDL lib directory ; CATEGORY: ; www_help ; CALLING SEQUENCE: PRO www_help_rsi, destination=destination, cgi_bin=cgi_bin, remote_dir=remote_dir ; INPUTS: ; (none) ; OPTIONAL INPUTS: ; destination=destination ; scalar; type: string; default: $SSW_SMEI/html/help/smei/ ; cgi_bin=cgi_bin ; scalar; type: string; default: http://cass185.ucsd.edu/cgi-bin/ ; location of cgi scripts ; remote_dir=remote_dir ; scalar; type: string ; if set then all *.html files from 'destination' are copied to 'ftp' ; The remote directory is specified in the form host:directory ; e.g.: cassfos02.ucsd.edu:/u8/WWW/solar/help/smei/ ; The transfer is done by ftp; whether the ftp works or not is the users ; responsibility. ; OUTPUTS: ; (html files are created in 'destination') ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; InitVar, IsType, checkdir, www_help, www_help_style, do_file ; PROCEDURE: ; Subdirectory lib in !DIR is scanned recursively for ; *.pro files. The subdir 'obsolete' is excluded. ; MODIFICATION HISTORY: ; JAN-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- ; The call to checkdir seems enough to translate a symlink to a ; real directory name. tmp = checkdir(!dir, rsi) rsi = filepath(root=rsi,'lib') InitVar, destination, filepath(root=getenv('SSW_SMEI'),subdir=['html','help'], 'smei') InitVar, cgi_bin, 'http://cass185.ucsd.edu/cgi-bin' setenv, 'www_help='+getenv('TUB') master = 'SMEI' html_top = ['RSI', rsi] www_help, ['*.pro'], $ paths = rsi, $ /recursive, $ destination = destination, $ /update_master, $ cgi_bin = cgi_bin, $ style = www_help_style(/idlcode,html_name='rsi',html_top=html_top, $ /anycase,master=master,/automatic), $ swap_style = [www_help_style(/idlcode)], $ excl_files = ['*.pro'], $ excl_paths = filepath(root=rsi, 'obsolete'), $ incl_sets = ['rsi'] ; ftp files if requested IF IsType(remote_dir, /defined) THEN BEGIN colon = strpos(remote_dir, ':') remote_host = strmid(remote_dir, 0, colon) remote_dest = strmid(remote_dir, colon+1) cmd = [ $ 'cd ' +remote_dest , $ ; Destination directory 'lcd '+destination , $ ; Local directory with *.html files 'ascii' , $ ; Switch to ascii mode 'mput rsi*.html' , $ ; Transfer *.htm files 'quit'] ; Exit tmp_file = filepath(root=getenv('TUB'), 'help.ftp') openw, /get_lun, iu, tmp_file FOR i=0,n_elements(cmd)-1 DO printf, iu, cmd[i] free_lun, iu cmd = 'cat '+tmp_file+' | ftp -i '+remote_host spawn, cmd tmp = do_file(/delete, tmp_file) ENDIF message, /info, 'done' RETURN & END