head     1.6;
branch   ;
access   ;
symbols  ;
locks    perlman:1.6; strict;
comment  @# @;


1.6
date     96.06.26.11.25.57;  author perlman;  state Exp;
branches ;
next     1.5;

1.5
date     96.06.20.15.02.22;  author perlman;  state Exp;
branches ;
next     1.4;

1.4
date     96.06.19.15.09.13;  author perlman;  state Exp;
branches ;
next     1.3;

1.3
date     96.06.19.13.53.39;  author perlman;  state Exp;
branches ;
next     1.2;

1.2
date     96.06.19.12.57.38;  author perlman;  state Exp;
branches ;
next     1.1;

1.1
date     96.06.16.22.51.01;  author perlman;  state Exp;
branches ;
next     ;


desc
@@


1.6
log
@*** empty log message ***
@
text
@#! /bin/ksh
# dolist: codename may span different publication categories (confer/video)

. functions
PGM=$0

genheader "Publications"

echo "ACM SIGCHI is the ACM's
Special Interest Group on Computer-Human Interaction.
Through ACM, SIGCHI has published
books,
journals and magazines
conference proceedings,
and videos.
On these pages you will find ACM publications
officially sponsored by SIGCHI,
and some related in content to the SIGCHI charter.
<p>
<b>Disclaimer:</b>
We have tried to gather accurate information,
but some information has been difficult to obtain.
In particular, ACM order numbers may be incorrect for many videos,
and prices and availability may not be correct.
Follow the link to the ACM catalog for possibly more accurate information."

gencomment This page generated `date` by $0 in $PGM


template_image="<img src=%imagesmall align=middle height=100 alt=\"\">"
template_title="<font size=+2>%title</font>"
template="<dt><a href=%category.html>$template_image $template_title</a><dd>
%desc
<br>
"
template="<tr><td valign=top align=center><a href=%category.html>$template_image</a>
<td valign=top><a href=%category.html>$template_title</a>
<br>
%desc
<br>
"

#genliststart # start of category definition list
echo "<table border=1>"

categories=`ssformat -t %category pubs.db`

for category in $categories
do
	catrec=`sssearch "category=$category" pubs.db`

	## begin $category.html
	tmp=`echo "$catrec" | ssformat -t %title`
	genheader "$tmp" > $category.html
	gencomment This page generated `date` by $0 in $PGM >> $category.html
	sssearch "category=$category" pubs.db |
		ssformat -t "%desc<p>%detail" >> $category.html

	# format template for each category in index.html
	echo "$catrec" | ssformat -t "$template"

	# insert shortcut links to codenames (if more than 1)
	codenames=`ssformat -t %codename $category.db | sort -fu`
	ncodenames=`echo $codenames | wc -w`
	debug $category $codenames
	if test "$ncodenames" -gt 1 # many codes, so insert links
	then
		## begin list of codenames in $category.html
		genliststart >> $category.html
		for codename in $codenames
		do
			# each pub has an acmordernumber
			acmordernumbers=`sssearch "codename=$codename" $category.db |
				ssformat -t "%acmordernumber"`
			npubs=`echo "$acmordernumbers" | wc -w`
			if test $npubs -eq 1 # just link to the pub's page
			then
				codelink=$acmordernumbers      # 123456
				tmp=
			else # link to a page for the codename
				codelink=$category-$codename   # conferences-UIST.html
				### generate page that the quicklink will link to
				(
				tmp=`echo "$catrec" | ssformat -t "%title: $codename`
				genheader "$tmp"
				gencomment This page generated `date` by $0 in $PGM
				gendesc -v $category $codename
				genpubtab $category $codename
				genfooter $category
				) > $codelink.html
				tmp=:$npubs # will place count after codename
			fi
			# add codelink to index.html
			echo "<a href=$codelink.html>[$codename$tmp]</a>"
			## add codelink to $category.html
			echo "<dt><font size=+2><a href=$codelink.html>$codename</a></font><dd>" >> $category.html
			gendesc $category $codename >> $category.html

		done
		## end list of codenames in $category.html
		genlistend >> $category.html
	else
		genpubtab $category >> $category.html
	fi
	## end $category.html
	genfooter index >> $category.html
done
#genlistend # end of category definition list
echo "</table>"

gencontact

genfooter

@


1.5
log
@*** empty log message ***
@
text
@d5 1
d9 24
a32 2
template="
<dt><a name=%category href=%category.html>%title</a><dd>
d36 6
d43 2
a44 1
genliststart # start of category definition list
d51 1
d55 1
d57 2
a58 1
		ssformat -t "%desc<p>" >> $category.html
d78 1
a78 1
				codelink=$acmordernumbers.html # 123456.html
d81 1
a81 1
				codelink=$codename.html        # UIST.html
d86 2
d89 2
a90 2
				genfooter
				) > $codelink
d94 1
a94 1
			echo "<a href=$codelink>[$codename$tmp]</a>"
d96 2
a97 2
			echo "<dt><a href=$codelink.html>$codename</a><dd>" >> $category.html
			echo "description of $codename" >> $category.html
d106 1
a106 1
	genfooter >> $category.html
d108 2
a109 1
genlistend # end of category definition list
@


