Changeset 101 for trunk/bibopa.sh
- Timestamp:
- 04/26/10 14:12:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bibopa.sh
r100 r101 22 22 # 23 23 # 24 # Each entry in the same input file must follows the same order for authors 24 # Each entry in the same input file must follows the same order for authors 25 25 # except the first one. 26 26 # 27 # With ``fs`` in option order you will correctly process raw entry with 27 # With ``fs`` in option order you will correctly process raw entry with 28 28 # firstname and surname in this order for authors except the first one. 29 29 # … … 137 137 # 138 138 # should use iconv instead of recode 139 # for portability issue but not found yet the "flat" fonctionnality in 139 # for portability issue but not found yet the "flat" fonctionnality in 140 140 # iconv 141 141 # … … 197 197 # * bug fix : unclosed date tag 198 198 # * trouble with flat conversion for id building ... 199 # * remove interactivity at then end (allowing redirection of stderr and 199 # * remove interactivity at then end (allowing redirection of stderr and 200 200 # stdout) 201 201 # * strip blank lines … … 333 333 # default 334 334 lang=en 335 order="fs" # firstname surname 335 # fs mean "firstname surname" 336 order="fs" 336 337 # 337 338 minargcount=6 … … 348 349 do 349 350 case ${1} in 350 -i) # filein351 -i) 351 352 filein=${2} 352 353 shift 353 354 ;; 354 -t) # type355 -t) 355 356 type=${2} 356 357 shift 357 358 ;; 358 -o) # order of firstname surname in bibtex file 359 -o) 360 # order of firstname surname in bibtex file 359 361 order=${2} 360 362 shift … … 372 374 exit 0 373 375 ;; 374 *) # other choice 376 *) 377 # other choice 375 378 echo "eee : unknown option ${1}" 376 379 echo "${usage}" … … 378 381 ;; 379 382 esac 380 shift # next flag 383 # next flag 384 shift 381 385 done 382 386 unset usage … … 392 396 # 393 397 case ${type} in 394 raw) # file like data/biball.txt 398 raw) 399 # file like data/biball.txt 395 400 fileraw=${filein} 396 401 fileou=$( basename ${filein} .txt).xml 397 402 ;; 398 mailbody) # file like data/mail2007-04-25T08:58:16Z.txt 403 mailbody) 404 # file like data/mail2007-04-25T08:58:16Z.txt 399 405 fileraw=/tmp/$(basename ${filein}).raw 400 406 fileou=$( basename ${filein} .txt).xml … … 409 415 #read a #++ if debug 410 416 ;; 411 bibtex) # file like data/petitpoly.bib 417 bibtex) 418 # file like data/petitpoly.bib 412 419 fileraw=/tmp/$(basename ${filein}).raw 413 420 awk -f join_endcomma.awk ${filein} > ${fileraw} … … 771 778 refid=${refid}_${num} 772 779 hasauthor=1 773 780 774 781 cat <<EOF >> ${fileou} 775 782 <biblioentry xml:id="${refid}"> … … 866 873 echo "eee: Journal not found " 867 874 echo "${endline}" 868 # uncomment next line for debug 875 # uncomment next line for debug 869 876 # set # ++ debug 870 877 exit 1 … … 883 890 884 891 EOF 885 fi # end of if jfound empty (ie not an article) 892 # end of if jfound empty (ie not an article) 893 fi 886 894 if [ "${jfound}" != "" ] 887 895 then … … 968 976 conftitle=${endline%%,*} 969 977 endline=${endline#*,} 970 confdates=${endline%%,*} # day(s) month 978 # day(s) month 979 confdates=${endline%%,*} 971 980 endline=${endline#*,} 972 confdates="${confdates}, ${endline%%,*}" # day(s) month and year 981 # day(s) month and year 982 confdates="${confdates}, ${endline%%,*}" 973 983 confdates=$( cleanname "${confdates}" ) 974 984 endline=${endline#*,} 975 confaddress=${endline%%,*} # Town 985 # Town 986 confaddress=${endline%%,*} 976 987 endline=${endline#*,} 977 confaddress="${confaddress}, ${endline%%,*}" # Town and country 988 # Town and country 989 confaddress="${confaddress}, ${endline%%,*}" 978 990 confaddress=$( cleanname "${confaddress}" ) 979 991 endline=${endline#*,} … … 1065 1077 1066 1078 EOF 1067 fi # end of if jfound not empty 1079 # end of if jfound not empty 1080 fi 1068 1081 unset title 1069 1082 unset vol … … 1076 1089 echo "</bibliography>" >> ${fileou} 1077 1090 ;; 1078 esac # end of case bibtex vs other for processing 1091 # end of case bibtex vs other for processing 1092 esac 1079 1093 1080 1094 xml val --err \
Note: See TracChangeset
for help on using the changeset viewer.