Ignore:
Timestamp:
06/26/07 17:10:29 (17 years ago)
Author:
pinsard
Message:

improvment of links in idldoc outputs but still not perfect. see ticket:62

Location:
trunk/SRC/Documentation/xmldoc
Files:
2 edited

Legend:

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

    r237 r253  
    88# update : 
    99# $Id$ 
     10#++ still not working perfectly because path of links on the different occurences of <pro>...</pro> may not be the same  
     11# ex: see restoreboxparam.pro : domdef and saveboxparam 
     12# fplod 2007-06-26T13:32:06Z aedon.locean-ipsl.upmc.fr (Darwin) 
     13# improvment for multiple occurences of <pro>...</pro> on one line 
     14# see http://www.gentoo.org/doc/en/articles/l-sed2.xml  
     15# Sed by example, Part 2 
     16# especially for directory-overview files 
    1017# fplod 2007-03-20T14:02:14Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1118# creation 
     
    1421output=${1} # ++ parameter 
    1522# 
    16 # first find all files containing <pro>..</pro> 
     23# first find all files containing <pro>...</pro> 
    1724list_html_pro=$(find ${output} -name "*.html" -exec grep -l "<pro>.*</pro>" {} \;) 
    1825if [ "${list_html_pro}" = " " ] 
    1926then 
    20    echo "iii : no <pro>..</pro> in html files" 
     27   echo "iii : no <pro>...</pro> in html files" 
    2128else 
    2229   for file_html in ${list_html_pro} 
     
    2431       fpath=$(dirname ${file_html} | sed -e "s+\(${output}/\)\(.*\)+\2+") 
    2532       list_llink=$(grep -n "<pro>.*</pro>" ${file_html} | awk -F ":" '{print $1}') 
    26        # ++ repérer si plusieurs <pro>.*</pro> par ligne 
    27        # ++ sortir en erreur si c'est le cas 
    2833       for line in ${list_llink} 
    2934       do 
     
    3338          module=$(sed -ne "${line},${line}p" ${file_html} | \ 
    3439                   grep "<pro>.*</pro>" | \ 
    35                    sed -e "s+\(.*<pro>\)\(.*\)\(</pro>.*\)+\\2.html+") 
     40                   sed -e "s+\(.*<pro>\)\([^<]*\)\(</pro>.*\)+\\2.html+g") 
    3641          modulemin=$(echo ${module} | tr "[:upper:]" "[:lower:]" ) 
    3742          # lpath is the path on module relatively to the location of 
    38           # the html file containing the <pro>..</pro> 
     43          # the html file containing the <pro>...</pro> 
    3944          lpath=$(find ${output} -name "${modulemin}") 
    40            # ++ repérer si doublons  
    41            # ++ sortir en erreur si c'est le cas 
    4245          if [ "${lpath}" = "" ] 
    4346          then 
     
    6467             fi 
    6568#echo "relpath ${relpath}" 
    66              sed -e "${line}s+\(<pro>\)\(.*\)\(</pro>\)+<a href=\"${relpath}/\\2.html\">\2</a>+" \ 
     69             sed -e "${line}s+\(<pro>\)\([^<]*\)\(</pro>\)+<a href=\"${relpath}/\\2.html\">\2</a>+g" \ 
    6770             ${file_html} > ${file_html}_modify 
    6871             mv ${file_html}_modify ${file_html} 
  • trunk/SRC/Documentation/xmldoc/savesaxo.sh

    r250 r253  
    33# update : 
    44# $Id$ 
     5# fplod 2007-06-26T14:33:12Z aedon.locean-ipsl.upmc.fr (Darwin) 
     6# copy listings.css in idldoc_assistant_output 
    57# fplod 2007-03-20T15:10:29Z aedon.locean-ipsl.upmc.fr (Darwin) 
    68# . replace <pro>ginette</pro> by a sequence like 
     
    434436      cp ${file_html} ${fout} 
    435437    done 
     438    # copy listings.css (needed by directory-overview.html files) 
     439    cp ../idldoc/resource/listings.css ${output} 
    436440    # add an id in idldoc-lib.adp 
    437441    cat << EOF > /tmp/adp_modification 
Note: See TracChangeset for help on using the changeset viewer.