Changeset 216


Ignore:
Timestamp:
06/29/12 19:56:12 (12 years ago)
Author:
pinsard
Message:

add check tool (to be cont.)

Location:
branches/bibliolocean/src
Files:
1 edited
1 copied

Legend:

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

    r215 r216  
    1 #! /bin/sh 
     1#! /bin/sh -x 
    22#+ 
    33# 
    44# =============== 
    5 # genaeres_rtf.sh 
     5# checkaeres.sh 
    66# =============== 
    77# 
     
    1111# :: 
    1212# 
    13 #   genaeres_rtf.sh 
     13#   checkaeres.sh 
    1414# 
    1515# DESCRIPTION 
    1616# =========== 
    1717# 
    18 # aeres 2007-2012 pour inclusion dans document word 
     18# check for missing values in .bib for aeres 2007-2012 
    1919# 
    2020# EXAMPLES 
     
    2323# :: 
    2424# 
    25 #   genaeres_rtf.sh 
     25#   checkaeres.sh 
    2626# 
    2727# SEE ALSO 
     
    3232# genaeres.sh 
    3333# 
     34# genaeres_rtf.sh 
     35# 
    3436# TODO 
    3537# ==== 
    3638# 
     39# FINIR de régdiger 
     40# 
    3741# log 
    3842# 
    3943# phybiocar theme 
    40 # 
    41 # look for missing values (aerestype and aeresteam) 
    4244# 
    4345# EVOLUTIONS 
    4446# ========== 
    4547# 
    46 # - fplod 20120629T154955Z cratos (Linux) 
    47 # 
    48 #   * reorganize to deal all aeres type 
    49 # 
    50 # - fplod 20120628T101424Z cratos (Linux) 
     48# - fplod 20120629T161209Z cratos (Linux) 
    5149# 
    5250#   * creation 
     
    8078unset status 
    8179# 
     80# test if bib2bib available 
     81tool=bib2bib 
     82type ${tool} 1> /dev/null 2>&1 
     83status=${?} 
     84if [ ${status} -ne 0 ] 
     85then 
     86   echo "${command} : eee : ${tool} unavailable" >&2 
     87   exit 1 
     88fi 
     89unset tool 
     90unset status 
     91# 
     92# 
    8293# default 
    8394# n.a. 
    8495# 
    8596hostname=$(hostname) 
    86 tmpdir=${PROJECT_LOG}/aeres2007_2012rtf/ 
    87 dirwww=${PROJECT_OD}/aeres2007_2012rtf/ 
     97tmpdir=${PROJECT_LOG}/aeres2007_2012check/ 
     98dirwww=${PROJECT_OD}/aeres2007_2012check/ 
    8899rm -rf ${tmpdir} 2> /dev/null 
    89100mkdir -p ${tmpdir} 
     
    101112cp ${biblioref_orig} ${biblioreffull} 
    102113# 
    103 list_year="2007 2008 2009 2010 2011 2012" 
    104 # 
    105 # pour V.8.b 3- Articles de vulgarisation  (presse en général 
    106 # loop on teams and years to build bibliography reference file 
    107 list_fteamyear="" 
    108 iteam=1 
    109 nbteam=${#list_team_bibtool[@]} 
    110 while [ ${iteam} -le ${nbteam} ] 
    111 do 
    112     echo "${LINENO} : iii: team = ${list_team_bibtool[${iteam}]}" 
    113     fteam=${tmpdir}/${list_team_title[${iteam}]}.bib 
    114     rm ${fteam} 2> /dev/null 
    115     bibtool_command="bibtool -- 'select={aeresteam \"${list_team_bibtool[${iteam}]}\"}' ${biblioreffull} -o ${fteam}" 
    116     eval ${bibtool_command} 
    117     unset bibtool_command 
     114# check for missing year 
     115nbmissingyear=0 
     116fbibmissingyear=${tmpdir}/missingyear.bib 
     117fcitemissingyear=${tmpdir}/missingyear_cite.bib 
     118rm ${tmpdir}/missingyear.bib 2> /dev/null 
     119bib2bib -c 'not exists year' \ 
     120-ob ${fbibmissingyear} \ 
     121-oc ${fcitemissingyear} \ 
     122${biblioreffull}  
     123more ${fcitemissingyear} 
     124echo ${missingyear} 
     125if [ -s ${fcitemissingyear} ] 
     126then  
     127    echo " ${LINENO} : eee : some missing years in ${biblioreffull}" 
     128    echo " see ${fcitemissingyear}" 
     129    #++exit 1 
     130else 
     131    echo " ${LINENO} : iii : no missing year in ${biblioreffull}" 
     132    rm ${fcitemissingyear} 
     133fi 
     134unset missingyear 
     135rm ${fcitemissingyear} 
     136rm ${fbibmissingyear} 
     137# 
     138++++ la suite ... 
     139# check for missing aeresteam 
     140# check for missing aerestype 
     141# check for missing phybiocar theme  
     142# 
    118143    nbatteam=$(grep -c @ ${fteam}) 
    119144    if [ ${nbatteam} -ge 2 ] 
  • branches/bibliolocean/src/genaeres_rtf.sh

    r215 r216  
    103103list_year="2007 2008 2009 2010 2011 2012" 
    104104# 
    105 # pour V.8.b 3- Articles de vulgarisation  (presse en général 
    106105# loop on teams and years to build bibliography reference file 
    107106list_fteamyear="" 
Note: See TracChangeset for help on using the changeset viewer.