: ########################################################################## # Shellscript: bib2html - format refer(1) database as HTML # Author : Heiner Steven (heiner.steven@odn.de) # Date : 06/02/98 # Category : File Conversion, HTML # RCS-Id. : $Id: bib2html,v 1.1 1999/10/09 15:06:24 heiner Exp $ ########################################################################## # Description # # Valid fields (see addbib(1)): # %A Author's name # %B Book containing article reference # %C City (place of publication) # %D Date of publication # %E Editor of book containing article referenced # %F Footnote number or label (suppied by refer) # %G Government order number # %H Header commentary, printed before reference # %I Issuer (publisher) # %J Journal containing article # %K Keywords to use in locating reference # %L Label field used by -k option of refer # %M Bell Labs Memorandum (undefined) # %N Number within volume # %O Other commentary, printed at end of reference # %P Page number(s) # %Q Corporate or Foreign Author (unreversed) # %R Report, paper, or thesis (unpublished) # %S Series title # %T Title of article or book # %V Volume number # %X Abstract - used by roffbib, not by refer # %Y, Z Ignored by refer ########################################################################## PN=`basename "$0"` # Program name VER='0.1 (beta)' Usage () { echo >&2 "$PN - Convert refer(1) database to HTML, Version $VER usage: $PN [database]" exit 1 } [ -z "$AWK" -a -x /bin/nawk ] && AWK=/bin/nawk : ${AWK:=awk} set -- `getopt 'h' "$@"` Args= while [ $# -gt 0 ] do case "$1" in --) break;; # End of switches -h|-*) Usage;; *) break;; # First file name esac shift done shift # Remove terminating '--' from getopt cat <<-!
| Rating |   |
|---|---|
"
n = Ratings [Rating]
if ( n > 0 ) {
for ( i=0; i| "
print " "
print "\t"
print "" Author ": "
print "" Title ". | "
print " " if ( Vol != "" || Serie != "" ) { if ( Vol != "" ) print "\t" Vol if ( Serie != "" ) print "\t" Serie print ". " } if ( Publisher != "" ) { print "\t" Publisher ";" } if ( City != "" ) { print "\t" City } if ( Year != "" ) { print "\t" Year "." } if ( Comment != "" ) { print "\t " print "\t" Comment print "\t" } print " " print " |