Ignore:
Timestamp:
03/20/07 18:04:40 (17 years ago)
Author:
pinsard
Message:

preparing transformation of <pro>..</pro> in headers for idldoc outputs

File:
1 edited

Legend:

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

    r217 r233  
    33# update : 
    44# $Id$ 
     5# fplod 2007-03-20T15:10:29Z aedon.locean-ipsl.upmc.fr (Darwin) 
     6# . replace <pro>ginette</pro> by a sequence like 
     7# <a href="./ginette.html">ginette</a> in idldoc html and assistant outputs 
     8# . encaspulate example content in <pre> </pre> in idldoc assistant outputs 
    59# smasson Fri Sep 22 17:28:10 CEST 2006 
    610# check that the number of existing html files for each .pro file is 2! 
     
    1923# suppress ?format=raw 
    2024# fplod 2006-09-20T15:30:15Z aedon.locean-ipsl.upmc.fr (Darwin) 
    21 # add copy of html files unedr xmldoc and idldoc_htlm_output on 
     25# add copy of html files unedr xmldoc and idldoc_html_output on 
    2226# saxo@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/ 
    2327# see dodocdownload 
     
    163167      do 
    164168# does it contains pro or function ? 
    165       egrep -iq '^ *    *(pro|function)' $i 
    166       if [ $? -eq 0 ] 
     169      egrep -iq '^ *    *(pro|function)' ${i} 
     170      if [ ${?} -eq 0 ] 
    167171          then 
    168           echo "print, '$( basename $i .pro ) :'" >> /tmp/compileall${$}.pro 
    169           echo "resolve_all, resolve_either = '$( basename $i .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt']" >> /tmp/compileall${$}.pro 
     172          echo "print, '$( basename ${i} .pro ) :'" >> /tmp/compileall${$}.pro 
     173          echo "resolve_all, resolve_either = '$( basename ${i} .pro )', skip_routines = ['xxx2ps','trends', 'label_gmt']" >> /tmp/compileall${$}.pro 
    170174      fi 
    171175    done 
     
    233237    # build a idl file to launch idldoc 
    234238    output=../idldoc_html_output/ 
    235     log="/tmp/idldochtlm_${$}.log" 
    236     pro="/tmp/idldochtlm_${$}.pro" 
     239    log="/tmp/idldochtml_${$}.log" 
     240    pro="/tmp/idldochtml_${$}.pro" 
    237241    cat <<EOF > ${pro} 
    238242!path = expand_path('+' + '../idldoc/') 
     
    276280    # 
    277281    # count of directory levels in output 
    278     # this ount will be use to format relative path later 
     282    # this count will be use to format relative path later 
    279283    nblev1=$(echo ${output} | sed -e "s@/\$@@" |awk -F "/" '{print NF}') 
    280284    # 
    281     list_html_pro=$(find ${output} -name "*.html" -exec grep  -l "<title>.*\.pro" {} \;) 
     285    list_html_pro=$(find ${output} -name "*.html" -exec grep -l "<title>.*\.pro" {} \;) 
    282286    for file_html in ${list_html_pro} 
    283287    do 
     
    300304                   sed -e "s@${output}@${reloutput_html}@" \ 
    301305                       -e "s@\$@/@") 
    302       echo "relpath ${relpath_html})" 
     306      # echo "relpath ${relpath_html})" 
    303307     else 
    304308      relpath_html="./" 
     
    337341     mv ${file_html}_modify ${file_html} 
    338342    done 
     343    # replace <pro>ginette</pro> by a sequence like 
     344    # <a href="./ginette.html">ginette</a> 
     345    ./pro2href.sh ${output} 
     346    status=${?} 
     347    if [ ${status} -ne 0 ] 
     348    then 
     349       echo "eee : pb during ./pro2href.sh" 
     350       exit 1 
     351    fi 
    339352    echo "iii : you can see log file in ${log}" 
    340353    echo "iii : and look ${output}/idldoc-warnings.html#undoc" 
     
    379392    #++ -e 's@\(href="#_.*\)\(_param_\)\(.*"\)@\1_keyword_\3@g' \ # ++ pb global 
    380393    #  ONLINE_HELP, book="../idldoc_assistant_output/idldoc-lib.adp", /full_path    # won't work 
     394    # encaspulate example content in <pre> </pre> in idldoc assistant outputs 
     395    # Examples section is supposed to start with <h3>Examples</h3> 
     396    # and end is before <h3>Version history</h3> 
    381397    list_html=$(find ${output} -name "*.html") 
    382398    for file_html in ${list_html} 
     
    393409     -e 's@^ <fixe>@<pre>@' \ 
    394410     -e 's@^ </fixe>@</pre>@' \ 
     411     -e "s@<h3>Examples</h3>@<h3>Examples</h3><pre>@" \ 
     412     -e "s@<h3>Version history</h3>@</pre><h3>Version history</h3>@" \ 
    395413     ${file_html} > ${file_html}_modify 
    396414     mv ${file_html}_modify ${file_html} 
    397415    done 
     416    # replace <pro>ginette</pro> by a sequence like 
     417    # <a href="./ginette.html">ginette</a> 
     418    ./pro2href.sh ${output} 
     419    status=0 
     420    status=${?} 
     421    if [ ${status} -ne 0 ] 
     422    then 
     423       echo "eee : pb during ./pro2href.sh" 
     424       exit 1 
     425    fi 
    398426    # add the directory-overview.html from dir-files.html in idldoc_html_output 
    399427    list_html=$(find ../idldoc_html_output -name dir-files.html) 
     
    418446    # check that the number of existing html files for each .pro file is 2! 
    419447    for i in $( find ../.. -name "*.pro" ) 
    420       do 
    421       nhtml=$( find ../.. -name $( basename $i .pro ).html | wc -l ) 
    422       if [ $nhtml -ne 2 ] 
     448    do 
     449      nhtml=$( find ../.. -name $( basename ${i} .pro ).html | wc -l ) 
     450      if [ ${nhtml} -ne 2 ] 
    423451          then 
    424           echo ERROR there is not 2 $( basename $i .pro ).html files  
    425           find ../.. -name $( basename $i .pro ).html 
     452          echo ERROR there is not 2 $( basename ${i} .pro ).html files 
     453          find ../.. -name $( basename ${i} .pro ).html 
    426454          echo 
    427455      fi 
     
    473501fi 
    474502#------------------------------------------------------------------ 
    475 if [[ ($doDTAlodyc -eq 1) || ($doDTAipsl -eq 1) ]] 
     503if [[ (${doDTAlodyc} -eq 1) || (${doDTAipsl} -eq 1) ]] 
    476504then 
    477505    echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" 
    478506    infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) 
    479507    filedata=$(echo ${infodata} | awk '{print $NF}') 
    480     filedata=$(basename $filedata) 
     508    filedata=$(basename ${filedata}) 
    481509    cat <<EOF > job_data_$$ 
    482510#!/bin/bash 
     
    484512# 
    485513rm -rf DATA 
    486 wget http://forge.ipsl.jussieu.fr/saxo/download/$filedata 
    487 gunzip $filedata 
    488 tar vxf $( basename $filedata .gz ) 
    489 rm -f $( basename $filedata .gz ) 
     514wget http://forge.ipsl.jussieu.fr/saxo/download/${filedata} 
     515gunzip ${filedata} 
     516tar vxf $( basename ${filedata} .gz ) 
     517rm -f $( basename ${filedata} .gz ) 
    490518# 
    491519chmod -R 755 * 
     
    495523fi 
    496524#------------------------------------------------------------------ 
    497 if [ $doSRClodyc -eq 1 ] 
     525if [ ${doSRClodyc} -eq 1 ] 
    498526then 
    499527# update src on cerbere 
     
    503531fi 
    504532#------------------------------------------------------------------ 
    505 if [ $doDTAlodyc -eq 1 ] 
     533if [ ${doDTAlodyc} -eq 1 ] 
    506534then 
    507535# update data on cerbere 
     
    511539fi 
    512540#------------------------------------------------------------------ 
    513 if [ $doSRCipsl -eq 1 ] 
     541if [ ${doSRCipsl} -eq 1 ] 
    514542then 
    515543# update src on calcul2 
     
    519547fi 
    520548#------------------------------------------------------------------ 
    521 if [ $doDTAipsl -eq 1 ] 
     549if [ ${doDTAipsl} -eq 1 ] 
    522550then 
    523551# update data on cook 
     
    527555fi 
    528556#------------------------------------------------------------------ 
    529 if [ $doSRCidris -eq 1 ] 
     557if [ ${doSRCidris} -eq 1 ] 
    530558then 
    531559# update src on rhodes 
     
    534562fi 
    535563#------------------------------------------------------------------ 
    536 if [ $doDTAidris -eq 1 ] 
     564if [ ${doDTAidris} -eq 1 ] 
    537565then 
    538566# create the update script for rhodes 
    539     if [[ ($doDTAlodyc -eq 0) && ($doDTAipsl -eq 0) ]] 
     567    if [[ (${doDTAlodyc} -eq 0) && (${doDTAipsl} -eq 0) ]] 
    540568        then 
    541569        echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" 
    542570        infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1) 
    543571        filedata=$(echo ${infodata} | awk '{print $NF}') 
    544         filedata=$(basename $filedata) 
     572        filedata=$(basename ${filedata}) 
    545573    fi 
    546574    cat <<EOF > job_data_idris_$$ 
     
    550578rm -rf DATA 
    551579echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd" 
    552 scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/$filedata . 
    553 gunzip $filedata 
    554 tar vxf $( basename $filedata .gz ) 
    555 rm -f $( basename $filedata .gz ) 
     580scp ${lgforge}@forge.ipsl.jussieu.fr:/ipsl/forge/projets/saxo/download/${filedata} . 
     581gunzip ${filedata} 
     582tar vxf $( basename ${filedata} .gz ) 
     583rm -f $( basename ${filedata} .gz ) 
    556584# 
    557585chmod -R 755 * 
Note: See TracChangeset for help on using the changeset viewer.