1.4
log
@*** empty log message ***
@
text
@d2 1
a5 49
#-----------------------------------------------------------------------------
function genpage # category # generate page of items
{
category=$1
CATDB=$category.db
catrec=`sssearch "category=$category" pubs.db`
sortkeys=`echo "$catrec" | ssformat -t %sortkeys`
tabent=`echo "$catrec" | ssformat -t %tabent`   # summary in category page

tmp=`echo "$catrec" | ssformat -t %title`
genheader "$tmp"

sssearch "category=$category" pubs.db |
	ssformat -t %desc
echo "<p>"

echo "<table border=2>"
sssort -f "$sortkeys" $CATDB |
	genrecord |
		ssformat -t "$tabent"
echo "</table>"

genfooter
}

#-----------------------------------------------------------------------------
function gencodename # category codename # generate page for codename / category
{
# note: codename may span different publication categories
category=$1
codename=$2
CATDB=$category.db
catrec=`sssearch "category=$category" pubs.db`
sortkeys=`echo "$catrec" | ssformat -t %sortkeys`
tabent=`echo "$catrec" | ssformat -t %tabent`   # summary in category page

tmp=`echo "$catrec" | ssformat -t "%title: $codename`
genheader "$tmp"

echo "<table border=2>"
sssearch codename=$codename $CATDB |
	sssort -f "$sortkeys" |
		genrecord |
			ssformat -t "$tabent"
echo "</table>"

genfooter
}

a7 1
# old format
a8 9
<hr>
<h2>
<a name=%category href=%category.html>%title</a>
</h2>
%desc
"

# current format
template="
d11 1
d14 2
a15 1
echo "<dl>"
d17 1
a17 2
ncategories=`echo $categories | wc -w`
debug $ncategories categories
d20 10
a29 3
	sssearch category=$category pubs.db |
		ssformat -t "$template"
	echo "<br>"
d32 2
a33 3
	debug $category: $codenames

	if test "$ncodenames" -le 1 # only one code in this category
d35 2
a36 4
		genpage $category > $category.html
	else
		# dolist: need to make $category.html with list of codenames
		# need to add descriptions for each codename, in pubs.db?
d39 1
d43 1
a43 1
			if test $npubs -eq 1
d45 12
a56 4
				codelink=$acmordernumbers.html
			else
				codelink=$codename.html
				gencodename $category $codename > $codelink
d58 6
a63 1
			echo "<a href=$codelink>[$codename]</a>"
d65 4
d70 2
d73 1
a73 1
echo "</dl>"
d78 1
@


1.3
log
@*** empty log message ***
@
text
@d6 1
a6 1
function genpage # generate page of items
d14 2
a15 1
genheader `echo "$catrec" | ssformat -t %title`
d30 24
d80 1
a80 2
	sortkeys=`sssearch category=%category pubs.db | ssformat -t %sortkeys`
	codenames=`sssort -f "$sortkeys" $category.db | ssformat -t %codename | uniq`
d82 1
d84 1
a84 5
	debug $category: $ncodenames = $codenames
	debug "	Generate $category.html with codename or pub links"
	genpage $category > $category.html
	debug "	$ncodenames codenames in $category"
	if test $ncodenames -le 1
d86 18
a103 4
		debug "		make page with all the matching $category"
	else # multiple codenames
		debug "		Generate entry in index.html for $category with $ncodenames links"
		debug "		make codename page X for each codename, with links off X to pubs"
a104 12
	for codename in $codenames
	do
		#ssformat -t "<a href=%acmordernumber.html>[%codename]</a>"
		npubs=`sssearch "codename=$codename" $category.db |
			ssformat -t "%acmordernumber" | wc -w`
		if test $npubs -eq 1
		then
			debug "		do not make page for $codename, just insert link"
		else
			debug "		insert link to page of $npubs entries for $codename"
		fi
	done
@


1.2
log
@*** empty log message ***
@
text
@d85 1
a85 35
echo "<hr>
<address>
<h3>Contact Information</h3>
<dl>
	<dt>Mailing Address:<dd>
		ACM<br>
		PO Box 12105<br>
		Church St. Station<br>
		New York, NY 10257 USA
	<dt>Email:<dd>
		<a href=mailto:acmhelp@@acm.org
			>acmhelp@@acm.org</a>
	<dt>Fax:<dd>
		+1-212-944-1318
	<dt>Phone Orders:<dd>
		1-800-342-6626 (USA and Canada)<br>
		+1-212-626-0500 (metro NY and outside USA)
</dl>
In Europe:
<dl>
	<dt>Mailing Adress:<dd>
		ACM European Serice Centre<br>
		108 Cowley Road<br>
		Oxford, OX4 1JF, UK
	<dt>Email:<dd>
		<a href=mailto:acm_europe@@acm.org
			>acmhelp@@acm.org</a>
	<dt>Fax:<dd>
		+44-1865-381338
	<dt>Phone Orders:<dd>
		+44-1865-382338
</dl>

</address>
"
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
echo "<title>ACM SIGCHI Publications</title>"
d3 1
a3 4
echo "In addition to the sources below, check out the
<a href=http://www.acm.org/catalog>ACM Online Catalogue</a>
and its
<a href=http://www.acm.org/catalog/pathfinder.html>PathFinder</a>."
d5 27
d40 82
a121 1
ssformat -t "$template" pubs.db
@
