Changeset 354 for branches/bibliolocean/src/genprehal.sh
- Timestamp:
- 04/08/14 10:27:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bibliolocean/src/genprehal.sh
r274 r354 9 9 # ======== 10 10 # 11 # ``./genprehal.sh`` 11 # .. code-block:: bash 12 # 13 # ./genprehal.sh`` 12 14 # 13 15 # DESCRIPTION … … 16 18 # prehal ++ 17 19 # 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 # 18 31 # SEE ALSO 19 32 # ======== … … 26 39 # ==== 27 40 # 28 # make it work : now xml produced by jabref are not ok .29 # see prehal*.layout30 # 31 # integrer dans trunk superbib41 # 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 32 45 # 33 46 # EVOLUTIONS … … 41 54 # 42 55 # * ajout de la production d'un pdf pour pouvoir faire des copier/coller 43 # parce que l'importa ion massive trop pénible vue la mauvaise volonte44 # 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.) 45 58 # 46 59 # - fplod 20121108T124317Z cratos.locean-ipsl.upmc.fr (Linux) 47 60 # 48 # * creation par externalisation de la fonctionnalit é(pas fini) dans genbib61 # * creation par externalisation de la fonctionnalité (pas fini) dans genbib 49 62 # 50 63 #- … … 55 68 case "${system}" in 56 69 AIX|IRIX64) 57 echo "${command} : ${LINENO} : www : no specific posix checking"70 echo "${command} : ${LINENO} : www : no specific posix checking" 58 71 ;; 59 72 *) 60 set -o posix73 set -o posix 61 74 ;; 62 75 esac … … 89 102 mkdir -p ${tmpdir} 90 103 # 91 # useful lartificial header of jabref file to enforce encoding104 # useful artificial header of jabref file to enforce encoding 92 105 jabref_header ${tmpdir}/header_jabref 93 106 # … … 138 151 #++rm ${fbibmissinghalidfull}.${style}.tex 2> /dev/null 139 152 echo "fin 1re passe latex" 140 # g enereation rtf153 # génération rtf 141 154 jabref_rtf ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 142 155 ${fbibmissinghalidfull} toto.rtf … … 146 159 if [ ${nltot} -gt ${nlmax} ] 147 160 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)_s152 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 do157 # build condition expression158 bib2bibcond=$(sed -e "s/^/-c '\$key : \"/" -e "s/$/\"'/" ${fcitemissinghalid} | paste -s -d ' ' )159 # extract the references160 fbibmissinghalid=${tmpdir}/$(basename ${fcitemissinghalid}).bib161 bib2bibcmd=$(echo "bib2bib ${bib2bibcond} -ob ${fbibmissinghalid} ${fbibmissinghalidfull}")162 eval ${bib2bibcmd}163 list_fbibmissinghalid="${list_fbibmissinghalid} ${fbibmissinghalid}"164 done161 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 165 178 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.bib169 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} 171 184 fi 172 185 for fbibmissinghalid in ${list_fbibmissinghalid} 173 186 do 174 fbibjmissinghalid=${tmpdir}/$(basename ${fbibmissinghalid} .bib)_jabref.bib175 more ${tmpdir}/header_jabref176 read a177 wc ${fbibmissinghalid}178 cat ${tmpdir}/header_jabref ${fbibmissinghalid} > ${fbibjmissinghalid}179 diff ${fbibmissinghalid} ${fbibjmissinghalid}180 read a181 #182 # generation one XML file style prehal183 fxmlmissinghalid=${tmpdir}/$(basename ${fbibmissinghalid}).xml184 rm ${fxmlmissinghalid} 2> /dev/null185 java -jar ${JABREF_DIR}/JabRef-${JABREF_VERSION}.jar -n true \186 187 188 189 read a187 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 190 203 done 191 204 else
Note: See TracChangeset
for help on using the changeset viewer.