Changeset 107 for trunk/bibopa.sh


Ignore:
Timestamp:
10/06/10 16:40:28 (14 years ago)
Author:
pinsard
Message:

bibopa.sh : bug fix, add journals, add bibtex production (draft)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bibopa.sh

    r103 r107  
    88# ========= 
    99# 
    10 # ------------------------------------------------- 
    11 # transform a bibliography file in DocBook 5 format 
    12 # ------------------------------------------------- 
     10# ----------------------------------------------------- 
     11# transform a bibliography file in XML/DocBook 5 format 
     12# ----------------------------------------------------- 
    1313# 
    1414# SYNOPSIS 
     
    1717# :: 
    1818# 
    19 #  $ bibopa.sh -i filein -t type -o order -p project -l lang 
     19#  $ bibopa.sh -i filein -ti typein -o order -p project -l lang -to typeout 
    2020# 
    2121# 
     
    102102# ======== 
    103103# 
    104 # To transform the NEMO bibliography file in raw format:: 
    105 # 
    106 #  $ ./bibopa.sh -p birefnemo -i data/biball.txt -t raw 
    107 # 
    108 # 
    109 # To transform a bibliography file in mailbody format:: 
    110 # 
    111 #  $ ./bibopa.sh -p bibrefnemo -i data/mail2007-05-10T09:01:56Z -t mailbody 
    112 # 
    113 # 
    114 # To transform a bibliography file in bibtex format in french:: 
    115 # 
    116 #  $ ./bibopa.sh -p polyfortran -i data/petitpolyfp.bib -t bibtex -l fr 
    117 # 
    118 # 
    119 # To transform the SUPERBIB demo bibliography file in raw format:: 
    120 # 
    121 #  $ ./bibopa.sh -p demo1 -i data/bibdemo1.txt -t raw -l fr 
     104# To transform the NEMO bibliography file written in raw format to XML/DocBook:: 
     105# 
     106#  $ ./bibopa.sh -p birefnemo -i data/biball.txt -ti raw 
     107# 
     108# 
     109# To transform a bibliography file written mailbody format to XML/DocBook:: 
     110# 
     111#  $ ./bibopa.sh -p bibrefnemo -i data/mail2007-05-10T09:01:56Z -ti mailbody 
     112# 
     113# 
     114# To transform a bibliography file written in bibtex format in french to XML/DocBook:: 
     115# 
     116#  $ ./bibopa.sh -p polyfortran -i data/petitpolyfp.bib -ti bibtex -l fr 
     117# 
     118# 
     119# To transform the SUPERBIB demo bibliography file written in raw format to XML/DocBook:: 
     120# 
     121#  $ ./bibopa.sh -p demo1 -i data/bibdemo1.txt -ti raw -l fr 
    122122# 
    123123# 
     
    139139# for portability issue but not found yet the "flat" fonctionnality in 
    140140# iconv 
     141# tips 20101006 : iconv: //TRANSLIT feature not documented cf. 
     142# http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html 
     143# not already used because non-standard usage 
    141144# 
    142145# write something in the logfile ! 
     
    146149# 
    147150# $Id$ 
     151# 
     152# - fplod 20101006T113902Z aedon.locean-ipsl.upmc.fr (Darwin) 
     153# 
     154#   * add "Remote Sensing Env." 
     155#   * add "Ocean Sciences" 
     156#   * add "Dynamics of Atmospheres and Oceans" 
     157#   * add "Comptes Rendus Geoscience" 
     158#   * add "Marine Pollution Bulletin" 
     159#   * add "Continental Shelf Research" 
     160#   * add ""Ocean Sci." 
     161#   * add "Environmental Fluid Mechanics" 
     162#   * add "Geochem. Geophys. Geosyst." 
     163#   * add "Journal of Applied Meteorology and Climatology" 
     164#   * add "Monthly Weather Review" 
     165#   * add "High Performance Computing on Vector Systems 2007" 
     166#   * add "High Performance Computing on Vector Systems 2006" 
     167#   * add "High Performance Computing in Science and Engineering '08" 
     168#   * add "Developments in Earth and Environmental Sciences" 
     169#   * add "Oceanography" 
     170# 
     171# - fplod 20101006T100532Z aedon.locean-ipsl.upmc.fr (Darwin) 
     172# 
     173#   * bug fix (missplaced EOF) 
     174#   * replace -t option by -ti 
     175#   * add -to (typeout) option (by default dbk) 
     176#   * add bibtex production 
    148177# 
    149178# - fplod 2009-03-13T09:35:42Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    329358unset tool 
    330359# 
    331 usage=" Usage : ${command} -i filein -t type -o order -p project -l lang" 
     360usage=" Usage : ${command} -i filein -ti typein -o order -p project -l lang -to typeout" 
    332361# 
    333362# default 
     
    335364# fs mean "firstname surname" 
    336365order="fs" 
     366typeout="dbk" 
    337367# 
    338368minargcount=6 
     
    354384         shift 
    355385      ;; 
    356       -t) 
    357          type=${2} 
     386      -ti) 
     387         typein=${2} 
     388         shift 
     389      ;; 
     390      -to) 
     391         typeout=${2} 
    358392         shift 
    359393      ;; 
     
    396430fi 
    397431# 
    398 case ${type} in 
     432case ${typeout} in 
     433   dbk) 
     434      fileou=$( basename ${filein} .txt).xml 
     435   ;; 
     436   bibtex) 
     437      fileou=$( basename ${filein} .txt).bib 
     438   ;; 
     439   *) 
     440      echo "eee : typeout should be dbk or bibtex" 
     441      exit 1 
     442   ;; 
     443esac 
     444# 
     445# check for output 
     446case ${typein} in 
    399447   raw) 
    400448      # file like data/biball.txt 
    401449      fileraw=${filein} 
    402       fileou=$( basename ${filein} .txt).xml 
    403450   ;; 
    404451   mailbody) 
    405452      # file like data/mail2007-04-25T08:58:16Z.txt 
    406453      fileraw=/tmp/$(basename ${filein}).raw 
    407       fileou=$( basename ${filein} .txt).xml 
    408454      echo "# from ${filein}" > ${fileraw} 
    409455      echo "# ${log_date}" >> ${fileraw} 
     
    420466      fileraw=/tmp/$(basename ${filein}).raw 
    421467      awk -f join_endcomma.awk ${filein} > ${fileraw} 
    422       fileou=$( basename ${filein} .bib).xml 
    423468   ;; 
    424469   *) 
    425       echo "eee : type should be raw, mailbody or bibtex" 
     470      echo "eee : typein should be raw, mailbody or bibtex" 
    426471      exit 1 
    427472   ;; 
     
    458503jlist[${ij}]="Climate Dynamics" 
    459504ij=$(( ${ij} + 1)) 
     505jlist[${ij}]="Dynamics of Atmospheres and Oceans" 
     506ij=$(( ${ij} + 1)) 
    460507jlist[${ij}]="Dyn. Atmos. Oceans" 
    461508ij=$(( ${ij} + 1)) 
    462509jlist[${ij}]="Mon. Wea. Rev." 
    463510ij=$(( ${ij} + 1)) 
     511jlist[$ij]="Monthly Weather Review" 
     512ij=$(( ${ij} + 1)) 
    464513jlist[${ij}]="Global Biogeochem. Cycles" 
    465514ij=$(( ${ij} + 1)) 
    466515jlist[${ij}]="Nonlinear Processes in Geophysics" 
    467516ij=$(( ${ij} + 1)) 
     517jlist[${ij}]="Ocean Sci." 
     518ij=$(( ${ij} + 1)) 
    468519jlist[${ij}]="Ocean Science" 
    469520ij=$(( ${ij} + 1)) 
     521jlist[${ij}]="Ocean Sciences" 
     522ij=$(( ${ij} + 1)) 
    470523jlist[${ij}]="J. Mar. Systems" 
    471524ij=$(( ${ij} + 1)) 
     
    586639jlist[${ij}]="Developments in Paleoenvironmental Research" 
    587640ij=$(( ${ij} + 1)) 
     641jlist[${ij}]=" Developments in Earth and Environmental Sciences" 
     642ij=$(( ${ij} + 1)) 
    588643jlist[${ij}]="Science" 
    589644ij=$(( ${ij} + 1)) 
     
    612667jlist[${ij}]="Remote Sensing of Environment" 
    613668ij=$(( ${ij} + 1)) 
     669jlist[${ij}]="Remote Sensing Env." 
     670ij=$(( ${ij} + 1)) 
    614671jlist[${ij}]="Oceanology" 
    615672ij=$(( ${ij} + 1)) 
     
    654711jlist[$ij]="High Performance Computing in Science and Engineering" 
    655712ij=$(( ${ij} + 1)) 
     713jlist[$ij]="High Performance Computing in Science and Engineering '08" 
     714ij=$(( ${ij} + 1)) 
     715jlist[$ij]="High Performance Computing on Vector Systems 2006" 
     716ij=$(( ${ij} + 1)) 
     717jlist[$ij]="High Performance Computing on Vector Systems 2007" 
     718ij=$(( ${ij} + 1)) 
    656719jlist[$ij]="Annals of Glaciology" 
    657720ij=$(( ${ij} + 1)) 
     721jlist[$ij]="Oceanography" 
     722ij=$(( ${ij} + 1)) 
    658723jlist[$ij]="Journal of Physical Oceanography" 
     724ij=$(( ${ij} + 1)) 
     725jlist[$ij]="In Deep convection and deep water formation in the oceans" 
     726ij=$(( ${ij} + 1)) 
     727jlist[$ij]="Journal of Applied Meteorology and Climatology" 
     728ij=$(( ${ij} + 1)) 
     729jlist[$ij]="Geochem. Geophys. Geosyst." 
     730ij=$(( ${ij} + 1)) 
     731jlist[$ij]="Environmental Fluid Mechanics" 
     732ij=$(( ${ij} + 1)) 
     733jlist[$ij]="Continental Shelf Research" 
     734ij=$(( ${ij} + 1)) 
     735jlist[$ij]="Marine Pollution Bulletin" 
     736ij=$(( ${ij} + 1)) 
     737jlist[$ij]="Comptes Rendus Geosciences" 
    659738ij=$(( ${ij} + 1)) 
    660739jlist[$ij]="??" 
     
    689768# iconv -f ISO-8859-1 -t UTF-8 ${fileraw_strict} > ${fileraw_strict}2 
    690769# mv ${fileraw_strict}2 ${fileraw_strict} 
    691 case ${type} in 
     770case ${typein} in 
    692771   bibtex) 
    693772      fileou_bibtexml=/tmp/$(basename ${fileraw})_bibtexml 
     
    704783   ;; 
    705784   *) 
    706       cat <<EOF > ${fileou} 
     785      case ${typeout} in 
     786         dbk) 
     787            cat <<EOF > ${fileou} 
    707788<?xml version='1.0' encoding='ISO-8859-1'?> 
    708789<bibliography 
     
    716797</info> 
    717798EOF 
     799         ;; 
     800         bibtex) 
     801            cat <<EOF > ${fileou} 
     802 
     803@PREAMBLE{"bibliography of ${project}"}" 
     804 
     805% ${log_date} 
     806 
     807EOF 
     808         ;; 
     809      esac 
    718810      totlines=$( wc -l ${fileraw_strict} | awk '{print $1}' ) 
    719811      l=1 
    720       while [ ${l} -le ${totlines}  ] 
     812      while [ ${l} -le ${totlines} ] 
    721813      do 
     814#echo "line: $l" 
    722815         # extract one line 
    723816         line=$( sed -n ${l}p ${fileraw_strict} ) 
     
    750843         # echo "firstsn_flat : ${firstsn_flat}" #++ debug 
    751844         # test if no encoding problem after ISO-8859-15 to flat conversion 
    752          firstsn_test1=$(echo "${firstsn_flat}" | tr -d "[:alpha:]" | tr -d " " | tr -d "'" | tr -d "-") 
    753          #echo "firstsn_test1 : ${firstsn_test1}" # ++ debug 
     845         firstsn_test1=$(echo "${firstsn_flat}" | tr -d "[:alpha:]" | tr -d " " | tr -d "'" | tr -d "-" | tr -d ".") 
     846         # echo "firstsn_test1 : ${firstsn_test1}" # ++ debug 
    754847         if [ ! -z "${firstsn_test1}" ] 
    755848         then 
     
    774867         unset firstsn_test1 
    775868         unset firstsn_test2 
    776          num=$( grep -c "<biblioentry xml:id=\"${refid}_[0-9][0-9]\">" ${fileou} ) 
     869         # look for id of biblio entry to produce a unique one 
     870         case ${typeout} in 
     871            dbk) 
     872               num=$( grep -c "<biblioentry xml:id=\"${refid}_[0-9][0-9]\">" ${fileou} ) 
     873            ;; 
     874            bibtex) 
     875               num=$( grep -c "@.*{${refid}_[0-9][0-9]," ${fileou} ) 
     876            ;; 
     877         esac 
    777878         num=$(( ${num} + 1 )) 
    778879         [ ${num} -le 9 ] && num=0${num} 
    779880         refid=${refid}_${num} 
    780881         hasauthor=1 
    781  
    782          cat <<EOF >> ${fileou} 
     882         case ${typeout} in 
     883            dbk) 
     884               cat <<EOF >> ${fileou} 
    783885<biblioentry xml:id="${refid}"> 
    784   <!-- date 
    785   $( date -u +"%Y%m%dT%H%M%SZ" ) 
    786   --> 
     886  <!-- date $( date -u +"%Y%m%dT%H%M%SZ" ) --> 
    787887  <!-- original text 
    788888  ${orgline} 
    789889  --> 
    790890EOF 
     891            ;; 
     892            bibtex) 
     893               cat <<EOF >> ${fileou} 
     894% 
     895% date $( date -u +"%Y%m%dT%H%M%SZ" ) 
     896% original text : 
     897% ${orgline} 
     898% 
     899@article{${refid}, 
     900EOF 
     901            ;; 
     902         esac 
    791903         if [ ${hasauthor} -eq 1 ] 
    792904         then 
    793             cat <<EOF >> ${fileou} 
     905            case ${typeout} in 
     906               dbk) 
     907                  cat <<EOF >> ${fileou} 
    794908  <authorgroup> 
    795909    <author> <personname> <surname>${firstsn}</surname> <firstname>${firstfn}</firstname> </personname> </author> 
    796910EOF 
     911               ;; 
     912               bibtex) 
     913                  cat <<EOF >> ${fileou} 
     914author = {${firstsn}, ${firstfn}}, 
     915EOF 
     916               ;; 
     917           esac 
    797918 
    798919            ## other authors.. 
     
    842963               fi 
    843964    # 
    844                echo "    <author> <personname> <surname>${nextsn}</surname> <firstname>${nextfn}</firstname> </personname> </author>" >> ${fileou} 
    845                #echo "    <author> <personname> <surname>${nextsn}</surname> <firstname>${nextfn}</firstname> </personname> </author>"  #++debug 
     965               case ${typeout} in 
     966                  dbk) 
     967                     echo "    <author> <personname> <surname>${nextsn}</surname> <firstname>${nextfn}</firstname> </personname> </author>" >> ${fileou} 
     968                  ;; 
     969                  bibtex) 
     970                     echo "author = {${nextsn}, ${nextfn}}," >> ${fileou} 
     971                  ;; 
     972               esac 
    846973               if [ ${bibtex} -eq 0 ] 
    847974               then 
     
    855982               fi 
    856983            done 
    857             echo "  </authorgroup>"  >> ${fileou} 
     984            case ${typeout} in 
     985               dbk) 
     986                  echo "  </authorgroup>"  >> ${fileou} 
     987               ;; 
     988            esac 
    858989         fi 
    859990         # end of the line ; after the first : 
     
    8791010            #+++ following lines are not yet validate 
    8801011            # it might be a book, a manual, a conference, etc. ++ 
    881             echo "  <title>${title}</title>" >> ${fileou} 
    882             cat <<EOF >> ${fileou} 
     1012            case ${typeout} in 
     1013               dbk) 
     1014                  echo "  <title>${title}</title>" >> ${fileou} 
     1015                  cat <<EOF >> ${fileou} 
    8831016  <biblioset relation="nojournal"> 
    8841017    <title>${title}</title> 
     
    8861019    <pubdate>${year}</pubdate> 
    8871020  </biblioset> 
     1021</biblioentry> 
    8881022EOF 
    889             cat <<EOF >> ${fileou} 
    890 </biblioentry> 
    891  
    892 EOF 
     1023               ;; 
     1024               bibtex) 
     1025                  echo "title = {${title}}," >> ${fileou} 
     1026                  echo "pages = {${pag}}," >> ${fileou} 
     1027                  echo "year = {${year}}" >> ${fileou} 
     1028                  echo "}" >> ${fileou} 
     1029               ;; 
     1030            esac 
    8931031            # end of if jfound empty (ie not an article) 
    8941032         fi 
     
    8991037            title=${endline%%${jfound}*} 
    9001038            title=$( cleanname "${title}" ) 
    901             echo "  <title>${title}</title>" >> ${fileou} 
     1039            case ${typeout} in 
     1040               dbk) 
     1041                  echo "  <title>${title}</title>" >> ${fileou} 
     1042               ;; 
     1043               bibtex) 
     1044                  echo "title = {${title}}," >> ${fileou} 
     1045            esac 
    9021046            ## end 
    9031047            ## end of the line ; after the first ${jfound} 
     
    9121056               doi=${endline##*doi:} 
    9131057               #echo "doi : $doi" 
    914                echo "  <biblioid class=\"doi\">${doi}</biblioid>" >> ${fileou} 
     1058               case ${typeout} in 
     1059                  dbk) 
     1060                     echo "  <biblioid class=\"doi\">${doi}</biblioid>" >> ${fileou} 
     1061                  ;; 
     1062                  bibtex) 
     1063                     echo "doi={${doi}}," >> ${fileou} 
     1064                  ;; 
     1065               esac 
    9151066               unset doi 
    9161067               endline=${endline%doi:*} 
     
    9241075               0) 
    9251076                  ## echo ${num}: ${endline} 
    926                   cat <<EOF >> ${fileou} 
     1077                  case ${typeout} in 
     1078                     dbk) 
     1079                        cat <<EOF >> ${fileou} 
    9271080  <biblioset relation="journal"> 
    9281081    <title>${jfound}</title> 
     
    9311084  </biblioset> 
    9321085EOF 
     1086                      ;; 
     1087                      bibtex) 
     1088                        cat <<EOF >> ${fileou} 
     1089journal = {${jfound}}, 
     1090year = {${year}}, 
     1091notes = {${endline}}, 
     1092EOF 
     1093                      ;; 
     1094                 esac 
     1095         
    9331096                  unset jfound 
    9341097                  unset year 
     
    9401103                  pag=${endline##*,} 
    9411104                  pag=$( cleanname "${pag}" ) 
    942                   cat <<EOF >> ${fileou} 
     1105                  case ${typeout} in 
     1106                     dbk) 
     1107                        cat <<EOF >> ${fileou} 
    9431108  <biblioset relation="journal"> 
    9441109    <title>${jfound}</title> 
     
    9471112  </biblioset> 
    9481113EOF 
     1114                     ;; 
     1115                     bibtex) 
     1116                        echo "journal = {${jfound}}," >> ${fileou} 
     1117                        echo "volume = {${vol}}," >> ${fileou} 
     1118                        echo "pages = {${pag}}," >> ${fileou} 
     1119                        echo "year = {${year}}," >> ${fileou} 
     1120                     ;; 
     1121                  esac 
     1122               ;; 
     1123               bibtex) 
    9491124                  unset vol 
    9501125                  unset pag 
     
    9611136                  pag=${endline##*,} 
    9621137                  pag=$( cleanname "${pag}" ) 
    963                   cat <<EOF >> ${fileou} 
     1138                  case ${typeout} in 
     1139                     dbk) 
     1140                        cat <<EOF >> ${fileou} 
    9641141  <biblioset relation="journal"> 
    9651142    <title>${jfound}</title> 
     
    9671144    <pubdate>${year}</pubdate> 
    9681145  </biblioset> 
    969                   EOF 
     1146EOF 
     1147                     ;; 
     1148                     bibtex) 
     1149                        echo "journal = {${jfound}}," >> ${fileou} 
     1150                        echo "volume = {${vol}}," >> ${fileou} 
     1151                        echo "number = {${iss}}," >> ${fileou} 
     1152                        echo "pages = {${pag}}," >> ${fileou} 
     1153                        echo "year = {${year}}," >> ${fileou} 
     1154                     ;; 
     1155                  esac 
    9701156                  unset vol 
    9711157                  unset pag 
     
    9981184                  #set 
    9991185                  #read a 
    1000                   cat <<EOF >> ${fileou} 
     1186                  case ${typeout} in 
     1187                     dbk) 
     1188                        cat <<EOF >> ${fileou} 
    10011189<biblioset relation="conference"> 
    10021190 <title>${jfound}</title> 
     
    10111199</biblioset> 
    10121200EOF 
     1201                     ;; 
     1202                     bibtex) 
     1203                        echo "journal = {${jfound}}," >> ${fileou} 
     1204                        echo "year = {${year}}," >> ${fileou} 
     1205                        echo "publisher = {${publishername}}," >> ${fileou} 
     1206                        echo "booktitle = {${conftitle}}," >> ${fileou} 
     1207                        echo "date = {${confdates}}," >> ${fileou} 
     1208                        echo "address = {${confaddress}}," >> ${fileou} 
     1209                     ;; 
     1210                  esac 
    10131211                  unset confaddress 
    10141212                  unset conftitle 
     
    10401238                  endline=$( cleanname "${endline}" ) 
    10411239                  endline=$( cleanname "${endline}" ) 
    1042                   cat <<EOF >> ${fileou} 
     1240                  case ${typeout} in 
     1241                     dbk) 
     1242                        cat <<EOF >> ${fileou} 
    10431243  <biblioid class="isbn">${isbn}</biblioid> 
    10441244  <biblioid class="other" otherclass="AGU">${agu}</biblioid> 
     
    10511251    <bibliomisc>${endline}</bibliomisc> 
    10521252  </biblioset> 
    1053                   EOF 
     1253EOF 
     1254                     ;; 
     1255                     bibtex) 
     1256                        echo "isbn= {${isbn}}," >> ${fileou} 
     1257                        echo "agu= {${agu}}," >> ${fileou} 
     1258                        echo "year = {${year}}," >> ${fileou} 
     1259                        echo "journal = {${jfound}}," >> ${fileou} 
     1260                        echo "publisher = {${publishername}}," >> ${fileou} 
     1261                        echo "volume = {${vol}}," >> ${fileou} 
     1262                        echo "pages = {${pag}}," >> ${fileou} 
     1263                        echo "notes = {${endline}}," >> ${fileou} 
     1264                     ;; 
     1265                  esac 
    10541266                  unset isbn 
    10551267                  unset agu 
     
    10641276                  #set # ++ debug 
    10651277                  #exit 1 #++ debug 
    1066                   cat <<EOF >> ${fileou} 
     1278                  case ${typeout} in 
     1279                     dbk) 
     1280                        cat <<EOF >> ${fileou} 
    10671281  <biblioset relation="journal"> 
    10681282    <title>${jfound}</title> 
     
    10701284    <bibliomisc>${endline}</bibliomisc> 
    10711285  </biblioset> 
    1072                   EOF 
     1286EOF 
     1287                     ;; 
     1288                     bibtex) 
     1289                        echo "journal = {${jfound}}," >> ${fileou} 
     1290                        echo "year = {${year}}," >> ${fileou} 
     1291                        echo "notes = {${endline}}," >> ${fileou} 
     1292                     ;; 
     1293                  esac 
    10731294               ;; 
    10741295            esac 
    1075  
    1076             cat <<EOF >> ${fileou} 
    1077 </biblioentry> 
    1078  
    1079 EOF 
     1296            case ${typeout} in 
     1297               dbk) 
     1298                  echo "</biblioentry>" >> ${fileou} 
     1299               ;; 
     1300               bibtex) 
     1301                  echo "}" >> ${fileou} 
     1302               ;; 
     1303            esac 
    10801304            # end of if jfound not empty 
    10811305         fi 
     
    10881312      unset totlines 
    10891313      unset l 
    1090       echo "</bibliography>" >> ${fileou} 
     1314      case ${typeout} in 
     1315         dbk) 
     1316            echo "</bibliography>" >> ${fileou} 
     1317         ;; 
     1318      esac 
    10911319   ;; 
    10921320# end of case bibtex vs other for processing 
    10931321esac 
    10941322 
    1095 xml val --err \ 
    1096    --xsd http://www.docbook.org/xml/5.0/xsd/docbook.xsd \ 
    1097    ${fileou} 1> xmlstarlet.log 2>&1 
    1098 # 
    1099 # clean 
    1100 echo "iii : xslstarlet.log contains sdtout and stderr from xml command on ${fileou}" 
    1101 echo "iii : which was done just to check consistence of ${fileou}" 
    1102 more xmlstarlet.log 
    1103 # 
    1104 case ${type} in 
     1323# check conformity of fileou 
     1324# if possible 
     1325case ${typeout} in 
     1326   dbk) 
     1327      xml val --err \ 
     1328         --xsd http://www.docbook.org/xml/5.0/xsd/docbook.xsd \ 
     1329         ${fileou} 1> xmlstarlet.log 2>&1 
     1330      # 
     1331      # clean 
     1332      echo "iii : xmlstarlet.log contains sdtout and stderr from xml command on ${fileou}" 
     1333      echo "iii : which was done just to check consistence of ${fileou}" 
     1334      more xmlstarlet.log 
     1335      # 
     1336   ;; 
     1337   bibtex) 
     1338      echo "iii : no check conformity of bibtex file" 
     1339   ;; 
     1340esac 
     1341# 
     1342case ${typein} in 
    11051343   raw) 
    11061344      echo "iii : ${fileraw_strict} contains a copy of input file without comments" 
Note: See TracChangeset for help on using the changeset viewer.