#!/usr/bin/perl

$db = "db.db.tokushima-u.ac.jp";
$output  = "achieve.tex";

$ystart = 1995;
$yend  = 2006;
@kind = (
"Academic Paper", 
"Academic Letter", 
"Proceeding of International Conference", 
"Proceeding of Domestic Conference", 
"Et cetera, Workshop"
);


@kind0 = @kind;

open F, ">$output" or die "cannot open $output\n";

$doc = <<END;
\\documentclass{jarticle}
\\usepackage{html}
\\title{Achievements}
\\author{\\htmladdnormallink{Tetsushi Ueta}{http://risa.is.tokushima-u.ac.jp}}
\\begin{document}
\\maketitle

This list is automatically extracted from 
\\htmladdnormallink{EDB}{http://web.db.tokushima-u.ac.jp}, Tokushima
University, and processed by Perl, \\LaTeX2HTML. 
An accounting program for this page is now being rewritten... Here
only a plain list is shown. No statistical data.

END
print F $doc;

while ($x = shift(@kind0)){
	$t++;
	print F "\\section{$x}\n\\begin{enumerate}\n"; 
	$q = "whois -h $db 'DML=PLAIN LOOK=article.{@.author=person.{@.surname=\"Ueta\" @.givenname=\"Tetsushi\"} @.kind=articleattribute.{@.name=\"$x\"} }' | perl -e 'while(<>){ if (/^[^!]/) { print \"\\\\item \$_\\n\";}  } '| /usr/local/bin/lv 2> /dev/null ";
		$ret = qx {$q};
		print F $ret; 
	print F "\\end{enumerate}\n";
}


print F "\\end{document}\n";
close F;

