1 | #! /bin/sh -x |
---|
2 | #+ |
---|
3 | # |
---|
4 | # ========= |
---|
5 | # genbib.sh |
---|
6 | # ========= |
---|
7 | # |
---|
8 | # SYNOPSIS |
---|
9 | # ======== |
---|
10 | # |
---|
11 | # ``./genbib.sh`` |
---|
12 | # |
---|
13 | # DESCRIPTION |
---|
14 | # =========== |
---|
15 | # |
---|
16 | # |
---|
17 | # TODO |
---|
18 | # ==== |
---|
19 | # |
---|
20 | # pb avec l'apostrophe dans les noms d'auteurs avec bibtool |
---|
21 | # |
---|
22 | # find missing hal/tel reference with bibtool |
---|
23 | # |
---|
24 | # produce HTML files by year |
---|
25 | # |
---|
26 | # good looking of \delta on jabref outputs |
---|
27 | # |
---|
28 | # 180 et 13C sideupper |
---|
29 | # |
---|
30 | # check for all chemical and physical expressions |
---|
31 | # |
---|
32 | # add a test on unescaped ampersand |
---|
33 | # |
---|
34 | # a solution for symbols : |
---|
35 | # bibtex2html --no-abstract --no-keywords --title "Bibliographie du LOCEAN" --footer "$(date)" --style "alpha" --use-keys --raw-url ~/locean/hal/gtbiblio/biblioref.bib |
---|
36 | # |
---|
37 | # Pour récupérer tous les bibtexkey dans le html produit :: |
---|
38 | # |
---|
39 | # $ grep ">bib<" biblioref.html | sed -e "s/.*#//" -e "s/\">.*$//" > list1 |
---|
40 | # |
---|
41 | # Pour récupérer tous les bibtexkey dans le fichier original:: |
---|
42 | # |
---|
43 | # $ grep "@.*{" ../data/biblioref.bib | sed -e "/PREAM/d" -e "s/.*{//" -e "s/,$//" > list2 |
---|
44 | # |
---|
45 | # Faire la différence:: |
---|
46 | # |
---|
47 | # $ sdiff list1 list2 |
---|
48 | # |
---|
49 | # vérifier que les mois sont dans la liste |
---|
50 | # locale -k abmon | tr [:upper:] [:lower:] |
---|
51 | # |
---|
52 | # changer le titre des pages HTML |
---|
53 | # |
---|
54 | # contrôler le vocabulaire des champs |
---|
55 | # pour avoir la liste des mots utilisés :: |
---|
56 | # |
---|
57 | # $ grep "=" biblioref.bib | awk -F = '{print $1}' | sed -e "s/ //g" | sort -u |
---|
58 | # |
---|
59 | # pour voir nom/prénom dans la version bibtex (seulemen pour l'oeil ++):: |
---|
60 | # |
---|
61 | # $ grep "author" biblioref.bib | sed -e "s/author = {//" -e "s/},$//" | awk -F " and" '{print $NF}' | sort -u | more |
---|
62 | # |
---|
63 | # Pour corriger la version docbook : remplacer lastname par surname, ajouter la balise debut <bibliography>, |
---|
64 | # remplacer authorgroup dans la doctype par bibliography |
---|
65 | # |
---|
66 | # Pour voir les nom_prenom à patir de la version docbook :: |
---|
67 | # |
---|
68 | # $ xml sel -t -m "//author" -v "concat(surname,' ',firstname)" -n /usr/work/incas/fplod/public_html/gtbiblio/all.docbook.jabref.xml | sort -u |more |
---|
69 | # |
---|
70 | # ou sur mac lion:: |
---|
71 | # |
---|
72 | # $ xmlstarlet sel -t -m "//author" -v "concat(surname,' ',firstname)" -n /tmp/fplod/public_html/gtbiblio/all.docbook.jabref.xml | sort -u |more |
---|
73 | # |
---|
74 | # EVOLUTIONS |
---|
75 | # ========== |
---|
76 | # |
---|
77 | # - fplod 20120322 |
---|
78 | # |
---|
79 | # * add authors mainly from Bondy |
---|
80 | # |
---|
81 | # - fplod 20120223 |
---|
82 | # |
---|
83 | # * apply locean_tablerefsabsbibsort format for author (was locean_listrefs) |
---|
84 | # |
---|
85 | # - fplod 20120217 |
---|
86 | # |
---|
87 | # * ajout des auteurs de l'équipe surf |
---|
88 | # |
---|
89 | # - fplod 20120131 |
---|
90 | # |
---|
91 | # * les non publiés sont mainteant tout simplement des @unpublished |
---|
92 | # (plus de ruse avec year={xxxx, *}) |
---|
93 | # |
---|
94 | # - fplod 20111010T073116Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
95 | # |
---|
96 | # * création page thesesud |
---|
97 | # |
---|
98 | # - fplod 20110610T100740Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
99 | # |
---|
100 | # * suppression upmc et labex |
---|
101 | # * ajout création page these |
---|
102 | # |
---|
103 | # - fplod 20110511T155810Z cratos.locean-ipsl.upmc.fr (Linux) |
---|
104 | # |
---|
105 | # * replace /tmp by /usr/work/incas/ |
---|
106 | # |
---|
107 | # - fplod 20110427T110808Z cratos.locean-ipsl.upmc.fr (Linux) |
---|
108 | # |
---|
109 | # * la production pdflaetx+bibtex ne fonctionne plus sur aedon. |
---|
110 | # malgrè le changement d'installation (port vs fink) rien à faire ! |
---|
111 | # donc - et ça va plutôt dans le bon sens - machine de référence = cratos. |
---|
112 | # |
---|
113 | # - fplod 20110301T091253Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
114 | # |
---|
115 | # * trying to make it run with bibtool 2.51 on zeus |
---|
116 | # |
---|
117 | # - fplod 20110228T162021Z cratos.locean-ipsl.upmc.fr (Linux) |
---|
118 | # |
---|
119 | # * trying to make it run with bibtool 2.51 on cratos (vs 2.48 sur aedon) |
---|
120 | # |
---|
121 | # - fplod 20101109T144613Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
122 | # |
---|
123 | # * add for upmc 2009-2010 |
---|
124 | # ++ suppression in revision, submitted and so on |
---|
125 | # ++ correction $...$ et Monaco C. L. en Lo Monaco C. |
---|
126 | # ++ je ne sais pas pourquoi rien n'apparait en ouvrant le RTF produit avec # TextEdit alors que l'on voit qqe chose en l'ouvrant directement avec |
---|
127 | # OpenOffice. |
---|
128 | # |
---|
129 | # - fplod 20101108T103903Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
130 | # |
---|
131 | # * correction of years selection for 2007-2010 |
---|
132 | # because match year 2000.'select={year "20[01][0789].*"}' |
---|
133 | # |
---|
134 | # * add for labex a selection of articles published in 2009. |
---|
135 | # ++ suppression in revision, submitted and so on |
---|
136 | # ++ auteurs labo (ipsl) en gras dans document word |
---|
137 | # ++ correction $...$ et Monaco C. L. en Lo Monaco C. |
---|
138 | # |
---|
139 | # - fplod 20101013T090448Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
140 | # |
---|
141 | # * add specific RTF output for 2007-2010 articles (labex2007_2010.rtf) |
---|
142 | # |
---|
143 | # - fplod 20100430T131122Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
144 | # |
---|
145 | # * jabref 2.5 -> 2.6 |
---|
146 | # |
---|
147 | # - fplod 20100127T084405Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
148 | # |
---|
149 | # * add generation of HTML files pages by (affectation,year) using bibtool |
---|
150 | # |
---|
151 | # - fplod 20091120T140131Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
152 | # |
---|
153 | # * fix latex pb : PDF production is now possible |
---|
154 | # * detection of [delta] |
---|
155 | # nb: remplacement de [delta] par \delta ok pour la production de PDF avec |
---|
156 | # pdflatex mais pas ok pour la production d'HTML avec jabref |
---|
157 | # |
---|
158 | # - fplod 20091117T093404Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
159 | # |
---|
160 | # * add test if bibtool available |
---|
161 | # |
---|
162 | # - fplod 20091023T125342Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
163 | # |
---|
164 | # * add test if existing {\ : available feature in latex but confusing |
---|
165 | # for author search using bibtool select |
---|
166 | # * add test if , in author field |
---|
167 | # |
---|
168 | # - fplod 20091021T153653Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
169 | # |
---|
170 | # * outputs HTML, PDF and RTF in dirwww |
---|
171 | # |
---|
172 | # - fplod 20091020T134644Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
173 | # |
---|
174 | # * usage of bibtool to find years list |
---|
175 | # * usage of bibtool to produce bibtex files by year |
---|
176 | # * usage of bibtool to produce bibtex files by team (instead of |
---|
177 | # biblio_split.sh + grep) |
---|
178 | # |
---|
179 | # - fplod 20091020T092945Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
180 | # |
---|
181 | # * avoid diacritical and punctuation in filename (list_team_title s |
---|
182 | # list_team_grep) |
---|
183 | # |
---|
184 | # - fplod 20091016T145245Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
185 | # |
---|
186 | # * use locean_listrefs format for every team |
---|
187 | # |
---|
188 | # - fplod 2009-08-21T08:20:29Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
189 | # |
---|
190 | # * add locean_listrefs format |
---|
191 | # |
---|
192 | # - fplod 2009-08-19T15:48:01Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
193 | # |
---|
194 | # * add simplehtml format |
---|
195 | # |
---|
196 | # - fplod 2009-08-17T07:56:02Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
197 | # |
---|
198 | # * add alpha style |
---|
199 | # |
---|
200 | # - fplod 2009-08-14T15:39:44Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
201 | # |
---|
202 | # * use -p option to add customized exports format |
---|
203 | # * add loop one latex biblio style |
---|
204 | # |
---|
205 | # - fplod 2009-08-10T17:08:07Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
206 | # |
---|
207 | # * test with jabref 2.5 |
---|
208 | # * add docbook production |
---|
209 | # |
---|
210 | # - fplod 2009-07-07T10:17:37Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
211 | # |
---|
212 | # * loop on html formats |
---|
213 | # |
---|
214 | # - fplod 2009-07-03T08:01:21Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
215 | # |
---|
216 | # * add latex+bibtex processing |
---|
217 | # |
---|
218 | # TODO |
---|
219 | # ==== |
---|
220 | # |
---|
221 | # ++ doublons |
---|
222 | # |
---|
223 | # jabref.preferences.xml : cleaning |
---|
224 | # |
---|
225 | # jabref doesn't handle multiple url |
---|
226 | # |
---|
227 | # could not encode : still some trouble with degre sign |
---|
228 | # |
---|
229 | # installation de bibtool sur zeus |
---|
230 | # |
---|
231 | set -u |
---|
232 | command=$(basename ${0}) |
---|
233 | # |
---|
234 | jabref_version="2.6" |
---|
235 | # |
---|
236 | jabref_dir="/usr/home/incas/francoise/jabref-${jabref_version}_$(hostname)/" |
---|
237 | case "$(uname -s)" in |
---|
238 | Darwin) |
---|
239 | jabref_dir=${jabref_dir}"JabRef.app/Contents/Resources/Java/" |
---|
240 | ;; |
---|
241 | Linux) |
---|
242 | ;; |
---|
243 | *) |
---|
244 | echo "${command} : eee : unknown system $(uname -s)" |
---|
245 | ;; |
---|
246 | esac |
---|
247 | # |
---|
248 | system=$(uname) |
---|
249 | case "${system}" in |
---|
250 | AIX|IRIX64) |
---|
251 | echo "${command} : www : no specific posix checking" |
---|
252 | ;; |
---|
253 | *) |
---|
254 | set -o posix |
---|
255 | ;; |
---|
256 | esac |
---|
257 | # |
---|
258 | # |
---|
259 | log_date=$(date -u +"%Y%m%dT%H%M%SZ") |
---|
260 | log=/tmp/$(basename ${command} .sh).log.${log_date} |
---|
261 | # |
---|
262 | usage=" Usage : ${command}" |
---|
263 | # |
---|
264 | # test if bibtool available |
---|
265 | tool=bibtool |
---|
266 | type ${tool} 1> /dev/null 2>&1 |
---|
267 | status=${?} |
---|
268 | if [ ${status} -ne 0 ] |
---|
269 | then |
---|
270 | echo "${command} : eee : ${tool} unavailable" >&2 |
---|
271 | exit 1 |
---|
272 | fi |
---|
273 | unset tool |
---|
274 | unset status |
---|
275 | # |
---|
276 | # default |
---|
277 | # n.a. |
---|
278 | # |
---|
279 | hostname=$(hostname) |
---|
280 | case ${hostname} in |
---|
281 | cratos) |
---|
282 | tmpdir=/usr/work/incas/${LOGNAME}/gtbiblio |
---|
283 | dirwww=/usr/work/incas/${LOGNAME}/public_html/gtbiblio/ |
---|
284 | ;; |
---|
285 | *) |
---|
286 | tmpdir=/tmp/${LOGNAME}/gtbiblio |
---|
287 | dirwww=/tmp/${LOGNAME}/public_html/gtbiblio/ |
---|
288 | ;; |
---|
289 | esac |
---|
290 | rm -rf ${tmpdir} 2> /dev/null |
---|
291 | mkdir -p ${tmpdir} |
---|
292 | rm -rf ${dirwww} 2> /dev/null |
---|
293 | mkdir -p ${dirwww} |
---|
294 | # |
---|
295 | # define team for : |
---|
296 | # - search in bibtex file (in loceanteam field) |
---|
297 | # - give a element of HTML filename (no diacritical and no punctation) |
---|
298 | iteam=1 |
---|
299 | list_team_bibtool[${iteam}]="phybiocar" |
---|
300 | list_team_title[${iteam}]="phybiocar" |
---|
301 | iteam=$(( ${iteam} + 1)) |
---|
302 | list_team_bibtool[${iteam}]="surf" |
---|
303 | list_team_title[${iteam}]="surf" |
---|
304 | iteam=$(( ${iteam} + 1)) |
---|
305 | list_team_bibtool[${iteam}]="varclim" |
---|
306 | list_team_title[${iteam}]="varclim" |
---|
307 | iteam=$(( ${iteam} + 1)) |
---|
308 | list_team_bibtool[${iteam}]="austral-boréal" |
---|
309 | list_team_title[${iteam}]="austral-boreal" |
---|
310 | iteam=$(( ${iteam} + 1)) |
---|
311 | list_team_bibtool[${iteam}]="bio&pal" |
---|
312 | list_team_title[${iteam}]="bio_et_pal" |
---|
313 | iteam=$(( ${iteam} + 1)) |
---|
314 | list_team_bibtool[${iteam}]="paléotropique" |
---|
315 | list_team_title[${iteam}]="paleotropique" |
---|
316 | iteam=$(( ${iteam} + 1)) |
---|
317 | list_team_bibtool[${iteam}]="snapo" |
---|
318 | list_team_title[${iteam}]="snapo" |
---|
319 | iteam=$(( ${iteam} + 1)) |
---|
320 | list_team_bibtool[${iteam}]="dycos" |
---|
321 | list_team_title[${iteam}]="dycos" |
---|
322 | iteam=$(( ${iteam} + 1)) |
---|
323 | list_team_bibtool[${iteam}]="prodyam" |
---|
324 | list_team_title[${iteam}]="prodyam" |
---|
325 | iteam=$(( ${iteam} + 1)) |
---|
326 | list_team_bibtool[${iteam}]="incas" |
---|
327 | list_team_title[${iteam}]="incas" |
---|
328 | iteam=$(( ${iteam} + 1)) |
---|
329 | list_team_bibtool[${iteam}]="mmsa" |
---|
330 | list_team_title[${iteam}]="mmsa" |
---|
331 | iteam=$(( ${iteam} + 1)) |
---|
332 | list_team_bibtool[${iteam}]="ditm" |
---|
333 | list_team_title[${iteam}]="ditm" |
---|
334 | iteam=$(( ${iteam} + 1)) |
---|
335 | list_team_bibtool[${iteam}]="nemo" |
---|
336 | list_team_title[${iteam}]="nemo" |
---|
337 | iteam=$(( ${iteam} + 1)) |
---|
338 | list_team_bibtool[${iteam}]="paleoproxus" |
---|
339 | list_team_title[${iteam}]="paleoproxus" |
---|
340 | iteam=$(( ${iteam} + 1)) |
---|
341 | list_team_bibtool[${iteam}]="vartrop" |
---|
342 | list_team_title[${iteam}]="vartrop" |
---|
343 | # |
---|
344 | # define affectation for : |
---|
345 | # - search in bibtex file (in loceanaffectation field) |
---|
346 | # - give a element of HTML filename (no diacritical and no punctation) |
---|
347 | iaffectation=1 |
---|
348 | list_affectation_bibtool[${iaffectation}]="mnhn" |
---|
349 | list_affectation_title[${iaffectation}]="mnhn" |
---|
350 | iaffectation=$(( ${iaffectation} + 1)) |
---|
351 | list_affectation_bibtool[${iaffectation}]="cnrs" |
---|
352 | list_affectation_title[${iaffectation}]="cnrs" |
---|
353 | iaffectation=$(( ${iaffectation} + 1)) |
---|
354 | list_affectation_bibtool[${iaffectation}]="ird" |
---|
355 | list_affectation_title[${iaffectation}]="ird" |
---|
356 | iaffectation=$(( ${iaffectation} + 1)) |
---|
357 | list_affectation_bibtool[${iaffectation}]="upmc" |
---|
358 | list_affectation_title[${iaffectation}]="upmc" |
---|
359 | iaffectation=$(( ${iaffectation} + 1)) |
---|
360 | list_affectation_bibtool[${iaffectation}]="uvsq" |
---|
361 | list_affectation_title[${iaffectation}]="uvsq" |
---|
362 | # |
---|
363 | # define bibliography reference file |
---|
364 | biblioref_orig=../data/biblioref.bib #++ parameter |
---|
365 | biblioref=${tmpdir}/all.bib |
---|
366 | cp ${biblioref_orig} ${biblioref} |
---|
367 | # |
---|
368 | # |
---|
369 | # test if "[delta]" |
---|
370 | # if so, exit with error |
---|
371 | list_bad_delta="" |
---|
372 | list_bad_delta=$(grep -n "\[delta\]" ${biblioref}) |
---|
373 | if [ "${list_bad_delta}" != "" ] |
---|
374 | then |
---|
375 | echo "${command} : eee : replace [delta] by \\delta (and check formula) in ${list_bad_delta}" |
---|
376 | exit 1 |
---|
377 | fi |
---|
378 | # |
---|
379 | # test if "{\" like {\'e} |
---|
380 | # if so, exit with error |
---|
381 | list_comma_author="" |
---|
382 | #++grep -n "author.* =.*{.*,.*}," ${biblioref} | awk -F":" '{print $1}' |
---|
383 | list_comma_author=$(grep -n 'author.* =.*{.*,.*},' ${biblioref}) |
---|
384 | if [ "${list_comma_author}" != "" ] |
---|
385 | then |
---|
386 | echo "${command} : eee : suppress , in author field in ${list_comma_author}" |
---|
387 | exit 1 |
---|
388 | fi |
---|
389 | # |
---|
390 | # test if "{\" like {\'e} |
---|
391 | # if so, exit with error |
---|
392 | list_backslash_after="" |
---|
393 | #++ pb regexp list_backslash_after=$(grep -n "\{\\" ${biblioref}) |
---|
394 | #++grep -n '{\\' ${biblioref} |
---|
395 | if [ "${list_backslash_after}" != "" ] |
---|
396 | then |
---|
397 | echo "${command} : eee : suppress \"{\\\" in ${list_backslash_after}" |
---|
398 | exit 1 |
---|
399 | fi |
---|
400 | unset list_backslash_after |
---|
401 | |
---|
402 | # test if " }" |
---|
403 | # if so, exit with error |
---|
404 | list_blank_before="" |
---|
405 | list_blank_before=$(grep -n " \}" ${biblioref}) |
---|
406 | if [ "${list_blank_before}" != "" ] |
---|
407 | then |
---|
408 | echo "${command} : eee : suppress \" }\" in ${list_blank_before}" |
---|
409 | exit 1 |
---|
410 | fi |
---|
411 | unset list_blank_before |
---|
412 | |
---|
413 | # test if "{ " |
---|
414 | # if so, exit with error |
---|
415 | list_blank_after="" |
---|
416 | list_blank_after=$(grep -n "\{ " ${biblioref}) |
---|
417 | if [ "${list_blank_after}" != "" ] |
---|
418 | then |
---|
419 | echo "${command} : eee : suppress \"{ \" in ${list_blank_after}" |
---|
420 | exit 1 |
---|
421 | fi |
---|
422 | unset list_blank_after |
---|
423 | |
---|
424 | # test if doi in url field (because of HAL bibtex output) |
---|
425 | # if so, exit with error |
---|
426 | list_doi_in_url="" |
---|
427 | list_doi_in_url=$(grep -n "url = {dx" ${biblioref}) |
---|
428 | if [ "${list_doi_in_url}" != "" ] |
---|
429 | then |
---|
430 | echo "${command} : eee : suppress doi from url fied in ${list_doi_in_url}" |
---|
431 | exit 1 |
---|
432 | fi |
---|
433 | unset list_doi_in_url |
---|
434 | # |
---|
435 | # test if { or } in doi field (because of HAL bibtex output) |
---|
436 | # if so, exit with error |
---|
437 | list_bad_doi="" |
---|
438 | list_bad_doi=$(grep -n "doi = {.*{.*}.*}" ${biblioref}) |
---|
439 | if [ "${list_bad_doi}" != "" ] |
---|
440 | then |
---|
441 | echo "${command} : eee : suppress \{ or \} from doi fied in ${list_bad_doi}" |
---|
442 | exit 1 |
---|
443 | fi |
---|
444 | unset list_bad_doi |
---|
445 | |
---|
446 | # test if doi does'nt start with 10 |
---|
447 | # ++ je ne sais pas rédiger cette contrainte en grep |
---|
448 | # if so, exit with error |
---|
449 | list_bad_doi="" |
---|
450 | list_bad_doi=$(grep "doi = {.*}" ${biblioref} | grep -v "doi = {10") |
---|
451 | if [ "${list_bad_doi}" != "" ] |
---|
452 | then |
---|
453 | echo "${command} : eee : find and modify ${list_bad_doi} suppress in ${biblioref}" |
---|
454 | exit 1 |
---|
455 | fi |
---|
456 | unset list_bad_doi |
---|
457 | |
---|
458 | # test if { or } in pages field (because of HAL bibtex output) |
---|
459 | # if so, exit with error |
---|
460 | list_bad_pages="" |
---|
461 | list_bad_pages=$(grep -n "pages={.*{.*}.*}" ${biblioref}) |
---|
462 | if [ "${list_bad_pages}" != "" ] |
---|
463 | then |
---|
464 | echo "${command} : eee : suppress \{ or \} from pages field in ${list_bad_pages}" |
---|
465 | #++exit 1 |
---|
466 | fi |
---|
467 | unset list_bad_pages |
---|
468 | |
---|
469 | # test if semi-cadratin++ translation in pages field (because of HAL bibtex output) |
---|
470 | # if so, exit with error |
---|
471 | #++echo "${command} : eee : ++ suppress ++ semi-cadratin from pages fied in ${list_bad_pages}" |
---|
472 | #++exit 1 |
---|
473 | |
---|
474 | # artificial header of jabref file to enforce encoding |
---|
475 | { |
---|
476 | echo "% This file was articifialy created for JabRef ${jabref_version}." |
---|
477 | echo "% Encoding: ISO8859_1" |
---|
478 | echo " " |
---|
479 | } > ${tmpdir}/header_jabref |
---|
480 | # |
---|
481 | #list_style="amsalpha plain alpha" |
---|
482 | list_style="plain" #+++ |
---|
483 | for style in ${list_style} |
---|
484 | do |
---|
485 | rm ${dirwww}/$(basename ${biblioref}.${style}.log .log).* 2> /dev/null |
---|
486 | # generation of latex file |
---|
487 | cat << EOF > ${biblioref}.${style}.tex |
---|
488 | \documentclass[a4paper]{article} |
---|
489 | %++\usepackage[frenchb]{babel} |
---|
490 | \usepackage[latin1]{inputenc} |
---|
491 | \begin{document} |
---|
492 | % force to include all entry of the bibliography |
---|
493 | \nocite{*} |
---|
494 | |
---|
495 | % bibliography |
---|
496 | \bibliographystyle{${style}} |
---|
497 | |
---|
498 | \bibliography{${biblioref}} |
---|
499 | \end{document} |
---|
500 | EOF |
---|
501 | # |
---|
502 | # processing bibliography with pdflatex (${dirwww}/${biblioref}.${style}.pdf) |
---|
503 | rm ${dirwww}/$(basename ${biblioref}.${style}.log .log).* 2> /dev/null |
---|
504 | pdflatex -output-directory ${dirwww} ${biblioref}.${style}.tex |
---|
505 | bibtex ${dirwww}/$(basename ${biblioref}.${style}) |
---|
506 | #++ warnings |
---|
507 | pdflatex -output-directory ${dirwww} ${biblioref}.${style}.tex |
---|
508 | pdflatex -output-directory ${dirwww} ${biblioref}.${style}.tex |
---|
509 | # |
---|
510 | # remove temporary latex files |
---|
511 | rm ${dirwww}/$(basename ${biblioref}.${style}.bbl) ${dirwww}/$(basename ${biblioref}.${style}.blg) ${dirwww}/$(basename ${biblioref}.${style}.log) ${dirwww}/$(basename ${biblioref}.${style}.aux) 2> /dev/null |
---|
512 | # |
---|
513 | #++rm ${biblioref}.${style}.tex 2> /dev/null |
---|
514 | done |
---|
515 | |
---|
516 | echo "fin 1re passe latex" |
---|
517 | read a |
---|
518 | # pour vérifier que j'ai bien tout mes styles d'exportation |
---|
519 | # pour mémoire |
---|
520 | #java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
521 | #-p ./jabref.preferences.xml -h |
---|
522 | |
---|
523 | # processing on the whole bibliography reference file |
---|
524 | output_title=all |
---|
525 | # generation one RTF file style harvard |
---|
526 | rm ${biblioref}.harvard.jabref.rtf 2> /dev/null |
---|
527 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
528 | -p ./jabref.preferences.xml \ |
---|
529 | --output ${dirwww}/${output_title}.harvard.jabref.rtf,harvard \ |
---|
530 | ${biblioref} |
---|
531 | echo "fin rtf all" |
---|
532 | # |
---|
533 | # theses |
---|
534 | bibtool -- 'select{@phdthesis}' ${biblioref} -o ${tmpdir}/tmp1.bib |
---|
535 | bibtool -- 'select={type ".*doctorat.*"}' -- 'sort.format={%d(year)%N(author)}' ${tmpdir}/tmp1.bib -o ${tmpdir}/tmp2.bib |
---|
536 | rm ${tmpdir}/tmp1.bib |
---|
537 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
538 | -p ./jabref.preferences.xml \ |
---|
539 | --output ${dirwww}/these.html,locean_tablerefsabsbibsort \ |
---|
540 | ${tmpdir}/tmp2.bib |
---|
541 | rm ${tmpdir}/tmp2.bib |
---|
542 | echo "fin these" |
---|
543 | read a |
---|
544 | # |
---|
545 | # page thesesud |
---|
546 | bibtool -- 'select{@phdthesis}' ${biblioref} -o ${tmpdir}/tmp1.bib |
---|
547 | bibtool -- 'select={type ".*doctorat.*"}' -- 'sort.format={%d(year)%N(author)}' ${tmpdir}/tmp1.bib -o ${tmpdir}/tmp2.bib |
---|
548 | bibtool -- 'select={ird_thesesud "oui"}' ${tmpdir}/tmp2.bib \ |
---|
549 | -o ${tmpdir}/tmp3.bib |
---|
550 | rm ${tmpdir}/tmp1.bib ${tmpdir}/tmp2.bib |
---|
551 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
552 | -p ./jabref.preferences.xml \ |
---|
553 | --output ${dirwww}/thesesud.html,locean_tablerefsabsbibsort \ |
---|
554 | ${tmpdir}/tmp3.bib |
---|
555 | #++rm ${tmpdir}/tmp3.bib |
---|
556 | echo "fin thesesud" |
---|
557 | read a |
---|
558 | |
---|
559 | # find the years list |
---|
560 | # . select all the references with no "," in year field |
---|
561 | bibtool -- 'select.non={year ","}' ${biblioref} -o ${tmpdir}/tmp.bib |
---|
562 | # . extract year field |
---|
563 | list_year=$(grep "^ year =" ${tmpdir}/tmp.bib | sort -u | sed -e "s/^ year = {//" -e "s/},//" -e "s/}//") |
---|
564 | read a |
---|
565 | rm ${tmpdir}/tmp.bib |
---|
566 | # |
---|
567 | # write a bibtex file for each year of the list |
---|
568 | for iyear in ${list_year} |
---|
569 | do |
---|
570 | # select year |
---|
571 | bibtool_command="bibtool -- 'select={year \"${iyear}\"}' ${biblioref} -o ${tmpdir}/tmp1.bib" |
---|
572 | eval ${bibtool_command} |
---|
573 | # remove unpublished reference |
---|
574 | bibtool -- 'select.non={@unpublished}' ${tmpdir}/tmp1.bib -o ${tmpdir}/tmp2.bib |
---|
575 | cat ${tmpdir}/header_jabref ${tmpdir}/tmp2.bib > ${tmpdir}/tmp_${iyear}.bib |
---|
576 | rm ${tmpdir}/tmp1.bib |
---|
577 | rm ${tmpdir}/tmp2.bib |
---|
578 | done |
---|
579 | #++ on ne fait rien de ${tmpdir}/tmp_${iyear}.bib |
---|
580 | # |
---|
581 | # write a bibtex file for unpublished work |
---|
582 | bibtool -- 'select={@unpublished}' ${biblioref} -o ${tmpdir}/tmp2.bib |
---|
583 | cat ${tmpdir}/header_jabref ${tmpdir}/tmp2.bib > ${tmpdir}/tmp_unpublished.bib |
---|
584 | rm ${tmpdir}/tmp2.bib |
---|
585 | #++ on ne fait rien de ${tmpdir}/tmp_unpublished.bib |
---|
586 | # |
---|
587 | list_format="html simplehtml tablerefs locean_tablerefs locean_tablerefsabsbibsort locean_listrefs" |
---|
588 | #+++list_format="" #+++ |
---|
589 | for format in ${list_format} |
---|
590 | do |
---|
591 | echo "format export jabref ${format}" |
---|
592 | # generation one HTML file style ${format} |
---|
593 | rm ${biblioref}.${format}.jabref.html 2> /dev/null |
---|
594 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
595 | -p ./jabref.preferences.xml \ |
---|
596 | --output ${dirwww}/${output_title}.${format}.jabref.html,${format} \ |
---|
597 | ${biblioref} |
---|
598 | jabref_status=${?} |
---|
599 | if [ ${jabref_status} -ne 0 ] |
---|
600 | then |
---|
601 | echo "${command} : eee : pb with jabref export ${format}" |
---|
602 | exit 1 |
---|
603 | fi |
---|
604 | done |
---|
605 | |
---|
606 | # generation of DocBook |
---|
607 | format=docbook |
---|
608 | rm ${biblioref}.${format}.jabref.html 2> /dev/null |
---|
609 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
610 | -p ./jabref.preferences.xml \ |
---|
611 | --output ${dirwww}/${output_title}.${format}.jabref.xml,${format} \ |
---|
612 | ${biblioref} |
---|
613 | jabref_status=${?} |
---|
614 | if [ ${jabref_status} -ne 0 ] |
---|
615 | then |
---|
616 | echo "${command} : eee : pb with jabref export ${format}" |
---|
617 | exit 1 |
---|
618 | fi |
---|
619 | |
---|
620 | # loop on teams to build bibliography reference file |
---|
621 | iteam=1 |
---|
622 | nbteam=${#list_team_bibtool[@]} |
---|
623 | #+++nbteam=0 |
---|
624 | while [ ${iteam} -le ${nbteam} ] |
---|
625 | do |
---|
626 | echo "team title = ${list_team_title[iteam]}" |
---|
627 | echo "team grep = ${list_team_bibtool[iteam]}" |
---|
628 | biblioref_team=${tmpdir}/${list_team_title[iteam]}.bib |
---|
629 | bibtool_command="bibtool -- 'select={loceanteam \"${list_team_bibtool[iteam]}\"}' ${biblioref} -o ${tmpdir}/tmp1.bib" |
---|
630 | eval ${bibtool_command} |
---|
631 | # test if no file found ++ |
---|
632 | cat ${tmpdir}/header_jabref ${tmpdir}/tmp1.bib > ${biblioref_team} |
---|
633 | format=locean_listrefs |
---|
634 | # generation one HTML file style ${format} |
---|
635 | rm ${biblioref}.${format}.jabref.html 2> /dev/null |
---|
636 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
637 | -p ./jabref.preferences.xml \ |
---|
638 | --output ${dirwww}/${list_team_title[iteam]}.${format}.jabref.html,${format} \ |
---|
639 | ${biblioref_team} |
---|
640 | jabref_status=${?} |
---|
641 | if [ ${jabref_status} -ne 0 ] |
---|
642 | then |
---|
643 | echo "${command} : eee : pb with jabref export ${format}" |
---|
644 | exit 1 |
---|
645 | fi |
---|
646 | #++ else |
---|
647 | #++ echo "${command} : iii : no reference for team ${team}" |
---|
648 | #++ fi |
---|
649 | iteam=$(( ${iteam} + 1 )) |
---|
650 | done |
---|
651 | |
---|
652 | # loop on affectations to build bibliography reference file |
---|
653 | format=locean_listrefs |
---|
654 | iaffectation=1 |
---|
655 | nbaffectation=${#list_affectation_bibtool[@]} |
---|
656 | while [ ${iaffectation} -le ${nbaffectation} ] |
---|
657 | do |
---|
658 | echo "affectation title = ${list_affectation_title[iaffectation]}" |
---|
659 | echo "affectation grep = ${list_affectation_bibtool[iaffectation]}" |
---|
660 | bibtool_command="bibtool -- 'select={loceanaffectation \"${list_affectation_bibtool[iaffectation]}\"}' ${biblioref} -o ${tmpdir}/tmp1.bib" |
---|
661 | eval ${bibtool_command} |
---|
662 | # test if no file found ++ |
---|
663 | # select all the references of unpublished work |
---|
664 | bibtool -- 'select={@unpublished}' ${tmpdir}/tmp1.bib -o ${tmpdir}/tmp2.bib |
---|
665 | biblioref_affectation_unpublished=${tmpdir}/${list_affectation_title[iaffectation]}_${iyear}.bib |
---|
666 | cat ${tmpdir}/header_jabref ${tmpdir}/tmp2.bib > ${biblioref_affectation_unpublished} |
---|
667 | # generation one HTML file style ${format} |
---|
668 | rm ${biblioref}.${format}.jabref.html 2> /dev/null |
---|
669 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
670 | -p ./jabref.preferences.xml \ |
---|
671 | --output ${dirwww}/${list_affectation_title[iaffectation]}_unpublished.${format}.jabref.html,${format} \ |
---|
672 | ${biblioref_affectation_unpublished} |
---|
673 | jabref_status=${?} |
---|
674 | if [ ${jabref_status} -ne 0 ] |
---|
675 | then |
---|
676 | echo "${command} : eee : pb with jabref export ${format}" |
---|
677 | exit 1 |
---|
678 | fi |
---|
679 | # find the years list |
---|
680 | # . select all the references of published work |
---|
681 | bibtool -- 'select.non={@unpublished}' ${tmpdir}/tmp1.bib -o ${tmpdir}/tmp2.bib |
---|
682 | # . extract year field |
---|
683 | list_year=$(grep "^ year =" ${tmpdir}/tmp2.bib | sed -e "s/^ year = {//" -e "s/},//" -e "s/}$//" | sort -u) |
---|
684 | echo "list_years for ${list_affectation_title[iaffectation]} : ${list_year}" |
---|
685 | read a |
---|
686 | # write a bibtex file for each year of the list |
---|
687 | for iyear in ${list_year} |
---|
688 | do |
---|
689 | # select year |
---|
690 | bibtool_command="bibtool -- 'select={year \"${iyear}\"}' ${tmpdir}/tmp1.bib -o ${tmpdir}/tmp3.bib" |
---|
691 | eval ${bibtool_command} |
---|
692 | biblioref_affectation_year=${tmpdir}/${list_affectation_title[iaffectation]}_${iyear}.bib |
---|
693 | cat ${tmpdir}/header_jabref ${tmpdir}/tmp3.bib > ${biblioref_affectation_year} |
---|
694 | # generation one HTML file style ${format} |
---|
695 | rm ${biblioref}.${format}.jabref.html 2> /dev/null |
---|
696 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
697 | -p ./jabref.preferences.xml \ |
---|
698 | --output ${dirwww}/${list_affectation_title[iaffectation]}_${iyear}.${format}.jabref.html,${format} \ |
---|
699 | ${biblioref_affectation_year} |
---|
700 | jabref_status=${?} |
---|
701 | if [ ${jabref_status} -ne 0 ] |
---|
702 | then |
---|
703 | echo "${command} : eee : pb with jabref export ${format}" |
---|
704 | exit 1 |
---|
705 | fi |
---|
706 | #++ else |
---|
707 | #++ echo "${command} : iii : no reference for affectation ${affectation}" |
---|
708 | #++ fi |
---|
709 | # end of loop on years |
---|
710 | done |
---|
711 | iaffectation=$(( ${iaffectation} + 1 )) |
---|
712 | done |
---|
713 | |
---|
714 | # define author for : |
---|
715 | # - search in bibtex file (in author field) |
---|
716 | # - give a element of HTML filename (no diacritical and no punctation) |
---|
717 | iauthor=1 |
---|
718 | # |
---|
719 | list_author_bibtool[${iauthor}]="{A}lban {L}azar" |
---|
720 | list_author_title[${iauthor}]="Alban Lazar" |
---|
721 | list_author_file[${iauthor}]="Lazar_alban" |
---|
722 | # |
---|
723 | iauthor=$(( ${iauthor} + 1)) |
---|
724 | list_author_bibtool[${iauthor}]="{M}atthieu {L}engaigne" |
---|
725 | list_author_title[${iauthor}]="Matthieu Lengaigne" |
---|
726 | list_author_file[${iauthor}]="Lengaigne_matthieu" |
---|
727 | # |
---|
728 | iauthor=$(( ${iauthor} + 1)) |
---|
729 | list_author_bibtool[${iauthor}]="{F}rançoise {P}insard" |
---|
730 | list_author_title[${iauthor}]="Françoise Pinsard" |
---|
731 | list_author_file[${iauthor}]="Pinsard_francoise" |
---|
732 | # ++ python auteur="Francoise Pinsard" |
---|
733 | # ++ python filename=string.split(auteur)[1] + "_" + string.lower(string.split(auteur)[0]) |
---|
734 | # |
---|
735 | iauthor=$(( ${iauthor} + 1)) |
---|
736 | # pb avec l'apostrophe avec la ligne suivante dans bibtool |
---|
737 | #++list_author_bibtool[${iauthor}]="{F}rancesco {d\'{O}vidio}" |
---|
738 | list_author_bibtool[${iauthor}]="{O}vidio}" |
---|
739 | list_author_title[${iauthor}]="Francesco d'Ovidio" |
---|
740 | list_author_file[${iauthor}]="Dovidio_francesco" |
---|
741 | # |
---|
742 | iauthor=$(( ${iauthor} + 1)) |
---|
743 | list_author_bibtool[${iauthor}]="{M}arina {L}évy" |
---|
744 | list_author_title[${iauthor}]="Marina Lévy" |
---|
745 | list_author_file[${iauthor}]="Levy_marina" |
---|
746 | # |
---|
747 | iauthor=$(( ${iauthor} + 1)) |
---|
748 | list_author_bibtool[${iauthor}]="{N}icolas {M}etzl" |
---|
749 | list_author_title[${iauthor}]="Nicolas Metzl" |
---|
750 | list_author_file[${iauthor}]="Metzl_nicolas" |
---|
751 | # |
---|
752 | iauthor=$(( ${iauthor} + 1)) |
---|
753 | list_author_bibtool[${iauthor}]="{L}aurence {E}ymard" |
---|
754 | list_author_title[${iauthor}]="Laurence Eymard" |
---|
755 | list_author_file[${iauthor}]="Eymard_laurence" |
---|
756 | # |
---|
757 | iauthor=$(( ${iauthor} + 1)) |
---|
758 | list_author_bibtool[${iauthor}]="{J}acqueline {B}outin" |
---|
759 | list_author_title[${iauthor}]="Jacqueline Boutin" |
---|
760 | list_author_file[${iauthor}]="Boutin_jacqueline" |
---|
761 | # |
---|
762 | iauthor=$(( ${iauthor} + 1)) |
---|
763 | list_author_bibtool[${iauthor}]="{V}incent {E}chevin" |
---|
764 | list_author_title[${iauthor}]="Vincent Echevin" |
---|
765 | list_author_file[${iauthor}]="Echevin_vincent" |
---|
766 | # |
---|
767 | iauthor=$(( ${iauthor} + 1)) |
---|
768 | list_author_bibtool[${iauthor}]="{C}hristophe {E}. {M}enkès" |
---|
769 | list_author_title[${iauthor}]="Christophe Menkès" |
---|
770 | list_author_file[${iauthor}]="Menkes_christophe" |
---|
771 | # |
---|
772 | iauthor=$(( ${iauthor} + 1)) |
---|
773 | list_author_bibtool[${iauthor}]="{G}urvan {M}adec" |
---|
774 | list_author_title[${iauthor}]="Gurvan Madec" |
---|
775 | list_author_file[${iauthor}]="Madec_gurvan" |
---|
776 | # |
---|
777 | iauthor=$(( ${iauthor} + 1)) |
---|
778 | list_author_bibtool[${iauthor}]="{C}hristian {É}thé" |
---|
779 | list_author_title[${iauthor}]="Christian Éthé" |
---|
780 | list_author_file[${iauthor}]="Ethe_christian" |
---|
781 | # |
---|
782 | iauthor=$(( ${iauthor} + 1)) |
---|
783 | list_author_bibtool[${iauthor}]="{A}lexis {C}haigneau" |
---|
784 | list_author_title[${iauthor}]="Alexis Chaigneau" |
---|
785 | list_author_file[${iauthor}]="Chaigneau_alexis" |
---|
786 | # |
---|
787 | iauthor=$(( ${iauthor} + 1)) |
---|
788 | list_author_bibtool[${iauthor}]="{S}téphane {P}ous" |
---|
789 | list_author_title[${iauthor}]="Stéphane Pous" |
---|
790 | list_author_file[${iauthor}]="Pous_stephane" |
---|
791 | # |
---|
792 | iauthor=$(( ${iauthor} + 1)) |
---|
793 | list_author_bibtool[${iauthor}]="{P}ascal {T}erray" |
---|
794 | list_author_title[${iauthor}]="Pascal Terray" |
---|
795 | list_author_file[${iauthor}]="Terray_pascal" |
---|
796 | # |
---|
797 | iauthor=$(( ${iauthor} + 1)) |
---|
798 | list_author_bibtool[${iauthor}]="{F}rançois {C}olas" |
---|
799 | list_author_title[${iauthor}]="François Colas" |
---|
800 | list_author_file[${iauthor}]="Colas_francois" |
---|
801 | # |
---|
802 | iauthor=$(( ${iauthor} + 1)) |
---|
803 | list_author_bibtool[${iauthor}]="{S}ébastien {M}asson" |
---|
804 | list_author_title[${iauthor}]="Sébastien Masson" |
---|
805 | list_author_file[${iauthor}]="Masson_sebastion" |
---|
806 | # |
---|
807 | iauthor=$(( ${iauthor} + 1)) |
---|
808 | list_author_bibtool[${iauthor}]="{C}laire {L}évy" |
---|
809 | list_author_title[${iauthor}]="Claire Lévy" |
---|
810 | list_author_file[${iauthor}]="Levy_claire" |
---|
811 | # |
---|
812 | iauthor=$(( ${iauthor} + 1)) |
---|
813 | list_author_bibtool[${iauthor}]="{R}achid {B}enshila" |
---|
814 | list_author_title[${iauthor}]="Rachid Benshila" |
---|
815 | list_author_file[${iauthor}]="Benshila_rachid" |
---|
816 | # |
---|
817 | iauthor=$(( ${iauthor} + 1)) |
---|
818 | list_author_bibtool[${iauthor}]="{C}atherine {P}ierre" |
---|
819 | list_author_title[${iauthor}]="Catherine Pierre" |
---|
820 | list_author_file[${iauthor}]="Pierre_catherine" |
---|
821 | # |
---|
822 | iauthor=$(( ${iauthor} + 1)) |
---|
823 | list_author_bibtool[${iauthor}]="{I}oanna {B}ouloubassi" |
---|
824 | list_author_title[${iauthor}]="Ioanna Bouloubassi" |
---|
825 | list_author_file[${iauthor}]="Bouloubassi_Ioanna" |
---|
826 | # |
---|
827 | iauthor=$(( ${iauthor} + 1)) |
---|
828 | list_author_bibtool[${iauthor}]="{C}édric {C}otté" |
---|
829 | list_author_title[${iauthor}]="Cédric Cotté" |
---|
830 | list_author_file[${iauthor}]="Cotte_cedric" |
---|
831 | # |
---|
832 | iauthor=$(( ${iauthor} + 1)) |
---|
833 | list_author_bibtool[${iauthor}]="{J}ean-{B}enoît {C}harrassin" |
---|
834 | list_author_title[${iauthor}]="Jean-Benoit Charrassin" |
---|
835 | list_author_file[${iauthor}]="Charrassin_jeanbenoit" |
---|
836 | # |
---|
837 | iauthor=$(( ${iauthor} + 1)) |
---|
838 | list_author_bibtool[${iauthor}]="{Y}ves {D}andonneau" |
---|
839 | list_author_title[${iauthor}]="Yves Dandonneau" |
---|
840 | list_author_file[${iauthor}]="Dandonneau_yves" |
---|
841 | # |
---|
842 | iauthor=$(( ${iauthor} + 1)) |
---|
843 | list_author_bibtool[${iauthor}]="{L}iliane {M}erlivat" |
---|
844 | list_author_title[${iauthor}]="Liliane Merlivat" |
---|
845 | list_author_file[${iauthor}]="Merlivat_liliane" |
---|
846 | # |
---|
847 | iauthor=$(( ${iauthor} + 1)) |
---|
848 | list_author_bibtool[${iauthor}]="{P}ascale {B}ouruet-{A}ubertot" |
---|
849 | list_author_title[${iauthor}]="Pascale Bouruet-Aubertot" |
---|
850 | list_author_file[${iauthor}]="Bouruetaubertot_pascale" |
---|
851 | # |
---|
852 | iauthor=$(( ${iauthor} + 1)) |
---|
853 | list_author_bibtool[${iauthor}]="{Y}annis {C}uypers" |
---|
854 | list_author_title[${iauthor}]="Yannis Cuypers" |
---|
855 | list_author_file[${iauthor}]="Cuypers_yannis" |
---|
856 | # |
---|
857 | iauthor=$(( ${iauthor} + 1)) |
---|
858 | list_author_bibtool[${iauthor}]="{J}érôme {V}ialard" |
---|
859 | list_author_title[${iauthor}]="Jérôme Vialard" |
---|
860 | list_author_file[${iauthor}]="Vialard_jerome" |
---|
861 | # |
---|
862 | iauthor=$(( ${iauthor} + 1)) |
---|
863 | list_author_bibtool[${iauthor}]="{N}athalie {L}efèvre" |
---|
864 | list_author_title[${iauthor}]="Nathalie Lefèvre" |
---|
865 | list_author_file[${iauthor}]="Lefevre_nathalie" |
---|
866 | # |
---|
867 | # |
---|
868 | iauthor=$(( ${iauthor} + 1)) |
---|
869 | list_author_bibtool[${iauthor}]="{S}ylvie {T}hiria" |
---|
870 | list_author_title[${iauthor}]="Sylvie Thiria" |
---|
871 | list_author_file[${iauthor}]="Thiria_sylvie" |
---|
872 | # |
---|
873 | iauthor=$(( ${iauthor} + 1)) |
---|
874 | list_author_bibtool[${iauthor}]="{J}ulien {B}rajard" |
---|
875 | list_author_title[${iauthor}]="Julien Brajard" |
---|
876 | list_author_file[${iauthor}]="Brajard_julien" |
---|
877 | # |
---|
878 | iauthor=$(( ${iauthor} + 1)) |
---|
879 | list_author_bibtool[${iauthor}]="{C}arlos {M}ejia" |
---|
880 | list_author_title[${iauthor}]="Carlos Mejia" |
---|
881 | list_author_file[${iauthor}]="Mejia_carlos" |
---|
882 | # |
---|
883 | iauthor=$(( ${iauthor} + 1)) |
---|
884 | list_author_bibtool[${iauthor}]="{F}ouad {B}adran" |
---|
885 | list_author_title[${iauthor}]="Fouad Badran" |
---|
886 | list_author_file[${iauthor}]="Badran_fouad" |
---|
887 | # |
---|
888 | iauthor=$(( ${iauthor} + 1)) |
---|
889 | list_author_bibtool[${iauthor}]="{Y}oung-{H}yang {P}ark" |
---|
890 | list_author_title[${iauthor}]="Young-Hyang {P}ark" |
---|
891 | list_author_file[${iauthor}]="Park_younghyang" |
---|
892 | # |
---|
893 | iauthor=$(( ${iauthor} + 1)) |
---|
894 | list_author_bibtool[${iauthor}]="{J}uliette {M}ignot" |
---|
895 | list_author_title[${iauthor}]="Juliette Mignot" |
---|
896 | list_author_file[${iauthor}]="Mignot_juliette" |
---|
897 | # |
---|
898 | iauthor=$(( ${iauthor} + 1)) |
---|
899 | list_author_bibtool[${iauthor}]="{M}yriam {K}hodri" |
---|
900 | list_author_title[${iauthor}]="Myriam Khodri" |
---|
901 | list_author_file[${iauthor}]="Khodri_myriam" |
---|
902 | # |
---|
903 | iauthor=$(( ${iauthor} + 1)) |
---|
904 | list_author_bibtool[${iauthor}]="{H}ervé {{L}e {G}off}}" |
---|
905 | list_author_title[${iauthor}]="Hervé Le Goff" |
---|
906 | list_author_file[${iauthor}]="Legoff_herve" |
---|
907 | # |
---|
908 | iauthor=$(( ${iauthor} + 1)) |
---|
909 | list_author_bibtool[${iauthor}]="{C}éline {R}idame" |
---|
910 | list_author_title[${iauthor}]="Céline Ridame" |
---|
911 | list_author_file[${iauthor}]="Ridame_celine" |
---|
912 | # |
---|
913 | iauthor=$(( ${iauthor} + 1)) |
---|
914 | list_author_bibtool[${iauthor}]="{G}uillaume {M}assé" |
---|
915 | list_author_title[${iauthor}]="Guillaume Massé" |
---|
916 | list_author_file[${iauthor}]="Masse_guillaume" |
---|
917 | # |
---|
918 | iauthor=$(( ${iauthor} + 1)) |
---|
919 | list_author_bibtool[${iauthor}]="{A}line {T}ribollet" |
---|
920 | list_author_title[${iauthor}]="Aline Tribollet" |
---|
921 | list_author_file[${iauthor}]="Tribollet_aline" |
---|
922 | # |
---|
923 | iauthor=$(( ${iauthor} + 1)) |
---|
924 | list_author_bibtool[${iauthor}]="{A}lain {S}aliot" |
---|
925 | list_author_title[${iauthor}]="Alain Saliot" |
---|
926 | list_author_file[${iauthor}]="Saliot_alain" |
---|
927 | # |
---|
928 | iauthor=$(( ${iauthor} + 1)) |
---|
929 | list_author_bibtool[${iauthor}]="{G}iovanni {A}loisi" |
---|
930 | list_author_title[${iauthor}]="Giovanni Aloisi" |
---|
931 | list_author_file[${iauthor}]="Aloisi_giovanni" |
---|
932 | # |
---|
933 | iauthor=$(( ${iauthor} + 1)) |
---|
934 | list_author_bibtool[${iauthor}]="{Ch}ristian {B}runet" |
---|
935 | list_author_title[${iauthor}]="Christian Brunet" |
---|
936 | list_author_file[${iauthor}]="Brunet_christian" |
---|
937 | # |
---|
938 | iauthor=$(( ${iauthor} + 1)) |
---|
939 | list_author_bibtool[${iauthor}]="{S}abine {A}rnault" |
---|
940 | list_author_title[${iauthor}]="Sabine Arnault" |
---|
941 | list_author_file[${iauthor}]="Arnault_sabine" |
---|
942 | # |
---|
943 | iauthor=$(( ${iauthor} + 1)) |
---|
944 | list_author_bibtool[${iauthor}]="{J}ean-{L}uc {M}élice" |
---|
945 | list_author_title[${iauthor}]="Jean-Luc Mélice" |
---|
946 | list_author_file[${iauthor}]="Melice_jeanluc" |
---|
947 | # |
---|
948 | iauthor=$(( ${iauthor} + 1)) |
---|
949 | list_author_bibtool[${iauthor}]="{Ch}ristophe {H}erbaut" |
---|
950 | list_author_title[${iauthor}]="Christophe Herbaut" |
---|
951 | list_author_file[${iauthor}]="Herbaut_christophe" |
---|
952 | # |
---|
953 | iauthor=$(( ${iauthor} + 1)) |
---|
954 | list_author_bibtool[${iauthor}]="{M}arie-{N}oëlle {H}oussais" |
---|
955 | list_author_title[${iauthor}]="Marie-Noëlle Houssais" |
---|
956 | list_author_file[${iauthor}]="Houssais_marienoelle" |
---|
957 | # |
---|
958 | iauthor=$(( ${iauthor} + 1)) |
---|
959 | list_author_bibtool[${iauthor}]="{E}mmanuelle {S}ultan" |
---|
960 | list_author_title[${iauthor}]="Emmanuelle Sultan" |
---|
961 | list_author_file[${iauthor}]="Sultan_emmanuelle" |
---|
962 | # |
---|
963 | iauthor=$(( ${iauthor} + 1)) |
---|
964 | list_author_bibtool[${iauthor}]="{B}enjamin {S}ultan" |
---|
965 | list_author_title[${iauthor}]="Benjamin Sultan" |
---|
966 | list_author_file[${iauthor}]="Sultan_benjamin" |
---|
967 | # |
---|
968 | iauthor=$(( ${iauthor} + 1)) |
---|
969 | list_author_bibtool[${iauthor}]="{Y}annis {C}uypers" |
---|
970 | list_author_title[${iauthor}]="Yannis Cuypers" |
---|
971 | list_author_file[${iauthor}]="Cuypers_yannis" |
---|
972 | # |
---|
973 | iauthor=$(( ${iauthor} + 1)) |
---|
974 | list_author_bibtool[${iauthor}]="{L}aurent {M}ortier" |
---|
975 | list_author_title[${iauthor}]="Laurent Mortier" |
---|
976 | list_author_file[${iauthor}]="Mortier_laurent" |
---|
977 | # |
---|
978 | iauthor=$(( ${iauthor} + 1)) |
---|
979 | list_author_bibtool[${iauthor}]="{P}ascale {B}ouruet-{A}ubertot" |
---|
980 | list_author_title[${iauthor}]="Pascale Bouruet-Aubertot" |
---|
981 | list_author_file[${iauthor}]="Bouruet-Aubertot_pascale" |
---|
982 | # |
---|
983 | iauthor=$(( ${iauthor} + 1)) |
---|
984 | list_author_bibtool[${iauthor}]="{M}ichel {C}répon" |
---|
985 | list_author_title[${iauthor}]="Michel Crépon" |
---|
986 | list_author_file[${iauthor}]="Crepon_michel" |
---|
987 | # |
---|
988 | iauthor=$(( ${iauthor} + 1)) |
---|
989 | list_author_bibtool[${iauthor}]="{N}icolas {M}artin" |
---|
990 | list_author_title[${iauthor}]="Nicolas Martin" |
---|
991 | list_author_file[${iauthor}]="Martin_nicolas" |
---|
992 | # |
---|
993 | iauthor=$(( ${iauthor} + 1)) |
---|
994 | list_author_bibtool[${iauthor}]="{A}drien {M}artin" |
---|
995 | list_author_title[${iauthor}]="Adrien Martin" |
---|
996 | list_author_file[${iauthor}]="Martin_adrien" |
---|
997 | # |
---|
998 | iauthor=$(( ${iauthor} + 1)) |
---|
999 | list_author_bibtool[${iauthor}]="{F}rédéric {V}ivier" |
---|
1000 | list_author_title[${iauthor}]="Fréderic Vivier" |
---|
1001 | list_author_file[${iauthor}]="Vivier_frederic" |
---|
1002 | # |
---|
1003 | iauthor=$(( ${iauthor} + 1)) |
---|
1004 | list_author_bibtool[${iauthor}]="{S}imon {M}orisset" |
---|
1005 | list_author_title[${iauthor}]="Simon Morisset" |
---|
1006 | list_author_file[${iauthor}]="Morisset_simon" |
---|
1007 | # |
---|
1008 | iauthor=$(( ${iauthor} + 1)) |
---|
1009 | list_author_bibtool[${iauthor}]="{A}ntonio {L}ourenço" |
---|
1010 | list_author_title[${iauthor}]="Antonio Lourenço" |
---|
1011 | list_author_file[${iauthor}]="Lourenco_antonio" |
---|
1012 | # |
---|
1013 | iauthor=$(( ${iauthor} + 1)) |
---|
1014 | list_author_bibtool[${iauthor}]="{G}illes {R}everdin" |
---|
1015 | list_author_title[${iauthor}]="Gilles Reverdin" |
---|
1016 | list_author_file[${iauthor}]="Reverdin_gilles" |
---|
1017 | # |
---|
1018 | iauthor=$(( ${iauthor} + 1)) |
---|
1019 | list_author_bibtool[${iauthor}]="{X}avier {C}apet" |
---|
1020 | list_author_title[${iauthor}]="Xavier Capet" |
---|
1021 | list_author_file[${iauthor}]="Capet_xavier" |
---|
1022 | # |
---|
1023 | iauthor=$(( ${iauthor} + 1)) |
---|
1024 | list_author_bibtool[${iauthor}]="{P}ierre {T}estor" |
---|
1025 | list_author_title[${iauthor}]="Pierre Testor" |
---|
1026 | list_author_file[${iauthor}]="Testor_pierre" |
---|
1027 | # |
---|
1028 | iauthor=$(( ${iauthor} + 1)) |
---|
1029 | list_author_bibtool[${iauthor}]="{L}uc {O}rtlieb" |
---|
1030 | list_author_title[${iauthor}]="Luc Ortlieb" |
---|
1031 | list_author_file[${iauthor}]="Ortlieb_luc" |
---|
1032 | # |
---|
1033 | iauthor=$(( ${iauthor} + 1)) |
---|
1034 | list_author_bibtool[${iauthor}]="{B}runo {T}urcq" |
---|
1035 | list_author_title[${iauthor}]="Bruno Turcq" |
---|
1036 | list_author_file[${iauthor}]="Turcq_bruno" |
---|
1037 | # |
---|
1038 | iauthor=$(( ${iauthor} + 1)) |
---|
1039 | list_author_bibtool[${iauthor}]="{S}andrine {C}aquineau" |
---|
1040 | list_author_title[${iauthor}]="Sandrine Caquineau" |
---|
1041 | list_author_file[${iauthor}]="Caquineau_sandrine" |
---|
1042 | # |
---|
1043 | iauthor=$(( ${iauthor} + 1)) |
---|
1044 | list_author_bibtool[${iauthor}]="{C}laire {E}. {L}azareth" |
---|
1045 | list_author_title[${iauthor}]="Claire Lazareth" |
---|
1046 | list_author_file[${iauthor}]="Lazareth_claire" |
---|
1047 | # |
---|
1048 | iauthor=$(( ${iauthor} + 1)) |
---|
1049 | list_author_bibtool[${iauthor}]="{F}lorence {{L}e {C}ornec}" |
---|
1050 | list_author_title[$iauthor]="Florence Le Cornec" |
---|
1051 | list_author_file[${iauthor}]="Lecornec_florence" |
---|
1052 | # |
---|
1053 | iauthor=$(( ${iauthor} + 1)) |
---|
1054 | list_author_bibtool[${iauthor}]="{M}agloire {M}andeng-{Y}ogo" |
---|
1055 | list_author_title[$iauthor]="Magloire Mandeng-Yogo" |
---|
1056 | list_author_file[${iauthor}]="Mandengyogo_magloire" |
---|
1057 | # |
---|
1058 | iauthor=$(( ${iauthor} + 1)) |
---|
1059 | list_author_bibtool[${iauthor}]="{A}nne-{M}arie {S}émah" |
---|
1060 | list_author_title[$iauthor]="Anne-Marie Sémah" |
---|
1061 | list_author_file[${iauthor}]="Semah_annemarie" |
---|
1062 | # |
---|
1063 | iauthor=$(( ${iauthor} + 1)) |
---|
1064 | list_author_bibtool[${iauthor}]="{H}ugues {B}oucher" |
---|
1065 | list_author_title[$iauthor]="Hugues Boucher" |
---|
1066 | list_author_file[${iauthor}]="Boucher_hugues" |
---|
1067 | # |
---|
1068 | iauthor=$(( ${iauthor} + 1)) |
---|
1069 | list_author_bibtool[${iauthor}]="{A}bdelfettah {S}ifeddine" |
---|
1070 | list_author_title[$iauthor]="Abdelfettah Sifeddine" |
---|
1071 | list_author_file[${iauthor}]="Sifeddine_abdelfettah" |
---|
1072 | # |
---|
1073 | iauthor=$(( ${iauthor} + 1)) |
---|
1074 | list_author_bibtool[${iauthor}]="{D}enis {W}irrmann" |
---|
1075 | list_author_title[$iauthor]="Denis Wirrmann" |
---|
1076 | list_author_file[${iauthor}]="Wirrmann_denis" |
---|
1077 | # |
---|
1078 | iauthor=$(( ${iauthor} + 1)) |
---|
1079 | list_author_bibtool[${iauthor}]="{F}ethye {C}etin" |
---|
1080 | list_author_title[$iauthor]="Fethye Cetin" |
---|
1081 | list_author_file[${iauthor}]="Cetin_fethye" |
---|
1082 | # |
---|
1083 | iauthor=$(( ${iauthor} + 1)) |
---|
1084 | list_author_bibtool[${iauthor}]="{S}abine {F}évrier" |
---|
1085 | list_author_title[${iauthor}]="Sabine Février" |
---|
1086 | list_author_file[${iauthor}]="Fevrier_sabine" |
---|
1087 | # |
---|
1088 | iauthor=$(( ${iauthor} + 1)) |
---|
1089 | list_author_bibtool[${iauthor}]="{J}érôme {S}irven" |
---|
1090 | list_author_title[${iauthor}]="Jérôme Sirven" |
---|
1091 | list_author_file[${iauthor}]="Sirven_jerome" |
---|
1092 | # |
---|
1093 | iauthor=$(( ${iauthor} + 1)) |
---|
1094 | list_author_bibtool[${iauthor}]="{G}uillaume {G}astineau" |
---|
1095 | list_author_title[${iauthor}]="Guillaume Gastineau" |
---|
1096 | list_author_file[${iauthor}]="Gastineau_guillaume" |
---|
1097 | # |
---|
1098 | iauthor=$(( ${iauthor} + 1)) |
---|
1099 | list_author_bibtool[${iauthor}]="{É}ric {G}uilyardi" |
---|
1100 | list_author_title[${iauthor}]="Éric Guilyardi" |
---|
1101 | list_author_file[${iauthor}]="Guilyardi_eric" |
---|
1102 | # |
---|
1103 | # loop on authors to build bibliography reference file |
---|
1104 | iauthor=1 |
---|
1105 | nbauthor=${#list_author_bibtool[@]} |
---|
1106 | #++nbauthor=0 #+++ |
---|
1107 | while [ ${iauthor} -le ${nbauthor} ] |
---|
1108 | do |
---|
1109 | rm ${tmpdir}/tmp1.bib 2> /dev/null |
---|
1110 | echo "author title = ${list_author_title[iauthor]}" |
---|
1111 | echo "author grep = ${list_author_bibtool[iauthor]}" |
---|
1112 | biblioref_author=${tmpdir}/${list_author_file[iauthor]}.bib |
---|
1113 | bibtool_command="bibtool -- 'select={author \"${list_author_bibtool[iauthor]}\"}' ${biblioref} -o ${tmpdir}/tmp1.bib" |
---|
1114 | eval ${bibtool_command} |
---|
1115 | # test if no file found ++ |
---|
1116 | cat ${tmpdir}/header_jabref ${tmpdir}/tmp1.bib > ${biblioref_author} |
---|
1117 | format=locean_tablerefsabsbibsort |
---|
1118 | # generation one HTML file style ${format} |
---|
1119 | rm ${biblioref}.${format}.jabref.html 2> /dev/null |
---|
1120 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
1121 | -p ./jabref.preferences.xml \ |
---|
1122 | --output ${dirwww}/${list_author_file[iauthor]}.${format}.jabref.html,${format} \ |
---|
1123 | ${biblioref_author} |
---|
1124 | jabref_status=${?} |
---|
1125 | if [ ${jabref_status} -ne 0 ] |
---|
1126 | then |
---|
1127 | echo "${command} : eee : pb with jabref export ${format}" |
---|
1128 | exit 1 |
---|
1129 | fi |
---|
1130 | #++ else |
---|
1131 | #++ echo "${command} : iii : no reference for author ${team}" |
---|
1132 | #++ fi |
---|
1133 | iauthor=$(( ${iauthor} + 1 )) |
---|
1134 | done |
---|
1135 | echo "fin auteurs" |
---|
1136 | read a |
---|
1137 | |
---|
1138 | #++ process html transformation of DocBook file ++ |
---|
1139 | |
---|
1140 | # is there any reference to be add to HAL |
---|
1141 | biblioref_hal=$(grep -c "url = {http://hal.archives-ouvertes.fr/hal" ${biblioref} | grep ":0" | awk -F: '{print $1}') |
---|
1142 | if [ "${biblioref_hal}" != " " ] |
---|
1143 | then |
---|
1144 | #++ more than 30 entries |
---|
1145 | cat ${tmpdir}/header_jabref ${biblioref_hal} > ${biblioref}_hal.bib |
---|
1146 | # |
---|
1147 | # generation one XML file style prehal |
---|
1148 | |
---|
1149 | rm ${biblioref}.1.jabref.xml 2> /dev/null |
---|
1150 | java -jar ${jabref_dir}/JabRef-${jabref_version}.jar -n true \ |
---|
1151 | -p ./jabref.preferences.xml \ |
---|
1152 | --output ${tmpdir}/${output_title}.1.jabref.xml,prehal \ |
---|
1153 | ${biblioref}_hal.bib |
---|
1154 | fi |
---|
1155 | |
---|
1156 | #++rm ${biblioref} 2> /dev/null |
---|
1157 | #++rm ${biblioref}_hal 2> /dev/null |
---|
1158 | #++rm ${tmpdir}/header_jabref 2> /dev/null |
---|
1159 | |
---|
1160 | exit 0 |
---|