Changeset 74


Ignore:
Timestamp:
06/17/08 11:22:47 (16 years ago)
Author:
pinsard
Message:

add documents in before.sh, add -l parameter in install.sh, several improvement for bibtex bibliography

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/before.sh

    r52 r74  
    1010# update : 
    1111# $Id$ 
     12# fplod 2008-06-16T09:48:22Z aedon.locean-ipsl.upmc.fr (Darwin) 
     13# add copy of documents 
    1214# fplod 2007-10-17T12:22:57Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1315# parametrisation of number of "many" presentation 
     
    2931if [ ${#} -lt ${minargcount} ] 
    3032then 
    31   echo "eee : not enought arguments" 
    32   echo "${usage}" 
    33   exit 1 
     33 echo "eee : not enought arguments" 
     34 echo "${usage}" 
     35 exit 1 
    3436fi 
    3537# 
     
    7880if [ -d ${dirsrc}/images/ ] 
    7981then 
    80    mkdir -p ${dirwww}/images/ 
    81    if [ ${nmany} -gt 0 ] 
    82    then 
    83       mkdir -p ${dirwww}/${lang}/images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
    84    fi 
     82 mkdir -p ${dirwww}/images/ 
     83 if [ ${nmany} -gt 0 ] 
     84 then 
     85  mkdir -p ${dirwww}/${lang}/images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
     86 fi 
     87fi 
     88# 
     89if [ -d ${dirsrc}/documents/ ] 
     90then 
     91 mkdir -p ${dirwww}/documents/ 
    8592fi 
    8693# 
     
    9097if [ ${exist_php} -eq 0 ] 
    9198then 
    92    mkdir -p ${dirwww}/php/ 
     99 mkdir -p ${dirwww}/php/ 
    93100fi 
    94101# 
     
    98105 if [ ${nmany} -gt 0 ] 
    99106 then 
    100     mkdir -p ${dirwww}/${lang}/many/ 
    101     imany=1 
    102     while [ ${imany} -le ${nmany} ] 
    103     do 
    104        mkdir -p ${dirwww}/${lang}/many/${product}$(printf "%2.2d" ${imany})/ 
    105        imany=$(( ${imany} + 1 )) 
    106     done 
     107  mkdir -p ${dirwww}/${lang}/many/ 
     108  imany=1 
     109  while [ ${imany} -le ${nmany} ] 
     110  do 
     111   mkdir -p ${dirwww}/${lang}/many/${product}$(printf "%2.2d" ${imany})/ 
     112   imany=$(( ${imany} + 1 )) 
     113  done 
    107114 fi 
    108115else 
     
    110117 if [ ${nmany} -gt 0 ] 
    111118 then 
    112     mkdir -p ${dirwww}/many/ 
    113     imany=1 
    114     while [ ${imany} -le ${nmany} ] 
    115     do 
    116        mkdir -p ${dirwww}/many/${product}$(printf "%2.2d" ${imany})/ 
    117     done 
     119  mkdir -p ${dirwww}/many/ 
     120  imany=1 
     121  while [ ${imany} -le ${nmany} ] 
     122  do 
     123   mkdir -p ${dirwww}/many/${product}$(printf "%2.2d" ${imany})/ 
     124  done 
    118125 fi 
    119126fi 
     
    121128if [ ${exist_php} -eq 0 ] 
    122129then 
    123    for file_php in ${list_php} 
    124    do 
    125      cp ${file_php} ${dirwww}/php/ 
    126    done 
     130 for file_php in ${list_php} 
     131 do 
     132  cp ${file_php} ${dirwww}/php/ 
     133 done 
    127134fi 
    128135# 
    129 if [ -d ${dirsrc}/images ] 
     136if [ -d ${dirsrc}/images/ ] 
    130137then 
    131    cp ${dirsrc}/images/* ${dirwww}/images/ 
    132    if [ ${nmany} -gt 0 ] 
    133    then 
    134       cp ${dirsrc}/images/* ${dirwww}/${lang}/images/ # ++ parce que un niveau de plus que d'habitude dans les chunck 
    135    fi 
     138 cp ${dirsrc}/images/* ${dirwww}/images/ 
     139 if [ ${nmany} -gt 0 ] 
     140 then 
     141  cp ${dirsrc}/images/* ${dirwww}/${lang}/images/ # ++ parce que un niveau de plus que d'habitude dans les chunck 
     142 fi 
     143fi 
     144# 
     145# copy of documents 
     146if [ -d ${dirsrc}/documents/ ]  
     147then 
     148 cp ${dirsrc}/documents/* ${dirwww}/documents/ 
    136149fi 
    137150# 
    138151# copy of CSS 
    139 ls *.css 1> /dev/null 2> /dev/null 
     152ls ${dirsrc}/*.css 1> /dev/null 2> /dev/null 
    140153exist_css=${?} 
    141154if [ ${exist_css} -eq 0 ] 
     
    145158if [ ${nmany} -gt 0 ] 
    146159then 
    147   cp ${dirsrc}/*.css ${dirwww}/${lang}/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
     160 cp ${dirsrc}/*.css ${dirwww}/${lang}/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
    148161fi 
    149162# 
  • trunk/biblioentry_xml.xsl

    r67 r74  
    6262     <xsl:text>@inproceedings{</xsl:text> 
    6363    </xsl:when> 
     64    <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='book']"> 
     65     <xsl:text>@book{</xsl:text> 
     66    </xsl:when> 
     67    <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='manual']"> 
     68     <xsl:text>@manual{</xsl:text> 
     69    </xsl:when> 
    6470    <xsl:otherwise> 
    6571     <xsl:message terminate="yes"> 
    66 eee : unknown biblioset relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 
     72eee : unknown biblioset 1 relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 
    6773eee : <xsl:value-of select="$my_biblioentry/descendant::d:biblioset/@relation"/> 
    6874     </xsl:message> 
     
    169175        </xsl:when> 
    170176        <xsl:otherwise> 
    171         <xsl:apply-templates select="$my_biblioentry/d:bibliomisc" mode="raw"/> 
     177        <xsl:apply-templates select="$my_biblioentry/d:biblioid" mode="raw"/> 
    172178        </xsl:otherwise> 
    173179       </xsl:choose> 
     
    225231      </xsl:if> 
    226232     </xsl:when> 
     233     <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='book']"> 
     234      <xsl:choose> 
     235       <xsl:when test="$type = 'bibtex'"> 
     236        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset[@relation='book']/child::d:title" mode="bibtex"/> 
     237       </xsl:when> 
     238       <xsl:otherwise> 
     239        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title" mode="raw"/> 
     240       </xsl:otherwise> 
     241      </xsl:choose> 
     242       <xsl:choose> 
     243        <xsl:when test="$type = 'bibtex'"> 
     244         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="bibtex"/> 
     245        </xsl:when> 
     246        <xsl:otherwise> 
     247         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="raw"/> 
     248        </xsl:otherwise> 
     249       </xsl:choose> 
     250      <xsl:if test="$my_biblioentry/descendant::d:pagenums"> 
     251       <xsl:choose> 
     252        <xsl:when test="$type = 'bibtex'"> 
     253         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="bibtex"/> 
     254        </xsl:when> 
     255        <xsl:otherwise> 
     256         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="raw"/> 
     257        </xsl:otherwise> 
     258       </xsl:choose> 
     259      </xsl:if> 
     260       <xsl:choose> 
     261        <xsl:when test="$type = 'bibtex'"> 
     262         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="bibtex"/> 
     263        </xsl:when> 
     264        <xsl:otherwise> 
     265         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="raw"/> 
     266        </xsl:otherwise> 
     267       </xsl:choose> 
     268      </xsl:when> 
     269     <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='manual']"> 
     270      <xsl:choose> 
     271       <xsl:when test="$type = 'bibtex'"> 
     272        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset[@relation='manual']/child::d:title" mode="bibtex"/> 
     273       </xsl:when> 
     274       <xsl:otherwise> 
     275        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title" mode="raw"/> 
     276       </xsl:otherwise> 
     277      </xsl:choose> 
     278       <xsl:choose> 
     279        <xsl:when test="$type = 'bibtex'"> 
     280         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="bibtex"/> 
     281        </xsl:when> 
     282        <xsl:otherwise> 
     283         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="raw"/> 
     284        </xsl:otherwise> 
     285       </xsl:choose> 
     286       <xsl:choose> 
     287        <xsl:when test="$type = 'bibtex'"> 
     288         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="bibtex"/> 
     289        </xsl:when> 
     290        <xsl:otherwise> 
     291         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="raw"/> 
     292        </xsl:otherwise> 
     293       </xsl:choose> 
     294     </xsl:when> 
    227295     <xsl:otherwise> 
    228296      <xsl:message terminate="no"> 
    229 eee : unknown biblioset relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 
     297eee : unknown biblioset 2 relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 
    230298eee : <xsl:value-of select="$my_biblioentry/descendant::d:biblioset/@relation"/> 
    231299      </xsl:message> 
     
    455523</xsl:template> 
    456524 
     525<xsl:template match="d:biblioid[@class='uri']" mode="raw"> 
     526 <xsl:text>, </xsl:text> 
     527 <xsl:element name="link"> 
     528  <xsl:attribute name="xl:href"><xsl:value-of select="normalize-space(.)"/></xsl:attribute> 
     529 </xsl:element> 
     530</xsl:template> 
     531 
     532<xsl:template match="d:biblioid[@class='uri']" mode="bibtex"> 
     533 <xsl:text>, uri = {</xsl:text> 
     534 <xsl:value-of select="normalize-space(.)"/> 
     535 <xsl:text>}</xsl:text> 
     536</xsl:template> 
    457537 
    458538<xsl:template match="d:biblioid[@class='other']" mode="raw"> 
     
    511591</xsl:template> 
    512592 
     593 
    513594<xsl:template match="d:conftitle"> 
    514595 <xsl:text>, </xsl:text> 
     
    537618</xsl:template> 
    538619 
    539 <xsl:template match="d:biblioid"> 
     620<xsl:template match="d:biblioid" mode="raw"> 
    540621<xsl:choose> 
    541622<xsl:when test="@class='doi'"> 
    542  <xsl:apply-templates select="." mode="bibtex"/> 
     623 <xsl:apply-templates select="." mode="raw"/> 
    543624</xsl:when> 
    544625<xsl:when test="@class='isbn'"> 
    545  <xsl:apply-templates select="." mode="bibtex"/> 
     626 <xsl:apply-templates select="." mode="raw"/> 
     627</xsl:when> 
     628<xsl:when test="@class='uri'"> 
     629 <xsl:apply-templates select="." mode="raw"/> 
    546630</xsl:when> 
    547631<xsl:when test="@class='other'"> 
    548  <xsl:apply-templates select="." mode="bibtex"/> 
     632 <xsl:apply-templates select="." mode="raw"/> 
    549633</xsl:when> 
    550634<xsl:otherwise> 
     
    558642</xsl:template> 
    559643 
     644<xsl:template match="d:biblioid" mode="bibtex"> 
     645<xsl:choose> 
     646<xsl:when test="@class='doi'"> 
     647 <xsl:apply-templates select="." mode="bibtex"/> 
     648</xsl:when> 
     649<xsl:when test="@class='isbn'"> 
     650 <xsl:apply-templates select="." mode="bibtex"/> 
     651</xsl:when> 
     652<xsl:when test="@class='uri'"> 
     653 <xsl:apply-templates select="." mode="bibtex"/> 
     654</xsl:when> 
     655<xsl:when test="@class='other'"> 
     656 <xsl:apply-templates select="." mode="bibtex"/> 
     657</xsl:when> 
     658<xsl:otherwise> 
     659 <xsl:message terminate="yes"> 
     660eee : unknown biblioid class for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 
     661eee : class : <xsl:value-of select="normalize-space(@class)"/> 
     662eee : value : <xsl:value-of select="normalize-space(.)"/> 
     663 </xsl:message> 
     664</xsl:otherwise> 
     665</xsl:choose> 
     666</xsl:template> 
     667 
    560668<xsl:template match="d:bibliomisc" mode="raw"> 
    561669<xsl:choose> 
  • trunk/bibopa.sh

    r71 r74  
    117117# 
    118118# test if xsltproc is available 
    119 type xsltproc 1> /dev/null 2>&1 
     119tool=xsltproc 
     120type ${tool} 1> /dev/null 2>&1 
    120121status=${?} 
    121122if [ ${status} -ne 0 ] 
    122123then 
    123  echo " eee : xsltproc not found" 
     124 echo " eee : ${tool} not found" 
    124125 exit 1 
    125126fi 
    126127unset status 
     128unset tool 
    127129# 
    128130# test if xml  is available 
    129 type xml 1> /dev/null 2>&1 
     131tool=xml 
     132type ${tool} 1> /dev/null 2>&1 
    130133status=${?} 
    131134if [ ${status} -ne 0 ] 
    132135then 
    133  echo " eee : xml not found" 
     136 echo " eee : ${tool} not found" 
    134137 exit 1 
    135138fi 
    136139unset status 
     140unset tool 
    137141# 
    138142# test if python is available 
    139 type python 1> /dev/null 2>&1 
     143tool=python 
     144type ${tool} 1> /dev/null 2>&1 
    140145status=${?} 
    141146if [ ${status} -ne 0 ] 
    142147then 
    143  echo " eee : python not found}" 
     148 echo " eee : ${tool} not found" 
    144149 exit 1 
    145150fi 
    146151unset status 
     152unset tool 
    147153# 
    148154usage=" Usage : ${command} -i filein -t type -o order -p project -l lang" 
     
    424430fileraw_strict=/tmp/$(basename ${fileraw})_strict 
    425431grep -v "^#" ${fileraw} | grep -v "^%" > ${fileraw_strict} 
     432iconv -f ISO-8859-1 -t UTF-8 ${fileraw_strict} > ${fileraw_strict}2 
     433mv ${fileraw_strict}2 ${fileraw_strict} 
    426434case ${type} in 
    427435bibtex)  
  • trunk/install.sh

    r52 r74  
    99# update : 
    1010# $Id$ 
    11 # ++ -p should be suppress  it is not any more compulsary (-u is now the good one) 
     11# fplod 2008-06-17T09:10:19Z aedon.locean-ipsl.upmc.fr (Darwin) 
     12# add -l parameter only used in specific case at LOCEAN when user parameter of 
     13# persoweb must be different tthan login (ex: acmo vs fplod) 
     14# replace http://www.lodyc.jussieu.fr/info_reseau/persoweb/?fastupdate=1&user=${user}" 
     15# by 
     16# http://intranet.locean-ipsl.upmc.fr/persoweb/?fastupdate=1&user=${user} 
    1217# fplod 2008-03-28T10:26:58Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1318# new personnal webpages policy at LOCEAN so new command and new parameter (-u) 
     
    2328log=/tmp/${command}.${log_date} 
    2429# 
    25 usage=" Usage : ${command} -w dirwww -p dirpublish -u urlpublish" 
     30usage=" Usage : ${command} -w dirwww -p dirpublish -u urlpublish -l login" 
    2631# 
    2732minargcount=4 
     
    2934if [ ${#} -lt ${minargcount} ] 
    3035then 
    31   echo "eee : not enought arguments" 
    32   echo "${usage}" 
    33   exit 1 
     36 echo "eee : not enought arguments" 
     37 echo "${usage}" 
     38 exit 1 
    3439fi 
    3540# 
     
    3742dirpublish="none" 
    3843urlpublish="none" 
     44login="none" 
    3945# 
    4046while [ ! -z "${1}" ] 
     
    5359  shift 
    5460 ;; 
     61 -l ) 
     62  login=${2} 
     63  shift 
     64 ;; 
    5565 esac 
    5666 shift # next flag 
     
    6373answer=${1:-" "} 
    6474case ${answer} in 
    65     y|Y|n|N) 
    66         ;; 
    67     *) 
    68         if [ "${dirpublish}" != "none" ] 
    69         then 
    70           echo "Do you want to install on ${dirpublish} (y|[n]) ?" 
    71           read answer 
    72         fi 
    73         if [ "${urlpublish}" != "none" ] 
    74         then 
    75            echo "Do you want to install on ${urlpublish} (y|[n]) ?" 
    76            read answer 
    77         fi 
    78         ;; 
     75 y|Y|n|N) 
     76 ;; 
     77 *) 
     78 if [ "${dirpublish}" != "none" ] 
     79 then 
     80  echo "Do you want to install on ${dirpublish} (y|[n]) ?" 
     81  read answer 
     82 fi 
     83 if [ "${urlpublish}" != "none" ] 
     84 then 
     85  echo "Do you want to install on ${urlpublish} (y|[n]) ?" 
     86  read answer 
     87 fi 
     88 ;; 
    7989esac 
    8090# 
    8191case ${answer} in 
    8292 y|Y) 
    83         if [ "${dirpublish}" != "none" ] 
    84  then 
    85  # copy of ${dirwww} on $dirpublish 
    86  echo "iii : update of ${dirpublish}" 
    87  rsync -av --exclude=".DS_Store" -e ssh ${dirwww}/ ${dirpublish} 
    88  # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST 
    89  # is cerbere.locean-ipsl.upmc.fr. If so, a specific update is launched 
    90  userhost=${dirpublish%%:*} 
    91  host=${userhost##*@} 
    92  user=${userhost%%@*} 
    93  if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ] 
    94  then 
    95     wget -q "http://www.lodyc.jussieu.fr/info_reseau/persoweb/?fastupdate=1&user=${user}" -O /dev/null 
    96  fi 
    97 else 
    98     # urlpublish=http://www.locean-ipsl.upmc.fr/~ginette/produit 
    99     dirpublish=${urlpublish##*~} 
    100     cd ${dirwww} 
    101     lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} skyros.locean-ipsl.upmc.fr 
    102     # ++ log 
    103 fi 
    104  
     93  if [ "${dirpublish}" != "none" ] 
     94  then 
     95   # copy of ${dirwww} on $dirpublish 
     96   echo "iii : update of ${dirpublish}" 
     97   rsync -av --exclude=".DS_Store" -e ssh ${dirwww}/ ${dirpublish} 
     98   # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST 
     99   # is cerbere.locean-ipsl.upmc.fr. If so, a specific update is launched 
     100   userhost=${dirpublish%%:*} 
     101   host=${userhost##*@} 
     102   if [ ${login} = "none" ] 
     103   then 
     104    user=${userhost%%@*} 
     105   else 
     106    user=${login} 
     107   fi 
     108   if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ] 
     109   then 
     110    wget -q "http://intranet.locean-ipsl.upmc.fr/persoweb/?fastupdate=1&user=${user}" -O /dev/null 
     111   fi 
     112  else 
     113   # urlpublish=http://www.locean-ipsl.upmc.fr/~ginette/produit 
     114   dirpublish=${urlpublish##*~} 
     115   cd ${dirwww} 
     116   lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} skyros.locean-ipsl.upmc.fr 
     117   # ++ log 
     118  fi 
    105119 ;; 
    106120 *) 
    107  echo "no update of ${dirpublish} or ${urlpublish}" 
     121  echo "no update of ${dirpublish} or ${urlpublish}" 
    108122 ;; 
    109123esac 
Note: See TracChangeset for help on using the changeset viewer.