Ignore:
Timestamp:
09/06/06 12:46:29 (18 years ago)
Author:
pinsard
Message:

Main document available on top directory, Source links available in idldoc html output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Documentation/xmldoc/savesaxo.sh

    r163 r168  
    33# update : 
    44# $Id$ 
     5# fplod 2006-09-05T15:39:47Z aedon.locean-ipsl.upmc.fr (Darwin) 
     6# add Source link in idldoc html outpout 
    57# snlod/fplod 2006-08-25T08:30:36Z electre.locean-ipsl.upmc.fr (Darwin) 
    68# add for idldoc assistant 
     
    5860set -u 
    5961# 
    60 docompileall=0 
     62docompileall=1 
    6163dohtml=0 
    6264dooldtest=0 
    6365doidlwavedoc=0 
    64 doidldoc_html=1 
    65 doidldoc_assistant=1 
     66doidldoc_html=0 
     67doidldoc_assistant=0 
    6668doTARsrc=0 
    6769doTARdata=0 
     
    209211    # In order to do not have to many revision in svn, we modify some 
    210212    # lines produced by idldoc : 
     213    # - add Source link in each html file 
     214    # example : 
     215    # <td>Source</td> 
     216    # will be replaced by 
     217    # <td><a href="../../Calendar/caldat.pro?format=raw" title="Source code of a file">Source</a></td> 
     218    # 
     219    # - remove date and time of idldoc production 
    211220    # examples : 
    212221    # <!-- Generated by IDLdoc 2.0 on Wed Jun  7 10:25:28 2006 --> 
     
    233242} 
    234243EOF 
     244    # count of directory levels in output 
     245    # this ount will be use to format relative path later 
     246    nblev1=$(echo ${output} | sed -e "s@/\$@@" |awk -F "/" '{print NF}') 
     247    # 
    235248    list_html=$(find ${output} -name "*.html") 
    236249    for file_html in ${list_html} 
    237250    do 
     251     # buil the .pro file name 
     252     bfile=$(basename ${file_html} .html) 
     253     # retrieve the path of html file relative to memopwd (so relative to 
     254     # output). This path will be used in "Source" link. 
     255     nblev2=$(dirname ${file_html} |  sed -e "s@/\$@@" | awk -F "/" '{print NF}') 
     256     difflev=$((${nblev2} - ${nblev1})) 
     257     if [ ${difflev} -ge 2 ] 
     258     then 
     259      ilev=1 
     260      reloutput_html=".." 
     261      while [ ${ilev} -le ${difflev} ] 
     262      do 
     263       reloutput_html="${reloutput_html}/.." 
     264       ilev=$(( ${ilev} + 1 )) 
     265      done 
     266      relpath_html=$(dirname ${file_html} | \ 
     267                   sed -e "s@${output}@${reloutput_html}@" \ 
     268                       -e "s@\$@/@") 
     269      echo "relpath ${relpath_html})" 
     270     else 
     271      relpath_html="./" 
     272     fi 
     273     # echo "relpath ${relpath_html}/${bfile}" 
    238274     sed \ 
     275     -e "s@<td >Source<\/td>@<td><a href=\"${relpath_html}/${bfile}.pro?format=raw\" title=\"Source code of a file\">Source<\/a><\/td>@" \ 
    239276     -e "s/\(Generated by IDLdoc 2.0\)\( on .*\)\( -->\)/\1\3/" \ 
    240277     -e "s/\(Produced by IDLdoc 2.0\)\( on .*\)\(\.<\/div>\)/\1\3/" \ 
Note: See TracChangeset for help on using the changeset viewer.