Index: /branches/bibliolocean/src/checkaeres.sh
===================================================================
--- /branches/bibliolocean/src/checkaeres.sh	(revision 216)
+++ /branches/bibliolocean/src/checkaeres.sh	(revision 216)
@@ -0,0 +1,222 @@
+#! /bin/sh -x
+#+
+#
+# ===============
+# checkaeres.sh
+# ===============
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#   checkaeres.sh
+#
+# DESCRIPTION
+# ===========
+#
+# check for missing values in .bib for aeres 2007-2012
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#   checkaeres.sh
+#
+# SEE ALSO
+# ========
+#
+# genbib.sh
+#
+# genaeres.sh
+#
+# genaeres_rtf.sh
+#
+# TODO
+# ====
+#
+# FINIR de régdiger
+#
+# log
+#
+# phybiocar theme
+#
+# EVOLUTIONS
+# ==========
+#
+# - fplod 20120629T161209Z cratos (Linux)
+#
+#   * creation
+#
+#-
+set -u
+command=$(basename ${0})
+#
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo "${command} : www : no specific posix checking"
+   ;;
+   *)
+      set -o posix
+   ;;
+esac
+#
+usage=" Usage : ${command}"
+#
+# test if bibtool available
+tool=bibtool
+type ${tool} 1> /dev/null 2>&1
+status=${?}
+if [ ${status} -ne 0 ]
+then
+   echo "${command} : eee : ${tool} unavailable" >&2
+   exit 1
+fi
+unset tool
+unset status
+#
+# test if bib2bib available
+tool=bib2bib
+type ${tool} 1> /dev/null 2>&1
+status=${?}
+if [ ${status} -ne 0 ]
+then
+   echo "${command} : eee : ${tool} unavailable" >&2
+   exit 1
+fi
+unset tool
+unset status
+#
+#
+# default
+# n.a.
+#
+hostname=$(hostname)
+tmpdir=${PROJECT_LOG}/aeres2007_2012check/
+dirwww=${PROJECT_OD}/aeres2007_2012check/
+rm -rf ${tmpdir} 2> /dev/null
+mkdir -p ${tmpdir}
+rm -rf ${dirwww} 2> /dev/null
+mkdir -p ${dirwww}
+#
+. define_teams_aeres2007_2012.sh
+. define_phybiocar_theme.sh
+. jabref_rtf.sh
+. jabref_header.sh
+#
+# define bibliography reference file
+biblioref_orig=${PROJECT_ID}/biblioref.bib
+biblioreffull=${tmpdir}/all.bib
+cp ${biblioref_orig} ${biblioreffull}
+#
+# check for missing year
+nbmissingyear=0
+fbibmissingyear=${tmpdir}/missingyear.bib
+fcitemissingyear=${tmpdir}/missingyear_cite.bib
+rm ${tmpdir}/missingyear.bib 2> /dev/null
+bib2bib -c 'not exists year' \
+-ob ${fbibmissingyear} \
+-oc ${fcitemissingyear} \
+${biblioreffull} 
+more ${fcitemissingyear}
+echo ${missingyear}
+if [ -s ${fcitemissingyear} ]
+then 
+    echo " ${LINENO} : eee : some missing years in ${biblioreffull}"
+    echo " see ${fcitemissingyear}"
+    #++exit 1
+else
+    echo " ${LINENO} : iii : no missing year in ${biblioreffull}"
+    rm ${fcitemissingyear}
+fi
+unset missingyear
+rm ${fcitemissingyear}
+rm ${fbibmissingyear}
+#
+++++ la suite ...
+# check for missing aeresteam
+# check for missing aerestype
+# check for missing phybiocar theme 
+#
+    nbatteam=$(grep -c @ ${fteam})
+    if [ ${nbatteam} -ge 2 ]
+    then
+        echo "iii : $((${nbatteam} - 1)) ref for aeresteam ${list_team_title[${iteam}]}"
+        for iyear in ${list_year}
+        do
+           echo "${LINENO} : iii: year = ${iyear}"
+           fteamyear=${tmpdir}/$(basename ${fteam} .bib)_${iyear}.bib
+           rm  ${fteamyear} 2> /dev/null
+           bibtool_command="bibtool -- 'select={year \"${iyear}\"}' ${fteam} -o ${fteamyear}"
+           eval ${bibtool_command}
+	   unset bibtool_command
+           # test if empty
+           nbatteamyear=$(grep -c @ ${fteamyear})
+           if [ ${nbatteamyear} -ge 2 ]
+           then
+               echo "iii : $((${nbatteamyear} - 1)) ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}"
+               list_fteamyear="${list_fteamyear} ${fteamyear}"
+           else
+               echo "www : no ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}"
+           fi
+           unset nbatteamyear
+       done # end of year loop
+       unset iyear
+    else
+       echo "www : no ref for aeresteam ${list_team_title[${iteam}]}"
+    fi
+    unset nbatteam
+    unset nbatteamyear
+    iteam=$(( ${iteam} + 1 ))
+done # end of team loop
+unset iteam
+unset nbteam
+unset list_year
+unset fteam
+#
+echo "${LINENO}: iii: list_fteamyear = ${list_fteamyear}"
+#
+# define jabref header
+# ++ usefull
+jabref_header ${tmpdir}/header_jabref
+#
+# loop on aerestype
+list_aerestype="ACL ACLN ASCL BRE C-INV C-ACTI C-ATCN C-COM C-AFF DO OR OS PV PAT PT AP"
+for aerestype in ${list_aerestype}
+do
+   echo "${LINENO} : iii: aerestype = ${aerestype}"
+   for fteamyear in ${list_fteamyear}
+   do
+      echo "${LINENO} : iii: fteamyear = ${fteamyear}"
+      #++ add header
+      fteamyeartype=${tmpdir}/$(basename ${fteamyear} .bib)_${aerestype}.bib
+      rm ${fteamyeartype} 2> /dev/null
+      bibtool_command="bibtool -- 'select={aerestype \"${aerestype}\"}' ${fteamyear} -o ${fteamyeartype}"
+      eval ${bibtool_command}
+      unset bibtool_command
+      # test if empty
+      nbatteamyeartype=$(grep -c @ ${fteamyeartype})
+      if [ ${nbatteamyeartype} -ge 2 ]
+      then
+          echo "iii : $((${nbatteamyeartype} - 1)) ref type ${aerestype} in ${fteamyear}"
+          ofteamyeartype=${dirwww}/$(basename ${fteamyeartype} .bib).rtf
+          rm ${ofteamyeartype} 2> /dev/null
+          jabref_rtf \
+	  ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \
+	  ${fteamyeartype} ${ofteamyeartype}
+          # ++ test si ok
+      else
+          echo "www : no ref type ${aerestype} in ${fteamyear}"
+      fi
+      unset nbatteamyeartype
+   done # end of loop on fteamyear
+done # end of loop on aerestype
+#
+# clean
+#++rm ${biblioref} 2> /dev/null
+#++rm ${tmpdir}/header_jabref 2> /dev/null
+#
+# end
+exit 0
Index: /branches/bibliolocean/src/genaeres_rtf.sh
===================================================================
--- /branches/bibliolocean/src/genaeres_rtf.sh	(revision 215)
+++ /branches/bibliolocean/src/genaeres_rtf.sh	(revision 216)
@@ -103,5 +103,4 @@
 list_year="2007 2008 2009 2010 2011 2012"
 #
-# pour V.8.b 3- Articles de vulgarisation  (presse en général
 # loop on teams and years to build bibliography reference file
 list_fteamyear=""
