Changeset 168 for trunk/SRC/Documentation/xmldoc/savesaxo.sh
- Timestamp:
- 09/06/06 12:46:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/savesaxo.sh
r163 r168 3 3 # update : 4 4 # $Id$ 5 # fplod 2006-09-05T15:39:47Z aedon.locean-ipsl.upmc.fr (Darwin) 6 # add Source link in idldoc html outpout 5 7 # snlod/fplod 2006-08-25T08:30:36Z electre.locean-ipsl.upmc.fr (Darwin) 6 8 # add for idldoc assistant … … 58 60 set -u 59 61 # 60 docompileall= 062 docompileall=1 61 63 dohtml=0 62 64 dooldtest=0 63 65 doidlwavedoc=0 64 doidldoc_html= 165 doidldoc_assistant= 166 doidldoc_html=0 67 doidldoc_assistant=0 66 68 doTARsrc=0 67 69 doTARdata=0 … … 209 211 # In order to do not have to many revision in svn, we modify some 210 212 # 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 211 220 # examples : 212 221 # <!-- Generated by IDLdoc 2.0 on Wed Jun 7 10:25:28 2006 --> … … 233 242 } 234 243 EOF 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 # 235 248 list_html=$(find ${output} -name "*.html") 236 249 for file_html in ${list_html} 237 250 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}" 238 274 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>@" \ 239 276 -e "s/\(Generated by IDLdoc 2.0\)\( on .*\)\( -->\)/\1\3/" \ 240 277 -e "s/\(Produced by IDLdoc 2.0\)\( on .*\)\(\.<\/div>\)/\1\3/" \
Note: See TracChangeset
for help on using the changeset viewer.