Changeset 74
- Timestamp:
- 06/17/08 11:22:47 (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/before.sh
r52 r74 10 10 # update : 11 11 # $Id$ 12 # fplod 2008-06-16T09:48:22Z aedon.locean-ipsl.upmc.fr (Darwin) 13 # add copy of documents 12 14 # fplod 2007-10-17T12:22:57Z aedon.locean-ipsl.upmc.fr (Darwin) 13 15 # parametrisation of number of "many" presentation … … 29 31 if [ ${#} -lt ${minargcount} ] 30 32 then 31 32 33 33 echo "eee : not enought arguments" 34 echo "${usage}" 35 exit 1 34 36 fi 35 37 # … … 78 80 if [ -d ${dirsrc}/images/ ] 79 81 then 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 87 fi 88 # 89 if [ -d ${dirsrc}/documents/ ] 90 then 91 mkdir -p ${dirwww}/documents/ 85 92 fi 86 93 # … … 90 97 if [ ${exist_php} -eq 0 ] 91 98 then 92 99 mkdir -p ${dirwww}/php/ 93 100 fi 94 101 # … … 98 105 if [ ${nmany} -gt 0 ] 99 106 then 100 101 102 103 104 105 106 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 107 114 fi 108 115 else … … 110 117 if [ ${nmany} -gt 0 ] 111 118 then 112 113 114 115 116 117 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 118 125 fi 119 126 fi … … 121 128 if [ ${exist_php} -eq 0 ] 122 129 then 123 124 125 126 130 for file_php in ${list_php} 131 do 132 cp ${file_php} ${dirwww}/php/ 133 done 127 134 fi 128 135 # 129 if [ -d ${dirsrc}/images ]136 if [ -d ${dirsrc}/images/ ] 130 137 then 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 143 fi 144 # 145 # copy of documents 146 if [ -d ${dirsrc}/documents/ ] 147 then 148 cp ${dirsrc}/documents/* ${dirwww}/documents/ 136 149 fi 137 150 # 138 151 # copy of CSS 139 ls *.css 1> /dev/null 2> /dev/null152 ls ${dirsrc}/*.css 1> /dev/null 2> /dev/null 140 153 exist_css=${?} 141 154 if [ ${exist_css} -eq 0 ] … … 145 158 if [ ${nmany} -gt 0 ] 146 159 then 147 160 cp ${dirsrc}/*.css ${dirwww}/${lang}/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 148 161 fi 149 162 # -
trunk/biblioentry_xml.xsl
r67 r74 62 62 <xsl:text>@inproceedings{</xsl:text> 63 63 </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> 64 70 <xsl:otherwise> 65 71 <xsl:message terminate="yes"> 66 eee : unknown biblioset relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>72 eee : unknown biblioset 1 relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 67 73 eee : <xsl:value-of select="$my_biblioentry/descendant::d:biblioset/@relation"/> 68 74 </xsl:message> … … 169 175 </xsl:when> 170 176 <xsl:otherwise> 171 <xsl:apply-templates select="$my_biblioentry/d:biblio misc" mode="raw"/>177 <xsl:apply-templates select="$my_biblioentry/d:biblioid" mode="raw"/> 172 178 </xsl:otherwise> 173 179 </xsl:choose> … … 225 231 </xsl:if> 226 232 </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> 227 295 <xsl:otherwise> 228 296 <xsl:message terminate="no"> 229 eee : unknown biblioset relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>297 eee : unknown biblioset 2 relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 230 298 eee : <xsl:value-of select="$my_biblioentry/descendant::d:biblioset/@relation"/> 231 299 </xsl:message> … … 455 523 </xsl:template> 456 524 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> 457 537 458 538 <xsl:template match="d:biblioid[@class='other']" mode="raw"> … … 511 591 </xsl:template> 512 592 593 513 594 <xsl:template match="d:conftitle"> 514 595 <xsl:text>, </xsl:text> … … 537 618 </xsl:template> 538 619 539 <xsl:template match="d:biblioid" >620 <xsl:template match="d:biblioid" mode="raw"> 540 621 <xsl:choose> 541 622 <xsl:when test="@class='doi'"> 542 <xsl:apply-templates select="." mode=" bibtex"/>623 <xsl:apply-templates select="." mode="raw"/> 543 624 </xsl:when> 544 625 <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"/> 546 630 </xsl:when> 547 631 <xsl:when test="@class='other'"> 548 <xsl:apply-templates select="." mode=" bibtex"/>632 <xsl:apply-templates select="." mode="raw"/> 549 633 </xsl:when> 550 634 <xsl:otherwise> … … 558 642 </xsl:template> 559 643 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"> 660 eee : unknown biblioid class for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> 661 eee : class : <xsl:value-of select="normalize-space(@class)"/> 662 eee : value : <xsl:value-of select="normalize-space(.)"/> 663 </xsl:message> 664 </xsl:otherwise> 665 </xsl:choose> 666 </xsl:template> 667 560 668 <xsl:template match="d:bibliomisc" mode="raw"> 561 669 <xsl:choose> -
trunk/bibopa.sh
r71 r74 117 117 # 118 118 # test if xsltproc is available 119 type xsltproc 1> /dev/null 2>&1 119 tool=xsltproc 120 type ${tool} 1> /dev/null 2>&1 120 121 status=${?} 121 122 if [ ${status} -ne 0 ] 122 123 then 123 echo " eee : xsltprocnot found"124 echo " eee : ${tool} not found" 124 125 exit 1 125 126 fi 126 127 unset status 128 unset tool 127 129 # 128 130 # test if xml is available 129 type xml 1> /dev/null 2>&1 131 tool=xml 132 type ${tool} 1> /dev/null 2>&1 130 133 status=${?} 131 134 if [ ${status} -ne 0 ] 132 135 then 133 echo " eee : xmlnot found"136 echo " eee : ${tool} not found" 134 137 exit 1 135 138 fi 136 139 unset status 140 unset tool 137 141 # 138 142 # test if python is available 139 type python 1> /dev/null 2>&1 143 tool=python 144 type ${tool} 1> /dev/null 2>&1 140 145 status=${?} 141 146 if [ ${status} -ne 0 ] 142 147 then 143 echo " eee : python not found}"148 echo " eee : ${tool} not found" 144 149 exit 1 145 150 fi 146 151 unset status 152 unset tool 147 153 # 148 154 usage=" Usage : ${command} -i filein -t type -o order -p project -l lang" … … 424 430 fileraw_strict=/tmp/$(basename ${fileraw})_strict 425 431 grep -v "^#" ${fileraw} | grep -v "^%" > ${fileraw_strict} 432 iconv -f ISO-8859-1 -t UTF-8 ${fileraw_strict} > ${fileraw_strict}2 433 mv ${fileraw_strict}2 ${fileraw_strict} 426 434 case ${type} in 427 435 bibtex) -
trunk/install.sh
r52 r74 9 9 # update : 10 10 # $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} 12 17 # fplod 2008-03-28T10:26:58Z aedon.locean-ipsl.upmc.fr (Darwin) 13 18 # new personnal webpages policy at LOCEAN so new command and new parameter (-u) … … 23 28 log=/tmp/${command}.${log_date} 24 29 # 25 usage=" Usage : ${command} -w dirwww -p dirpublish -u urlpublish "30 usage=" Usage : ${command} -w dirwww -p dirpublish -u urlpublish -l login" 26 31 # 27 32 minargcount=4 … … 29 34 if [ ${#} -lt ${minargcount} ] 30 35 then 31 32 33 36 echo "eee : not enought arguments" 37 echo "${usage}" 38 exit 1 34 39 fi 35 40 # … … 37 42 dirpublish="none" 38 43 urlpublish="none" 44 login="none" 39 45 # 40 46 while [ ! -z "${1}" ] … … 53 59 shift 54 60 ;; 61 -l ) 62 login=${2} 63 shift 64 ;; 55 65 esac 56 66 shift # next flag … … 63 73 answer=${1:-" "} 64 74 case ${answer} in 65 66 67 68 69 70 echo "Do you want to install on ${dirpublish}(y|[n]) ?"71 72 73 74 75 echo "Do you want to install on ${urlpublish}(y|[n]) ?"76 77 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 ;; 79 89 esac 80 90 # 81 91 case ${answer} in 82 92 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 105 119 ;; 106 120 *) 107 echo "no update of ${dirpublish} or ${urlpublish}"121 echo "no update of ${dirpublish} or ${urlpublish}" 108 122 ;; 109 123 esac
Note: See TracChangeset
for help on using the changeset viewer.