Changeset 377


Ignore:
Timestamp:
08/11/08 16:48:55 (16 years ago)
Author:
pinsard
Message:

parameters in doidldoc.sh but still not yet ready for production

File:
1 edited

Legend:

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

    r376 r377  
    11#! /bin/sh 
    22# 
    3 # module : 
    4 # build idldoc documentations  
    5 # 
    6 # update : 
     3#+ 
     4# 
     5# NAME 
     6# ==== 
     7# 
     8# idldoc.sh -  build idldoc documentations 
     9# 
     10# 
     11# SYNOPSYS 
     12# ======== 
     13# 
     14# ``doidldoc.sh -i indir -t title -o outdir`` 
     15# 
     16# DESCRIPTION 
     17# =========== 
     18# 
     19# Produce HTML files from IDL sources using idldoc. 
     20# 
     21# -i  directory input 
     22# -t  title 
     23# -o  directory output 
     24# 
     25# Two pass : first *classic* idldoc then some home made transformation to avoid 
     26# for example version of idldoc on each HTML files. 
     27# 
     28# The first pass produce files in /tmp/idldoc_output_${$}/ directory. 
     29# 
     30# At the end the result is in ``outdir`` 
     31# 
     32# EXAMPLES 
     33# ======== 
     34# 
     35# Results can be seen be opening a browser on /tmp/idldoc_html_output/index.html 
     36# 
     37# To produce SAXO HTML outputs 
     38# :: 
     39# 
     40#  $ cd SAXO_ws/SRC/Documentations/xmldoc/ 
     41#  $ doidldoc.sh -i ../.. -t "SAXO Documentation" -o ./idldoc_html_output/ 
     42# 
     43# To produce AMSU HTML outputs 
     44# :: 
     45# 
     46#  $ cd /usr/home/fplod/incas/amsu/amsu_ws/ 
     47#  $ doidldoc.sh -i . -t "AMSU Documentation" -o /tmp/idldoc_html_output/ 
     48# 
     49# TODO 
     50# ==== 
     51# 
     52# ++ pb PATH introduire SAXO_PATH 
     53# can be solved with: 
     54# :: 
     55# 
     56#  $ export PATH=${HOME}/SAXO_DIR/SRC/Documentation/xmldoc/:${PATH} 
     57# 
     58# ++ pb avec IDL_DIR pas tjs positionné 
     59# can be solved for linux with 
     60# :: 
     61# 
     62#  $ export IDL_DIR=/usr/local_linux/idl/ 
     63# 
     64# or for MacOSX with 
     65# :: 
     66# 
     67#  $ export IDL_DIR=/usr/local_macosx/idl//idl_6.2/idl_6.2/ 
     68# 
     69# 
     70# ++ choix de la version de idldoc et consequences sur assistant 
     71# 
     72# ++ choix de la version de idl et consequences sur assistant et lien sur 
     73# doc idl 
     74# 
     75# SEE ALSO 
     76# ======== 
     77# 
     78# idldoc++ lien 
     79# 
     80# EVOLUTIONS 
     81# ========== 
     82# 
    783# $Id$ 
    8 # ++ pb PATH introduire SAXO_PATH 
    9 # fplod 2008-06-20T13:07:59Z aedon.locean-ipsl.upmc.fr (Darwin) 
    10 # evaluation version 3.1.1 
    11 # we are not yet still ready to migrate to rst format because of lack of 
    12 # assistant 
    13 # transformation independant of IDLdoc release (at least between 2. and 3.) 
    14 # fplod 2008-01-10T08:13:41Z aedon.locean-ipsl.upmc.fr (Darwin) 
    15 # version  
    16 # http://cookbook.idldev.com/idldoc-3.0rc2.zip 
    17 # fplod 2008-01-03T09:59:18Z aedon.locean-ipsl.upmc.fr (Darwin) 
    18 # version  
    19 # http://cookbook.idldev.com/idldoc-3.0rc1.zip 
    20 # fplod 2007-12-12T09:47:04Z aedon.locean-ipsl.upmc.fr (Darwin) 
    21 # version 
    22 # http://michaelgalloy.com/wp-content/uploads/2007/12/idldoc-3.0b4.zip 
    23 # fplod 2007-12-11T09:14:04Z aedon.locean-ipsl.upmc.fr (Darwin) 
    24 # version  
    25 # http://michaelgalloy.com/wp-content/uploads/2007/12/idldoc-3.0b4-src.zip 
    26 # ++ pb path 
    27 # beginning of docbook templates writing (from html 3.0b3 tt files) 
    28 # fplod 2007-12-10T09:28:11Z aedon.locean-ipsl.upmc.fr (Darwin) 
    29 # test with gdl : pas possible car compatibility < 6.1 
    30 # fplod 2007-12-04T09:21:18Z aedon.locean-ipsl.upmc.fr (Darwin) 
    31 # version 
    32 # http://michaelgalloy.com/wp-content/uploads/2007/12/idldoc-3.0b3.zip 
    33 # pb parser if ; after ;- 
    34 # ++ plus de param et keyword dans l'index  
    35 # ++ pas w3c tilte au lieu de title, pas de charset, pas de alt, pas de summary 
    36 # ++ css pas ok  
    37 # ++ plus de @restrictions 
    38 # fplod 2007-12-04T09:10:55Z aedon.locean-ipsl.upmc.fr (Darwin) 
    39 # externalisation of idldoc issues from savesaxo.sh 
    40 # previous release of idldoc was 2.0 
    41 # this tool can be checked by creating doc from Michael Galloy librayry 
    42 # available on http://www.michaelgalloy.com/lib-docs/ 
    43 # version  
    44 #  http://michaelgalloy.com/wp-content/uploads/2007/11/idldoc-3.0b1.zip 
    45 # pas ok ne reconnait pas les @param, @keyword 
     84# 
     85# - fplod 2008-08-11T12:57:48Z aedon.locean-ipsl.upmc.fr (Darwin) 
     86# 
     87#   * comments in this file in ReST format 
     88#   * add ``-i``, ``-t`` and ``-o`` parameters 
     89# 
     90# - fplod 2008-06-20T13:07:59Z aedon.locean-ipsl.upmc.fr (Darwin) 
     91# 
     92#   * evaluation version 3.1.1 
     93# 
     94#     we are not yet still ready to migrate to rst format because of lack of 
     95#     assistant transformation independant of IDLdoc release (at least 
     96#     between 2.  and 3.) 
     97# 
     98# - fplod 2008-01-10T08:13:41Z aedon.locean-ipsl.upmc.fr (Darwin) 
     99# 
     100#   * version http://cookbook.idldev.com/idldoc-3.0rc2.zip 
     101# 
     102# - fplod 2008-01-03T09:59:18Z aedon.locean-ipsl.upmc.fr (Darwin) 
     103# 
     104#   * version http://cookbook.idldev.com/idldoc-3.0rc1.zip 
     105# 
     106# - fplod 2007-12-12T09:47:04Z aedon.locean-ipsl.upmc.fr (Darwin) 
     107# 
     108#   * version http://michaelgalloy.com/wp-content/uploads/2007/12/idldoc-3.0b4.zip 
     109# 
     110# - fplod 2007-12-11T09:14:04Z aedon.locean-ipsl.upmc.fr (Darwin) 
     111# 
     112#   * version http://michaelgalloy.com/wp-content/uploads/2007/12/idldoc-3.0b4-src.zip 
     113#   * ++ pb path 
     114#   * beginning of docbook templates writing (from html 3.0b3 tt files) 
     115# 
     116# - fplod 2007-12-10T09:28:11Z aedon.locean-ipsl.upmc.fr (Darwin) 
     117# 
     118#   * test with gdl : pas possible car compatibility < 6.1 
     119# 
     120# - fplod 2007-12-04T09:21:18Z aedon.locean-ipsl.upmc.fr (Darwin) 
     121# 
     122#   * version http://michaelgalloy.com/wp-content/uploads/2007/12/idldoc-3.0b3.zip 
     123#   * pb parser if ; after ;- 
     124#   * ++ plus de param et keyword dans l'index 
     125#   * ++ pas w3c tilte au lieu de title, pas de charset, pas de alt, pas de summary 
     126#   * ++ css pas ok 
     127#   * ++ plus de @restrictions 
     128# 
     129# - fplod 2007-12-04T09:10:55Z aedon.locean-ipsl.upmc.fr (Darwin) 
     130# 
     131#   * externalisation of idldoc issues from savesaxo.sh 
     132#   * previous release of idldoc was 2.0 
     133#   * this tool can be checked by creating doc from Michael Galloy librayry 
     134#     available on http://www.michaelgalloy.com/lib-docs/ 
     135#   * version http://michaelgalloy.com/wp-content/uploads/2007/11/idldoc-3.0b1.zip 
     136#   * pas ok ne reconnait pas les @param, @keyword 
     137#- 
     138# 
     139system=$(uname) 
     140case "${system}" in 
     141AIX|IRIX64) 
     142 echo " www : no specific posix checking" 
     143;; 
     144*) 
     145 set -o posix 
     146;; 
     147esac 
     148# 
     149command=$(basename ${0}) 
     150log_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") 
     151# 
     152usage=" Usage : ${command} -i indir -t title -o outdir" 
     153# 
     154# default ++ pas encore en parametre 
     155assistant=0 
     156transform=1 
     157idldoc_dir="../idldoc/" # 
     158idldoc_dir="/usr/home/fplod/src/idldoc-3.1.1/" # overriding idldoc_dir for test ++ 
     159# 
     160minargcount=4 
     161if [ ${#} -lt ${minargcount} ] 
     162then 
     163 echo "eee : not enought arguments" 
     164 echo "${usage}" 
     165 exit 1 
     166fi 
     167# 
     168while [ ! -z "${1}" ] # ++ pb bash 
     169do 
     170 case ${1} in 
     171 -i) 
     172  indir=${2} 
     173  shift 
     174 ;; 
     175 -t) 
     176  title=${2} 
     177  shift 
     178 ;; 
     179 -o) 
     180  outdir=${2} 
     181  shift 
     182 ;; 
     183 -h) 
     184  echo "${usage}" 
     185  exit 0 
     186 ;; 
     187 *) # other choice 
     188  echo "${usage}" 
     189  exit 1 
     190 ;; 
     191 esac 
     192 shift # next flag 
     193done 
    46194# 
    47195set -u 
     196# 
    48197# ++ test si idl (car gdl inutilisable) 
    49198application=idl 
    50 assistant=0 
    51 transform=1 
    52 title="SAXO Documentation" # ++ parametre 
    53 root="../../" 
    54 root="/Users/fplod/SAXO_DIR_ws/SRC/" #++ à cause du cd pour éviter expand_path 
    55 # ++ pb avec /Users/fplod/SAXO_DIR_ws/SRC/ToBeReviewed/UTILITAIRE/oups.pro ELEMENTS ... à cause de todo 
    56 #root="/usr/home/fplod/src/mglib/" # overriding root for test ++ 
    57 # 
    58 # 
    59 idldoc_dir="../idldoc/" #  
    60 idldoc_dir="/usr/home/fplod/src/idldoc-3.1.1/" # overriding idldoc_dir for ctest ++ 
    61 template_location=${idldoc_dir}/templates/ 
    62 #++ pas fini  
    63 #template_location=${idldoc_dir}/templates_dbk/ # overriding TEMPLATE_LOCATION++ 
    64 #template_location=/usr/home/fplod/src/idldoc-3.0b3/templates_dbk/ # overriding TEMPLATE_LOCATION++ 
    65199# 
    66200# memorize current directory 
    67201memopwd=$(pwd) # should be <working space>/SRC/Documentation/xmldoc 
    68 #------------------------------------------------------------------ 
    69202# 
    70203# build a idl file to launch idldoc 
    71 output=../idldoc_html_output/ 
    72 #++outputtmp=/tmp/idldoc_html_output${$}/ 
    73 outputtmp=/tmp/idldoc_html_output/ 
    74 log="/tmp/idldochtml_${$}.log" 
     204outputtmp=/tmp/idldoc_output${$}/ 
     205idldoc_log="/tmp/idldochtml_${$}.log" 
    75206pro="/tmp/idldochtml_${$}.pro" 
    76207# 
     
    78209cat << EOF > ${pro} 
    79210!path = expand_path('+' + '${idldoc_dir}') 
    80 idldoc,root="${root}",title="${title}", $ 
     211idldoc,root="${indir}",title="${title}", $ 
    81212CHARSET="ISO-8859-15", $ 
    82 LOG_FILE="${log}", $ 
     213LOG_FILE="${idldoc_log}", $ 
    83214output="${outputtmp}", $ 
    84215overview="../../overview", /statistics 
     
    186317fi # end of transform = 1 
    187318# 
    188 echo "iii : you can see log file in ${log}" 
    189 echo "iii : and look ${outputtmp}/idldoc-warnings.html#undoc" 
    190 # 
    191 if [ ${assistant} -eq 1 ]  
     319# 
     320if [ ${assistant} -eq 1 ] 
    192321then 
    193322# build a idl file to launch idldoc 
    194 output=../idldoc_assistant_output/ 
    195 log="/tmp/idldocassistant_${$}.log" 
     323idldoc_log="/tmp/idldocassistant_${$}.log" 
    196324pro="/tmp/idldocassistant_${$}.pro" 
    197325cat <<EOF > ${pro} 
    198326!path = expand_path('+' + '${idldoc_dir}') 
    199 idldoc,root="${root}",title="${title}", $ 
    200 LOG_FILE="${log}", $ 
     327idldoc,root="${indir}",title="${title}", $ 
     328LOG_FILE="${idldoc_log}", $ 
    201329output="${outputtmp}", overview='../../overview', /statistics, /embed, /assistant 
    202330exit 
     
    289417../idldoc_assistant_output/idldoc-lib.adp 
    290418rm /tmp/adp_modification 
    291 echo "iii : you can see log file in ${log}" 
    292 echo "iii : and look ${outputtmp}/idldoc-warnings.html#undoc" 
    293419# check that the number of existing html files for each .pro file is 2! 
    294420for i in $( find ../.. -name "*.pro" ) 
     
    306432# copy of temporary outputs on final directory 
    307433# ++ if transform 
    308 #++mv ${outputtmp} ${output} # ++ rsync 
    309 echo "look at ${outputtmp}/index.html" #++ 
     434mv ${outputtmp} ${outdir} 
     435echo "iii : look at ${outdir}/index.html" 
     436echo "iii : you can see idldoc log file in ${idldoc_log}" 
     437echo "iii : and look ${outdir}/idldoc-warnings.html#undoc" 
     438# 
    310439# end 
    311440exit 0 
Note: See TracChangeset for help on using the changeset viewer.