| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
use lib '/home/smash/LOCAL/mestrado/natura/Biblio/modrewrite.r6656/lib'; |
| 4 |
|
| 5 |
use CGI qw/:standard/; |
| 6 |
|
| 7 |
$ARGV[0] = param('t'); |
| 8 |
$ARGV[1] = '/home/smash/LOCAL/mestrado/natura/Biblio/modrewrite.r6656/examples/geografia.iso'; |
| 9 |
|
| 10 |
use Biblio::Thesaurus; |
| 11 |
use Biblio::Thesaurus::ModRewrite; |
| 12 |
|
| 13 |
my $code = <<"EOF"; |
| 14 |
$ARGV[0] \$r \$t => sub{{ print " <tr align=center><td bgcolor=FF9900><a href='?t=$ARGV[0]'>$ARGV[0]</a></td><td bgcolor=FFCC00>\$r</td><td bgcolor=FFCC00><a href='?t=\$t'>\$t</a></td></tr>\\n"; }}. |
| 15 |
\$t \$r $ARGV[0] => sub{{ print " <tr align=center><td bgcolor=FFCC00><a href='?t=\$t'>\$t</a></td><td bgcolor=FFCC00>\$r</td><td bgcolor=FF9900><a href='?t=$ARGV[0]'>$ARGV[0]</a></td></tr>\\n"; }}. |
| 16 |
EOF |
| 17 |
|
| 18 |
my $obj = thesaurusLoad($ARGV[1]); |
| 19 |
$t = Biblio::Thesaurus::ModRewrite->new($obj); |
| 20 |
|
| 21 |
print "Content-type: text/html\n\n"; |
| 22 |
#print "<pre>$code</pre>"; |
| 23 |
print "<center><h2>Relations for term <div style=\"color: FF9900\">$ARGV[0]</div></h2><table><tr style=\"color: white\" bgcolor=000000 align=center><td>Term</td><td>Relation</td><td>Term</td></tr>\n"; |
| 24 |
$t->process($code); |
| 25 |
print "</table></center>\n"; |