Changeset 250


Ignore:
Timestamp:
09/12/12 18:44:56 (12 years ago)
Author:
pinsard
Message:

produce a RTF file for each team during aeres period

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bibliolocean/src/genaeres.sh

    r242 r250  
    3434# 
    3535# $URL$ 
     36# 
     37# - fplod 20120912T124959Z cratos.locean-ipsl.upmc.fr (Linux) 
     38# 
     39#   * homogenize log message with command and LINENO 
     40#   * get info from aeres subset instead of the whole biblio (ie year limit) 
     41#   * produce a RTF file by team 
    3642# 
    3743# - fplod 20120706T101813Z cratos (Linux) 
     
    6369case "${system}" in 
    6470   AIX|IRIX64) 
    65       echo "${command} : www : no specific posix checking" 
     71      echo "${command} : ${LINENO} : www : no specific posix checking" 
    6672   ;; 
    6773   *) 
     
    8793if [ ${status} -ne 0 ] 
    8894then 
    89    echo "${command} : eee : ${tool} unavailable" >&2 
     95   echo "${command} : ${LINENO} : eee : ${tool} unavailable" >&2 
    9096   exit 1 
    9197fi 
     
    99105if [ ${status} -ne 0 ] 
    100106then 
    101    echo "${command} : eee : ${tool} unavailable" >&2 
     107   echo "${command} : ${LINENO} : eee : ${tool} unavailable" >&2 
    102108   exit 1 
    103109fi 
     
    193199   if [ ${jabref_status} -ne 0 ] 
    194200   then 
    195       echo "${command} : eee : pb with jabref export ${format}" 
     201      echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 
    196202      exit 1 
    197203   fi 
     
    204210while [ ${iteam} -le ${nbteam} ] 
    205211do 
    206     echo "${LINENO} : iii: team = ${list_team_bibtool[${iteam}]}" 
     212    echo "${command} : ${LINENO} : iii : team = ${list_team_bibtool[${iteam}]}" 
    207213    fteam=${tmpdir}/${list_team_title[${iteam}]}.bib 
    208214    rm ${fteam} 2> /dev/null 
    209     bibtool_command="bibtool -- 'select={aeresteam \"${list_team_bibtool[${iteam}]}\"}' ${biblioreffull} -o ${fteam}" 
     215    bibtool_command="bibtool -- 'select={aeresteam \"${list_team_bibtool[${iteam}]}\"}' ${biblioref} -o ${fteam}" 
    210216    eval ${bibtool_command} 
    211217    unset bibtool_command 
     
    213219    if [ ${nbatteam} -ge 2 ] 
    214220    then 
    215         echo "iii : $((${nbatteam} - 1)) ref for aeresteam ${list_team_title[${iteam}]}" 
     221        echo "${command} : ${LINENO} : iii : $((${nbatteam} - 1)) ref for aeresteam ${list_team_title[${iteam}]}" 
    216222        # generation one HTML file style ${format} 
    217223        format=locean_tablerefsabsbibsort 
     
    224230        if [ ${jabref_status} -ne 0 ] 
    225231        then 
    226            echo "${command} : eee : pb with jabref export ${format}" 
     232           echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 
     233           exit 1 
     234        fi 
     235        # generation one RTF file 
     236        ofteam=${dirwww}/$(basename ${fteam} .bib).rtf 
     237        rm ${ofteam} 2> /dev/null 
     238        jabref_rtf \ 
     239          ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
     240          ${fteam} ${ofteam} 
     241        jabref_status=${?} 
     242        if [ ${jabref_status} -ne 0 ] 
     243        then 
     244           echo "${command} : ${LINENO} : eee : pb with jabref rtf team" 
    227245           exit 1 
    228246        fi 
     
    231249        for iyear in ${list_year} 
    232250        do 
    233            echo "${LINENO} : iii: year = ${iyear}" 
     251           echo "${command} : ${LINENO} : iii : year = ${iyear}" 
    234252           fteamyear=${tmpdir}/$(basename ${fteam} .bib)_${iyear}.bib 
    235253           rm  ${fteamyear} 2> /dev/null 
     
    241259           if [ ${nbatteamyear} -ge 2 ] 
    242260           then 
    243                echo "iii : $((${nbatteamyear} - 1)) ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}" 
     261               echo "${command} : ${LINENO} : iii : $((${nbatteamyear} - 1)) ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}" 
    244262               list_fteamyear="${list_fteamyear} ${fteamyear}" 
    245263           else 
    246                echo "www : no ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}" 
     264               echo "${command} : ${LINENO} : www : no ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}" 
    247265           fi 
    248266           unset nbatteamyear 
     
    250268       unset iyear 
    251269    else 
    252        echo "www : no ref for aeresteam ${list_team_title[${iteam}]}" 
     270       echo "${command} : ${LINENO} : www : no ref for aeresteam ${list_team_title[${iteam}]}" 
    253271    fi 
    254272    unset nbatteam 
     
    269287for aerestype in ${list_aerestype} 
    270288do 
    271    echo "${LINENO} : iii: aerestype = ${aerestype}" 
     289   echo "${command} : ${LINENO} : iii : aerestype = ${aerestype}" 
    272290   for fteamyear in ${list_fteamyear} 
    273291   do 
    274       echo "${LINENO} : iii: fteamyear = ${fteamyear}" 
     292      echo "${command} : ${LINENO} : iii : fteamyear = ${fteamyear}" 
    275293      #++ add header 
    276294      fteamyeartype=${tmpdir}/$(basename ${fteamyear} .bib)_${aerestype}.bib 
     
    283301      if [ ${nbatteamyeartype} -ge 2 ] 
    284302      then 
    285           echo "iii : $((${nbatteamyeartype} - 1)) ref type ${aerestype} in ${fteamyear}" 
     303          echo "${command} : ${LINENO} : iii : $((${nbatteamyeartype} - 1)) ref type ${aerestype} in ${fteamyear}" 
    286304          ofteamyeartype=${dirwww}/$(basename ${fteamyeartype} .bib).rtf 
    287305          rm ${ofteamyeartype} 2> /dev/null 
     
    291309          # ++ test si ok 
    292310      else 
    293           echo "www : no ref type ${aerestype} in ${fteamyear}" 
     311          echo "${command} : ${LINENO} : www : no ref type ${aerestype} in ${fteamyear}" 
    294312      fi 
    295313      unset nbatteamyeartype 
     
    321339   if [ ${jabref_status} -ne 0 ] 
    322340   then 
    323       echo "${command} : eee : pb with jabref export ${format}" 
     341      echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 
    324342      exit 1 
    325343   fi 
    326344#++ else 
    327 #++ echo "${command} : iii : no reference for author ${team}" 
     345#++ echo "${command} : ${LINENO} : iii : no reference for author ${team}" 
    328346#++ fi 
    329347   iauthor=$(( ${iauthor} + 1 )) 
     
    334352fteam=${tmpdir}/phybiocar.bib 
    335353rm ${fteam} 2> /dev/null 
    336 bibtool_command="bibtool -- 'select={aeresteam \"phybiocar\"}' ${biblioreffull} -o ${fteam}" 
     354bibtool_command="bibtool -- 'select={aeresteam \"phybiocar\"}' ${biblioref} -o ${fteam}" 
    337355eval ${bibtool_command} 
    338356unset bibtool_command 
     
    340358if [ ${nbatteam} -ge 2 ] 
    341359then 
    342     echo "iii : $((${nbatteam} - 1)) ref for aeresteam phybiocar}" 
     360    echo "${command} : ${LINENO} : iii : $((${nbatteam} - 1)) ref for aeresteam phybiocar in ${biblioref}" 
    343361    # generation one HTML file style ${format} 
    344362    format=locean_tablerefsabsbibsort 
     
    351369    if [ ${jabref_status} -ne 0 ] 
    352370    then 
    353        echo "${command} : eee : pb with jabref export ${format}" 
     371       echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 
    354372       exit 1 
    355373    fi 
     
    359377    for theme in ${list_theme} 
    360378    do 
    361         echo "${LINENO} : iii: theme = ${theme}" 
     379        echo "${command} : ${LINENO} : iii : theme = ${theme}" 
    362380        fteamtheme=${tmpdir}/$(basename ${fteam} .bib)_${theme}.bib 
    363381        rm  ${fteamtheme} 2> /dev/null 
     
    369387        if [ ${nbatteamtheme} -ge 2 ] 
    370388        then 
    371                echo "iii : $((${nbatteamtheme} - 1)) ref for aeresteam phybiocar and theme ${theme}" 
     389               echo "${command} : ${LINENO} : iii : $((${nbatteamtheme} - 1)) ref for aeresteam phybiocar and theme ${theme} in ${fteam}" 
    372390               list_fteamtheme="${list_fteamtheme} ${fteamtheme}" 
    373391        else 
    374                echo "www : no ref for aeresteam phybiocar and theme ${theme}" 
     392               echo "${command} : ${LINENO} : www : no ref for aeresteam phybiocar and theme ${theme}" 
    375393        fi 
    376394        unset nbatteamtheme 
     
    380398        for iyear in ${list_year} 
    381399        do 
    382            echo "${LINENO} : iii: year = ${iyear}" 
     400           echo "${command} : ${LINENO} : iii : year = ${iyear}" 
    383401           fteamthemeyear=${tmpdir}/$(basename ${fteam} .bib)_${theme}_${iyear}.bib 
    384402           rm  ${fteamthemeyear} 2> /dev/null 
     
    390408           if [ ${nbatteamthemeyear} -ge 2 ] 
    391409           then 
    392                echo "iii : $((${nbatteamthemeyear} - 1)) ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 
     410               echo "${command} : ${LINENO} : iii : $((${nbatteamthemeyear} - 1)) ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 
    393411               list_fteamthemeyear="${list_fteamthemeyear} ${fteamthemeyear}" 
    394412           else 
    395                echo "www : no ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 
     413               echo "${command} : ${LINENO} : www : no ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 
    396414           fi 
    397            read a 
     415           #read a 
    398416           unset nbatteamthemeyear 
    399417       done # end of year loop 
     
    401419   unset iyear 
    402420else 
    403    echo "www : no ref for aeresteam phybiocar]}" 
     421   echo "${command} : ${LINENO} : www : no ref for aeresteam phybiocar]" 
    404422fi 
    405423unset list_year 
     
    414432for aerestype in ${list_aerestype} 
    415433do 
    416    echo "${LINENO} : iii: aerestype = ${aerestype}" 
     434   echo "${command} : ${LINENO} : iii : aerestype = ${aerestype}" 
    417435   for fteamthemeyear in ${list_fteamthemeyear} 
    418436   do 
    419       echo "${LINENO} : iii: fteamthemeyear = ${fteamthemeyear}" 
     437      echo "${command} : ${LINENO} : iii : fteamthemeyear = ${fteamthemeyear}" 
    420438      #++ add header 
    421439      fteamthemeyeartype=${tmpdir}/$(basename ${fteamthemeyear} .bib)_${aerestype}.bib 
     
    428446      if [ ${nbatteamthemeyeartype} -ge 2 ] 
    429447      then 
    430           echo "iii : $((${nbatteamthemeyeartype} - 1)) ref type ${aerestype} in ${fteamthemeyear}" 
     448          echo "${command} : ${LINENO} : iii : $((${nbatteamthemeyeartype} - 1)) ref type ${aerestype} in ${fteamthemeyear}" 
    431449          ofteamthemeyeartype=${dirwww}/$(basename ${fteamthemeyeartype} .bib).rtf 
    432450          rm ${ofteamthemeyeartype} 2> /dev/null 
     
    436454          # ++ test si ok 
    437455      else 
    438           echo "www : no ref type ${aerestype} in ${fteamthemeyear}" 
     456          echo "${command} : ${LINENO} : www : no ref type ${aerestype} in ${fteamthemeyear}" 
    439457      fi 
    440458      unset nbatteamthemeyeartype 
Note: See TracChangeset for help on using the changeset viewer.