Changeset 253
- Timestamp:
- 06/26/07 17:10:29 (17 years ago)
- Location:
- trunk/SRC/Documentation/xmldoc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/pro2href.sh
r237 r253 8 8 # update : 9 9 # $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 10 17 # fplod 2007-03-20T14:02:14Z aedon.locean-ipsl.upmc.fr (Darwin) 11 18 # creation … … 14 21 output=${1} # ++ parameter 15 22 # 16 # first find all files containing <pro>.. </pro>23 # first find all files containing <pro>...</pro> 17 24 list_html_pro=$(find ${output} -name "*.html" -exec grep -l "<pro>.*</pro>" {} \;) 18 25 if [ "${list_html_pro}" = " " ] 19 26 then 20 echo "iii : no <pro>.. </pro> in html files"27 echo "iii : no <pro>...</pro> in html files" 21 28 else 22 29 for file_html in ${list_html_pro} … … 24 31 fpath=$(dirname ${file_html} | sed -e "s+\(${output}/\)\(.*\)+\2+") 25 32 list_llink=$(grep -n "<pro>.*</pro>" ${file_html} | awk -F ":" '{print $1}') 26 # ++ repérer si plusieurs <pro>.*</pro> par ligne27 # ++ sortir en erreur si c'est le cas28 33 for line in ${list_llink} 29 34 do … … 33 38 module=$(sed -ne "${line},${line}p" ${file_html} | \ 34 39 grep "<pro>.*</pro>" | \ 35 sed -e "s+\(.*<pro>\)\( .*\)\(</pro>.*\)+\\2.html+")40 sed -e "s+\(.*<pro>\)\([^<]*\)\(</pro>.*\)+\\2.html+g") 36 41 modulemin=$(echo ${module} | tr "[:upper:]" "[:lower:]" ) 37 42 # 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> 39 44 lpath=$(find ${output} -name "${modulemin}") 40 # ++ repérer si doublons41 # ++ sortir en erreur si c'est le cas42 45 if [ "${lpath}" = "" ] 43 46 then … … 64 67 fi 65 68 #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" \ 67 70 ${file_html} > ${file_html}_modify 68 71 mv ${file_html}_modify ${file_html} -
trunk/SRC/Documentation/xmldoc/savesaxo.sh
r250 r253 3 3 # update : 4 4 # $Id$ 5 # fplod 2007-06-26T14:33:12Z aedon.locean-ipsl.upmc.fr (Darwin) 6 # copy listings.css in idldoc_assistant_output 5 7 # fplod 2007-03-20T15:10:29Z aedon.locean-ipsl.upmc.fr (Darwin) 6 8 # . replace <pro>ginette</pro> by a sequence like … … 434 436 cp ${file_html} ${fout} 435 437 done 438 # copy listings.css (needed by directory-overview.html files) 439 cp ../idldoc/resource/listings.css ${output} 436 440 # add an id in idldoc-lib.adp 437 441 cat << EOF > /tmp/adp_modification
Note: See TracChangeset
for help on using the changeset viewer.