#! /bin/ksh

# makeindex: make the "features" content index

# get all the identifiers
I=`ssformat -t %I hph.bib`

# make categories file
if test hph.bib -nt hph.cat
then
	for i in $I
	do
		(
		r=`sssearch I=$i hph.bib`
		# create label with page, author, #year
		page=`echo "$r" | ssformat -t %C | sed 's/-.*$//'`
		author=`echo "$r" |
			ssextract -f A |
				ssauthor |
					ssformat -t %A |
						sed -e 's/,.*$//' -e 's/ /_/g'`
		#year=`echo "$r" | ssformat -t %D`
		echo "$page	$author" | expand -4 | sed 's/ /_/g'
		echo "$i" # ID
		# format fields of the keywords
		echo "$r" |
			ssformat -t %K |
				sed -e 's/^\([A-Za-z]*\)/[\1]/' -e 's/ /_/g' -e 's/"//g'
		) | ff -w 250 -B "" # put it all on one long line
	done > hph.cat
fi

function categories
{
	features -p 100 -y + -i 17 $* < hph.cat |
		kexpand |
			sed -e '/[a-zA-Z]|$/s/|$//' -e 's/\*/#/g' -e 's/_/ /g'
}

tcat="[TIK] [TIP] [TIV] [TOS] [TOV] [TON] [TIO] [TOO]" # [T] [TI] [TO]
lcat="[LA] [LD] [LP] [LI] [LE]" # [L] [LO]
mcat="[ME] [MC] [MD] [MS] [MM]" # [MO]" # [M]
acat="[AC] [AH] [AI] [AX] [AS] [AO]"  # [A] [O]

ssformat -t %H hph.bib | reverse > /tmp/hphindex
categories $lcat $mcat | reverse | abut - /tmp/hphindex | tr -d '	' | reverse

exit

#echo "Input and Output Technology"
#categories $tcat
echo "Process Lifecycle"
categories $lcat
echo "Methodology"
categories $mcat
#echo "Applications"
#categories $acat

exit


T	TECHNOLOGY INPUT / OUTPUT
   TI	Input Technology
      TIK	Keyboards
      TIP	Pointing Devices
      TIV	Voice/Speech Input
      TIO	Other: 
   TO	Output Displays
      TOS	Screen Output
      TOV	Voice/Speech Output
      TON	Non-Speech Output
      TOO	Other: 
L	LIFECYCLE ANALYSIS, DESIGN, IMPLEMENTATION, EVALUATION
   LA	Analysis
   LD	Design
   LP	Prototyping = Design / Implementation
   LI	Implementation
   LE	Evaluation
   LO	Other: 
A	APPLICATION AREAS
   AC	Computer-Supported Cooperative Work (CSCW)
   AH	Hypermedia and Information Systems
   AI	Intelligent, Expert Systems, and Artificial Intelligence
   AX	Complex Systems
   AO	Other: 
M	METHODOLOGY
   ME	Empirical Studies
   MC	Case Studies
   MD	Software/Hardware Development
   MS	Survey
   MM	Models and Theories
   MO	Other: 
O	OTHER: 

Your assigned papers and electronic template follow.
You may have fewer than 9 papers because some randomly assigned papers
may have been reassigned because of potential conflict of interest.
As before, please alert us to any potential conflicts of interest
to: hfes-hci@cis.ohio-state.edu.

Please fill in your Rating, Comments, and Keywords for each paper
as in the example below, and submit everything after the -=-=-
separator line in one message to: hfes-hci-reviews@cis.ohio-state.edu.

Example of Filled Review Template:

The Effects of This and That on the Other Thing: A Case Study
        J. Smith
[123/1986:724-726] Rating: 2
[123/1986:724-726] Comments: case study of a topic of little current importance
and I thought the title was vague
[123/1986:724-726] Keywords: MC O "the other thing"

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
