Ignore:
Timestamp:
04/08/14 10:27:39 (10 years ago)
Author:
pinsard
Message:

fix thanks to coding rules; typo

File:
1 edited

Legend:

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

    r274 r354  
    99# ======== 
    1010# 
    11 # ``./genprehal.sh`` 
     11# .. code-block:: bash 
     12# 
     13#    ./genprehal.sh`` 
    1214# 
    1315# DESCRIPTION 
     
    1618# prehal ++ 
    1719# 
     20# en fait j'ai renoncé à générer un XML parce que l'import massif de HAL 
     21# me ... (censuré) 
     22# 
     23# mais avec la commande suivante, on peut facilement avec 
     24# http://adsabs.harvard.edu/bib_abs.html, demander une série de code ads 
     25# qui sont utilisables dans le phase "depot" manuelle de HAL: 
     26# 
     27# .. code-block:: bash 
     28# 
     29#    grep doi /usr/work/incas/fplod/log//gtbiblio/prehal//missinghalidfull.bib | sed -e "s/doi *= *{//" -e "s/}.*$//" 
     30# 
    1831# SEE ALSO 
    1932# ======== 
     
    2639# ==== 
    2740# 
    28 # make it work : now xml produced by jabref are not ok. 
    29 # see prehal*.layout 
    30 # 
    31 # integrer dans trunk superbib 
     41# make it work : now xml produced by jabref are not ok and will never be 
     42# 
     43# HAL announce some bibtex importation facilities in a new release ... 
     44# let see what should be done for affiliation issue 
    3245# 
    3346# EVOLUTIONS 
     
    4154# 
    4255#   * ajout de la production d'un pdf pour pouvoir faire des copier/coller 
    43 #     parce que l'importaion massive trop pénible vue la mauvaise volonte  
    44 #     de HAL (plus de XSD facilement accessible, doc pas  à jour etc.) 
     56#     parce que l'importation massive trop pénible vue la mauvaise volonté 
     57#     de HAL (plus de XSD facilement accessible, doc pas à jour etc.) 
    4558# 
    4659# - fplod 20121108T124317Z cratos.locean-ipsl.upmc.fr (Linux) 
    4760# 
    48 # * creation par externalisation de la fonctionnalité (pas fini) dans genbib 
     61# * creation par externalisation de la fonctionnalité (pas fini) dans genbib 
    4962# 
    5063#- 
     
    5568case "${system}" in 
    5669    AIX|IRIX64) 
    57        echo "${command} : ${LINENO} : www : no specific posix checking" 
     70        echo "${command} : ${LINENO} : www : no specific posix checking" 
    5871    ;; 
    5972    *) 
    60        set -o posix 
     73        set -o posix 
    6174    ;; 
    6275esac 
     
    89102mkdir -p ${tmpdir} 
    90103# 
    91 # usefull artificial header of jabref file to enforce encoding 
     104# useful artificial header of jabref file to enforce encoding 
    92105jabref_header ${tmpdir}/header_jabref 
    93106# 
     
    138151    #++rm ${fbibmissinghalidfull}.${style}.tex 2> /dev/null 
    139152    echo "fin 1re passe latex" 
    140     # genereation rtf 
     153    # génération rtf 
    141154    jabref_rtf ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
    142155    ${fbibmissinghalidfull} toto.rtf 
     
    146159    if [ ${nltot} -gt ${nlmax} ] 
    147160    then 
    148        echo "${LINENO} : iii : more than ${nlmax} missing hal_id in ${biblioreffull}" 
    149        echo "${LINENO} : iii : need to split" 
    150        dsuffixsplit=$(dirname ${fcitemissinghalidfull}) 
    151        bsuffixsplit=$(basename ${fcitemissinghalidfull} .bib)_s 
    152        split -l ${nlmax} -a 3 ${fcitemissinghalidfull} ${dsuffixsplit}/${bsuffixsplit} 
    153        list_fcitemissinghalid=$(find ${dsuffixsplit} -name "${bsuffixsplit}???") 
    154        list_fbibmissinghalid="" 
    155        for fcitemissinghalid in ${list_fcitemissinghalid} 
    156        do 
    157            # build condition expression  
    158            bib2bibcond=$(sed -e "s/^/-c '\$key : \"/" -e "s/$/\"'/" ${fcitemissinghalid} | paste -s -d ' ' ) 
    159            # extract the references 
    160            fbibmissinghalid=${tmpdir}/$(basename ${fcitemissinghalid}).bib 
    161            bib2bibcmd=$(echo "bib2bib ${bib2bibcond} -ob ${fbibmissinghalid} ${fbibmissinghalidfull}") 
    162            eval ${bib2bibcmd} 
    163            list_fbibmissinghalid="${list_fbibmissinghalid} ${fbibmissinghalid}" 
    164        done 
     161        echo "${LINENO} : iii : more than ${nlmax} missing hal_id in ${biblioreffull}" 
     162        echo "${LINENO} : iii : need to split" 
     163        dsuffixsplit=$(dirname ${fcitemissinghalidfull}) 
     164        bsuffixsplit=$(basename ${fcitemissinghalidfull} .bib)_s 
     165        split -l ${nlmax} -a 3 ${fcitemissinghalidfull} ${dsuffixsplit}/${bsuffixsplit} 
     166        list_fcitemissinghalid=$(find ${dsuffixsplit} -name "${bsuffixsplit}???") 
     167        list_fbibmissinghalid="" 
     168        for fcitemissinghalid in ${list_fcitemissinghalid} 
     169        do 
     170            # build condition expression 
     171            bib2bibcond=$(sed -e "s/^/-c '\$key : \"/" -e "s/$/\"'/" ${fcitemissinghalid} | paste -s -d ' ' ) 
     172            # extract the references 
     173            fbibmissinghalid=${tmpdir}/$(basename ${fcitemissinghalid}).bib 
     174            bib2bibcmd=$(echo "bib2bib ${bib2bibcond} -ob ${fbibmissinghalid} ${fbibmissinghalidfull}") 
     175            eval ${bib2bibcmd} 
     176            list_fbibmissinghalid="${list_fbibmissinghalid} ${fbibmissinghalid}" 
     177        done 
    165178    else 
    166        echo "${LINENO} : iii : less or just ${nlmax} missing hal_id in ${biblioref}" 
    167        echo "${LINENO} : iii : no need to split" 
    168        fbibmissinghalid=${tmpdir}/missinghalid.bib 
    169        list_fbibmissinghalid=${fbibmissinghalid} 
    170        cp ${fbibmissinghalidfull} ${fbibmissinghalid} 
     179        echo "${LINENO} : iii : less or just ${nlmax} missing hal_id in ${biblioref}" 
     180        echo "${LINENO} : iii : no need to split" 
     181        fbibmissinghalid=${tmpdir}/missinghalid.bib 
     182        list_fbibmissinghalid=${fbibmissinghalid} 
     183        cp ${fbibmissinghalidfull} ${fbibmissinghalid} 
    171184    fi 
    172185    for fbibmissinghalid in ${list_fbibmissinghalid} 
    173186    do 
    174        fbibjmissinghalid=${tmpdir}/$(basename ${fbibmissinghalid} .bib)_jabref.bib 
    175        more ${tmpdir}/header_jabref 
    176        read a 
    177        wc ${fbibmissinghalid} 
    178        cat ${tmpdir}/header_jabref ${fbibmissinghalid} > ${fbibjmissinghalid} 
    179        diff ${fbibmissinghalid} ${fbibjmissinghalid} 
    180        read a 
    181        # 
    182        # generation one XML file style prehal 
    183        fxmlmissinghalid=${tmpdir}/$(basename ${fbibmissinghalid}).xml 
    184        rm ${fxmlmissinghalid} 2> /dev/null 
    185        java -jar ${JABREF_DIR}/JabRef-${JABREF_VERSION}.jar -n true \ 
    186           -p ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
    187           --output ${fxmlmissinghalid},prehal \ 
    188           ${fbibjmissinghalid} 
    189        read a 
     187        fbibjmissinghalid=${tmpdir}/$(basename ${fbibmissinghalid} .bib)_jabref.bib 
     188        more ${tmpdir}/header_jabref 
     189        read a 
     190        wc ${fbibmissinghalid} 
     191        cat ${tmpdir}/header_jabref ${fbibmissinghalid} > ${fbibjmissinghalid} 
     192        diff ${fbibmissinghalid} ${fbibjmissinghalid} 
     193        read a 
     194        # 
     195        # generation one XML file style prehal 
     196        fxmlmissinghalid=${tmpdir}/$(basename ${fbibmissinghalid}).xml 
     197        rm ${fxmlmissinghalid} 2> /dev/null 
     198        java -jar ${JABREF_DIR}/JabRef-${JABREF_VERSION}.jar -n true \ 
     199        -p ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 
     200        --output ${fxmlmissinghalid},prehal \ 
     201        ${fbibjmissinghalid} 
     202        read a 
    190203    done 
    191204else 
Note: See TracChangeset for help on using the changeset viewer.