Changeset 242


Ignore:
Timestamp:
07/06/12 12:14:13 (12 years ago)
Author:
pinsard
Message:

handle phybiocar theme

Location:
branches/bibliolocean/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/bibliolocean/src/README.rst

    r238 r242  
    158158   avant de passer à la suite 
    159159 
    160 .. warning:: 
    161  
    162    Pour l'instant toutes les sélections ne sont pas faites, j'avance ... 
    163  
    164 :: 
    165  
    166160 genaeres.sh  
    167161 
    168162Les fichiers sont dans ${PROJECT_OD}/public_html/gtbiblio/aeres2007_2012/. 
    169  
    170  
    171  
  • branches/bibliolocean/src/genaeres.sh

    r238 r242  
    2626# integrer dans trunk superbib 
    2727# 
    28 # critere aeresteam vs loceanteam 
    29 # 
    30 # ++ phybiocar theme 
    31 # 
    3228# on ne voit pas les notes des unpublished dans le pdf plain 
    3329# 
     
    3834# 
    3935# $URL$ 
     36# 
     37# - fplod 20120706T101813Z cratos (Linux) 
     38# 
     39#   * add phybiocar theme (bouzin mais ça marche) 
    4040# 
    4141# - fplod 20120705T101524Z cratos (Linux) 
     
    128128bib2bib -oc ${bibliocite} -ob ${biblioref} \ 
    129129        -c 'year>=2007 and year<=2012' \ 
    130         ${biblioreffull} 
     130        ${biblioreffull} 
    131131# 
    132132# ++ usefull artificial header of jabref file to enforce encoding 
     
    227227           exit 1 
    228228        fi 
    229         # loop on years 
    230         list_year=$(seq 2007 2012) 
     229        # loop on years 
     230        list_year=$(seq 2007 2012) 
    231231        for iyear in ${list_year} 
    232232        do 
     
    236236           bibtool_command="bibtool -- 'select={year \"${iyear}\"}' ${fteam} -o ${fteamyear}" 
    237237           eval ${bibtool_command} 
    238            unset bibtool_command 
     238           unset bibtool_command 
    239239           # test if empty 
    240240           nbatteamyear=$(grep -c @ ${fteamyear}) 
     
    287287          rm ${ofteamyeartype} 2> /dev/null 
    288288          jabref_rtf \ 
    289           ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
    290           ${fteamyeartype} ${ofteamyeartype} 
     289          ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
     290          ${fteamyeartype} ${ofteamyeartype} 
    291291          # ++ test si ok 
    292292      else 
     
    331331echo "fin auteurs" 
    332332 
     333# phybiocar = team with theme 
     334fteam=${tmpdir}/phybiocar.bib 
     335rm ${fteam} 2> /dev/null 
     336bibtool_command="bibtool -- 'select={aeresteam \"phybiocar\"}' ${biblioreffull} -o ${fteam}" 
     337eval ${bibtool_command} 
     338unset bibtool_command 
     339nbatteam=$(grep -c @ ${fteam}) 
     340if [ ${nbatteam} -ge 2 ] 
     341then 
     342    echo "iii : $((${nbatteam} - 1)) ref for aeresteam phybiocar}" 
     343    # generation one HTML file style ${format} 
     344    format=locean_tablerefsabsbibsort 
     345    rm ${biblioref}.${format}.jabref.html 2> /dev/null 
     346        java -jar ${JABREF_DIR}/JabRef-${JABREF_VERSION}.jar -n true \ 
     347       -p ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
     348       --output ${dirwww}/${output_title}_phybiocar.${format}.jabref.html,${format} \ 
     349       ${fteam} 
     350    jabref_status=${?} 
     351    if [ ${jabref_status} -ne 0 ] 
     352    then 
     353       echo "${command} : eee : pb with jabref export ${format}" 
     354       exit 1 
     355    fi 
     356    # loop on themes 
     357    list_theme="1 2 3" 
     358    list_fteamtheme="" 
     359    for theme in ${list_theme} 
     360    do 
     361        echo "${LINENO} : iii: theme = ${theme}" 
     362        fteamtheme=${tmpdir}/$(basename ${fteam} .bib)_${theme}.bib 
     363        rm  ${fteamtheme} 2> /dev/null 
     364        bibtool_command="bibtool -- 'select={phybiocartheme \"${theme}\"}' ${fteam} -o ${fteamtheme}" 
     365        eval ${bibtool_command} 
     366        unset bibtool_command 
     367        # test if empty 
     368        nbatteamtheme=$(grep -c @ ${fteamtheme}) 
     369        if [ ${nbatteamtheme} -ge 2 ] 
     370        then 
     371               echo "iii : $((${nbatteamtheme} - 1)) ref for aeresteam phybiocar and theme ${theme}" 
     372               list_fteamtheme="${list_fteamtheme} ${fteamtheme}" 
     373        else 
     374               echo "www : no ref for aeresteam phybiocar and theme ${theme}" 
     375        fi 
     376        unset nbatteamtheme 
     377        # loop on years 
     378        list_fteamthemeyear="" 
     379        list_year=$(seq 2007 2012) 
     380        for iyear in ${list_year} 
     381        do 
     382           echo "${LINENO} : iii: year = ${iyear}" 
     383           fteamthemeyear=${tmpdir}/$(basename ${fteam} .bib)_${theme}_${iyear}.bib 
     384           rm  ${fteamthemeyear} 2> /dev/null 
     385           bibtool_command="bibtool -- 'select={year \"${iyear}\"}' ${fteamtheme} -o ${fteamthemeyear}" 
     386           eval ${bibtool_command} 
     387           unset bibtool_command 
     388           # test if empty 
     389           nbatteamthemeyear=$(grep -c @ ${fteamthemeyear}) 
     390           if [ ${nbatteamthemeyear} -ge 2 ] 
     391           then 
     392               echo "iii : $((${nbatteamthemeyear} - 1)) ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 
     393               list_fteamthemeyear="${list_fteamthemeyear} ${fteamthemeyear}" 
     394           else 
     395               echo "www : no ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 
     396           fi 
     397           read a 
     398           unset nbatteamthemeyear 
     399       done # end of year loop 
     400   done # end of them loop 
     401   unset iyear 
     402else 
     403   echo "www : no ref for aeresteam phybiocar]}" 
     404fi 
     405unset list_year 
     406unset fteam 
     407# 
     408# define jabref header 
     409# ++ usefull 
     410jabref_header ${tmpdir}/header_jabref 
     411# 
     412# loop on aerestype 
     413list_aerestype="ACL ACLN ASCL BRE C-INV C-ACTI C-ATCN C-COM C-AFF DO OR OS PV PAT PT AP" 
     414for aerestype in ${list_aerestype} 
     415do 
     416   echo "${LINENO} : iii: aerestype = ${aerestype}" 
     417   for fteamthemeyear in ${list_fteamthemeyear} 
     418   do 
     419      echo "${LINENO} : iii: fteamthemeyear = ${fteamthemeyear}" 
     420      #++ add header 
     421      fteamthemeyeartype=${tmpdir}/$(basename ${fteamthemeyear} .bib)_${aerestype}.bib 
     422      rm ${fteamthemeyeartype} 2> /dev/null 
     423      bibtool_command="bibtool -- 'select={aerestype \"${aerestype}\"}' ${fteamthemeyear} -o ${fteamthemeyeartype}" 
     424      eval ${bibtool_command} 
     425      unset bibtool_command 
     426      # test if empty 
     427      nbatteamthemeyeartype=$(grep -c @ ${fteamthemeyeartype}) 
     428      if [ ${nbatteamthemeyeartype} -ge 2 ] 
     429      then 
     430          echo "iii : $((${nbatteamthemeyeartype} - 1)) ref type ${aerestype} in ${fteamthemeyear}" 
     431          ofteamthemeyeartype=${dirwww}/$(basename ${fteamthemeyeartype} .bib).rtf 
     432          rm ${ofteamthemeyeartype} 2> /dev/null 
     433          jabref_rtf \ 
     434          ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
     435          ${fteamthemeyeartype} ${ofteamthemeyeartype} 
     436          # ++ test si ok 
     437      else 
     438          echo "www : no ref type ${aerestype} in ${fteamthemeyear}" 
     439      fi 
     440      unset nbatteamthemeyeartype 
     441   done # end of loop on fteamthemeyear 
     442done # end of loop on aerestype 
     443# 
    333444#++rm ${biblioref} 2> /dev/null 
    334445#++rm ${tmpdir}/header_jabref 2> /dev/null 
Note: See TracChangeset for help on using the changeset viewer.