Changeset 413
- Timestamp:
- 11/12/09 10:50:27 (15 years ago)
- Location:
- trunk/SRC/Documentation/xmldoc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/doidldoc.sh
r412 r413 1 1 #! /bin/sh 2 #3 2 #+ 4 3 # … … 11 10 # ======== 12 11 # 13 # ``doidldoc.sh -i indir -t title -o outdir -idl doc_version idldoc_version -idldoc_dir idldoc_dir``12 # ``doidldoc.sh -i indir -t title -o outdir -idl_dir idl_dir -idldoc_version idldoc_version -idldoc_dir idldoc_dir`` 14 13 # 15 14 # DESCRIPTION … … 61 60 # :: 62 61 # 63 # $ cd SAXO_ ws/SRC/Documentation/xmldoc/64 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i ../.. -t "SAXO Documentation" -o ./idldoc_html_output/ 62 # $ cd SAXO_DIR_ws/SRC/Documentation/xmldoc/ 63 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i ../.. -t "SAXO Documentation" -o ./idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/ 65 64 # 66 65 # To produce VARAMMA HTML outputs : … … 68 67 # 69 68 # $ cd /usr/home/fplod/incas/varamma/varamma_ws/ 70 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "VARAMMA Documentation" -o /tmp/idldoc_html_output/ 71 # 69 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "VARAMMA Documentation" -o /tmp/idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/ 70 # 71 # To produce POST_IT HTML outputs : 72 # :: 73 # 74 # $ cd /usr/home/fplod/incas/post_it/post_it_ws/ 75 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "POST_IT/Documentation" -o /tmp/idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/ 76 # 77 72 78 # TODO 73 79 # ==== 74 80 # 75 # ++ pb PATH introduire SAXO_PATH76 # can be solved with:77 # ::78 #79 # $ export PATH=${HOME}/SAXO_DIR/SRC/Documentation/xmldoc/:${PATH}80 #81 # ++ pb avec IDL_DIR pas tjs positionné82 # can be solved for linux with83 # ::84 #85 # $ export IDL_DIR=/usr/local_linux/idl/86 #87 # or for MacOSX with88 # ::89 #90 # $ export IDL_DIR=/usr/local_macosx/idl//idl_6.2/idl_6.2/91 #92 #93 81 # ++ choix de la version de idldoc et consequences sur assistant 94 82 # … … 105 93 # 106 94 # $Id$ 95 # 96 # - fplod 20091112T084225Z aedon.locean-ipsl.upmc.fr (Darwin) 97 # 98 # * bug fix if indir is set to '.' 99 # * idl_dir in parameter 100 # * path of local commands 107 101 # 108 102 # - fplod 20091110T151839Z aedon.locean-ipsl.upmc.fr (Darwin) … … 196 190 idldoc_version="2.0" 197 191 unset command_dir 198 192 # default IDL command and directory 193 #idl_dir=/usr/local_linux/idl/idl64/ # overriding idl_dir for test ++ 199 194 #idldoc_dir="/usr/home/fplod/src/idldoc-3.1.1/" # overriding idldoc_dir for test ++ 200 195 # 201 minargcount= 4196 minargcount=6 202 197 if [ ${#} -lt ${minargcount} ] 203 198 then … … 213 208 indir=${2} 214 209 shift 210 case ${indir} in 211 .) 212 indir=$(pwd) 213 ;; 214 esac 215 215 ;; 216 216 -t) … … 228 228 -idldoc_version) 229 229 idldoc_version=${2} 230 shift 231 ;; 232 -idl_dir) 233 idl_dir=${2} 230 234 shift 231 235 ;; … … 283 287 ;; 284 288 esac 289 # 285 290 # launch IDL with the file built above 286 291 export IDL_STARTUP=${pro} … … 366 371 # replace <pro>ginette</pro> by a sequence like 367 372 # <a href="./ginette.html">ginette</a> 368 pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro373 ${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro 369 374 status=${?} 370 375 if [ ${status} -ne 0 ] … … 375 380 # replace <proidl>ginette</proidl> by a sequence like 376 381 # <a href="./ginette.html">ginette</a> 377 pro2href.sh -i ${outputtmp} -r ${IDL_DIR}/help/online_help -e proidl382 ${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${idl_dir}/help/online_help -e proidl 378 383 status=${?} 379 384 if [ ${status} -ne 0 ] … … 411 416 read a 412 417 # launch IDL with the file built above 413 IDL_STARTUP=${pro};${ IDL_DIR}/bin/idl418 IDL_STARTUP=${pro};${idl_dir}/bin/idl 414 419 /bin/rm ${pro} 415 420 # In order to do not have to many revision in svn, we modify some … … 461 466 # replace <pro>ginette</pro> by a sequence like 462 467 # <a href="./ginette.html">ginette</a> 463 pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro468 ${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro 464 469 status=${?} 465 470 if [ ${status} -ne 0 ] … … 470 475 # replace <proidl>ginette</proidl> by a sequence like 471 476 # <a href="./ginette.html">ginette</a> 472 pro2href.sh -i ${outputtmp} -r ${IDL_DIR}/help/online_help -e proidl477 ${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${idl_dir}/help/online_help -e proidl 473 478 status=${?} 474 479 if [ ${status} -ne 0 ] … … 503 508 if [ ${nhtml} -ne 2 ] 504 509 then 505 echo "ERROR there is no t2 $( basename ${i} .pro ).html files"510 echo "ERROR there is no 2 $( basename ${i} .pro ).html files" 506 511 find ../.. -name $( basename ${i} .pro ).html 507 512 echo -
trunk/SRC/Documentation/xmldoc/savesaxo.sh
r411 r413 1 1 #!/bin/bash 2 2 # 3 # update : 3 # 4 # TODO 5 # ==== 6 # 7 # use doidldoc.sh for assistant outputs 8 # 9 # EVOLUTIONS 10 # ========== 11 # 4 12 # $Id$ 13 # 14 # - fplod 20091112T091437Z aedon.locean-ipsl.upmc.fr (Darwin) 15 # 16 # * define idl_dir (ref = idl6.4 on zeus) 17 # * use doidldoc.sh for HTML outputs 18 # 5 19 # fplod 2008-04-28T08:40:23Z aedon.locean-ipsl.upmc.fr (Darwin) 6 20 # add wiki update … … 108 122 set -u 109 123 # 124 # define idl_dir 125 # reference is idl 64 on zeus.locean-ipsl.upmc.fr 126 idl_dir=/usr/local_linux/idl/idl_6.4/idl/ 127 # 110 128 docompileall=0 111 129 dohtml=0 … … 113 131 dooldtest=0 114 132 doidlwavedoc=0 115 doidldoc= 0133 doidldoc=1 116 134 doTARsrc=0 117 135 doTARdata=0 … … 192 210 echo "exit" >> /tmp/compileall${$}.pro 193 211 IDL_STARTUP=/tmp/compileall${$}.pro 194 ${ IDL_DIR}/bin/idl &> /tmp/compileallerr_${$}212 ${idl_dir}/bin/idl &> /tmp/compileallerr_${$} 195 213 echo 196 214 echo … … 253 271 then 254 272 # 255 # build a idl file to launch idldoc 256 output=../idldoc_html_output/ 257 log="/tmp/idldochtml_${$}.log" 258 pro="/tmp/idldochtml_${$}.pro" 259 cat <<EOF > ${pro} 260 !path = expand_path('+' + '../idldoc/') 261 print,!path 262 idldoc,root="../../",title="SAXO Documentation", $ 263 LOG_FILE="${log}", $ 264 output="${output}", $ 265 overview="../../overview", /statistics, /preformat 266 exit 267 EOF 268 # launch idl with the file built above 269 IDL_STARTUP=${pro};${IDL_DIR}/bin/idl 270 /bin/rm ${pro} 271 # In order to do not have to many revision in svn, we modify some 272 # lines produced by idldoc : 273 # - add Source link in each html file corresponding to a .pro file 274 # example : 275 # <td>Source</td> 276 # will be replaced by 277 # <td><a href="../../Calendar/caldat.pro" title="Source code of a file">Source</a></td> 278 # 279 # - remove date and time of idldoc production 280 # examples : 281 # <!-- Generated by IDLdoc 2.0 on Wed Jun 7 10:25:28 2006 --> 282 # will be replaced by 283 # <!-- Generated by IDLdoc 2.0 --> 284 # <div id="tagline">Produced by IDLdoc 2.0 on Wed Jun 7 10:54:37 2006.</div 285 # will be replaced by 286 # <div id="tagline">Produced by IDLdoc 2.0</div> 287 # <h2>Produced on Wed Jun 7 10:23:13 2006</h2> 288 # will be delete 289 # other lines will be deleted because the time is the time of checkout not 290 # the time of revision. 291 # the sequence of lines 292 #<dl> 293 # <dt>Last modification:</dt> 294 # <dd>Fri Jun 2 11:46:24 2006</dd> 295 # </dl> 296 # should also be removed ++ je ne sais pas dire en sed la ligne 297 # suivant l'occurence de Last modification 298 # 299 # count of directory levels in output 300 # this count will be use to format relative path later 301 nblev1=$(echo ${output} | sed -e "s@/\$@@" |awk -F "/" '{print NF}') 302 # 303 list_html_pro=$(find ${output} -name "*.html" -exec grep -l "<title>.*\.pro" {} \;) 304 for file_html in ${list_html_pro} 305 do 306 # build the .pro file name 307 bfile=$(basename ${file_html} .html) 308 # retrieve the path of html file relative to memopwd (so relative to 309 # output). This path will be used in "Source" link. 310 nblev2=$(dirname ${file_html} | sed -e "s@/\$@@" | awk -F "/" '{print NF}') 311 difflev=$((${nblev2} - ${nblev1})) 312 if [ ${difflev} -ge 2 ] 313 then 314 ilev=1 315 reloutput_html=".." 316 while [ ${ilev} -le ${difflev} ] 317 do 318 reloutput_html="${reloutput_html}/.." 319 ilev=$(( ${ilev} + 1 )) 320 done 321 relpath_html=$(dirname ${file_html} | \ 322 sed -e "s@${output}@${reloutput_html}@" \ 323 -e "s@\$@/@") 324 # echo "relpath ${relpath_html})" 325 else 326 relpath_html="./" 327 fi 328 # echo "relpath ${relpath_html}/${bfile}" 329 sed \ 330 -e "s@<td >Source<\/td>@<td><a href=\"${relpath_html}/${bfile}.pro\" title=\"Source code of a file\">Source<\/a><\/td>@" \ 331 ${file_html} > ${file_html}_modify 332 mv ${file_html}_modify ${file_html} 333 done 334 list_html=$(find ${output} -name "*.html") 335 for file_html in ${list_html} 336 do 337 sed \ 338 -e "s/\(Generated by IDLdoc 2.0\)\( on .*\)\( -->\)/\1\3/" \ 339 -e "s/\(Produced by IDLdoc 2.0\)\( on .*\)\(\.<\/div>\)/\1\3/" \ 340 -e "/<h2>Produced on/d" \ 341 -e "/Last modification:/d" \ 342 -e "/<dd>... ... .* ..:..:.. ....<\/dd>/d" \ 343 -e 's@<div class="value">@<div class="preformat">@' \ 344 -e 's/div\#file_comments {/div\#file_comments { white-space: pre;/' \ 345 -e 's@^ <fixe>@<pre>@' \ 346 -e 's@^ </fixe>@</pre>@' \ 347 -e 's@xhtml-transitional@xhtml1-transitional@' \ 348 ${file_html} > ${file_html}_modify 349 mv ${file_html}_modify ${file_html} 350 done 351 # suppress ".html" in idldoc-index*.html in lines like 352 # a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read.html 353 list_html=$(find ${output} -name "idldoc-index*.html") 354 for file_html in ${list_html} 355 do 356 sed \ 357 -e "s/\(a parameter from the routine \)\(.*\)\(.html\)/\1\2/" \ 358 ${file_html} > ${file_html}_modify 359 mv ${file_html}_modify ${file_html} 360 done 361 # replace <pro>ginette</pro> by a sequence like 362 # <a href="./ginette.html">ginette</a> 363 ./pro2href.sh -i ${output} -r ${output} -e pro 364 status=${?} 365 if [ ${status} -ne 0 ] 366 then 367 echo "eee : pb during ./pro2href.sh for <pro>...</pro>" 368 exit 1 369 fi 370 # replace <proidl>ginette</proidl> by a sequence like 371 # <a href="./ginette.html">ginette</a> 372 ./pro2href.sh -i ${output} -r ${IDL_DIR}/help/online_help -e proidl 373 status=${?} 374 if [ ${status} -ne 0 ] 375 then 376 echo "eee : pb during ./pro2href.sh for <proidl>...</proidl>" 377 exit 1 378 fi 379 echo "iii : you can see log file in ${log}" 380 echo "iii : and look ${output}/idldoc-warnings.html#undoc" 273 # build HTML idldoc outputs 274 ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh \ 275 -i ../.. -t "SAXO Documentation" \ 276 -o ../idldoc_html_output/ 277 -idl_dir ${idl_dir} 381 278 # 382 279 # build a idl file to launch idldoc … … 393 290 EOF 394 291 # launch idl with the file built above 395 IDL_STARTUP=${pro};${ IDL_DIR}/bin/idl292 IDL_STARTUP=${pro};${idl_dir}/bin/idl 396 293 /bin/rm ${pro} 397 294 # In order to do not have to many revision in svn, we modify some … … 452 349 # replace <proidl>ginette</proidl> by a sequence like 453 350 # <a href="./ginette.html">ginette</a> 454 ./pro2href.sh -i ${output} -r ${ IDL_DIR}/help/online_help -e proidl351 ./pro2href.sh -i ${output} -r ${idl_dir}/help/online_help -e proidl 455 352 status=${?} 456 353 if [ ${status} -ne 0 ] … … 487 384 if [ ${nhtml} -ne 2 ] 488 385 then 489 echo "ERROR there is no t2 $( basename ${i} .pro ).html files"386 echo "ERROR there is no 2 $( basename ${i} .pro ).html files" 490 387 find ../.. -name $( basename ${i} .pro ).html 491 388 echo
Note: See TracChangeset
for help on using the changeset viewer.