-
Notifications
You must be signed in to change notification settings - Fork 1
/
hspell.cgi
executable file
·112 lines (90 loc) · 3.65 KB
/
hspell.cgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/perl
use CGI;
sub printDonate() {
print <<EOF
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="S6R66E99RL6TW">
<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="Send donation via PayPal">
<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
EOF
}
$query = new CGI;
@keywords = $query->keywords;
$myself = $query->self_url;
my $p = $query->param('text');
my $ling = $query->param('ling') eq "on" ? "checked" : "";
my $corr = $query->param('corr') eq "on" ? "checked" : "";
my $inquis_he = $query->param('inquis_he') eq "on" ? "checked" : "";
print <<EOF
Content-type: text/html
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8-i">
<title>Hspell - Free Hebrew Spell-Checker</title></head>
<HTML DIR=RTL>
<H1><A HREF=http://hspell.ivrix.org.il/>Hspell</a> - äîàééú äòáøé äçåôùé</H1><H2>èåôñ äãâîä</H2>
òîåã æä îãâéí àú ôòåìú Hspell ìîé ùàéï áéëåìúå/áøöåðå ìäú÷éï àåúä.<BR>
àí àúí ëàï ëãé ìáãå÷ è÷ñè ùìëí, åîòåðééðéí ôçåú ìáçåï àú äúëåðåú äîåôìàåú ùì
Hspell, àúí îåæîðéí ìáãå÷ àú
<A HREF=hspell.color.cgi>èåôñ ääãâîä äöáòåðé</A>.<BR>
ùéîå ìá, ùäòîåã ìà äëé æøéæ áòåìí (áîéåçã àí îá÷ùéí îéãò ìùåðé).<BR><BR>
ëúáå ëàï îéìéí ìáãé÷ä:<BR>
<FORM>
<TEXTAREA NAME=text ROWS=4 COLS=40>
$p</TEXTAREA>
<INPUT TYPE=CHECKBOX NAME="ling" $ling>
<LABEL for="ling">òí îéãò ìùåðé</LABEL>
<INPUT TYPE=CHECKBOX NAME="corr" $corr>
<LABEL for="corr">äöòåú ìúé÷åï</LABEL>
<INPUT TYPE=CHECKBOX NAME="inquis_he" $inquis_he>
<LABEL for="inquis_he">ä"à äùàìä</LABEL>
<BR>
<INPUT TYPE=SUBMIT VALUE="áãå÷!" >
</FORM>
EOF
;
#print $query->param,"<br>\n";
chdir("/home/danken/.www/cgi-bin/1.1");
$ENV{"PATH"} = $ENV{"PATH"}.':/usr/local/bin';
#$ENV{"LD_LIBRARY_PATH"} = $ENV{"LD_LIBRARY_PATH"}.':/net/cel2-4/local/solaris/lib';
#print "PATH is ".$ENV{'PATH'}."\n";
#print "LD_LIBRARY_PATH is ".$ENV{'LD_LIBRARY_PATH'}."\n";
if ($p =~ m/^\s*$/o) {
print "<HR>\nàæäøä: ééúëï ùäè÷ñè ùàúí î÷ìéãéí ðùîø åîâéò ìéãé ÷åøà àðåùé.<BR>\n";
print "<P DIR=LTR>\n";
my $res = system("hspell -V");
print "</P>\n";
#print "res is $res. exclam is $!\n";
print "<HR>\n";
print "àí áøöåðê ìäùúîù á-Hspell áàåôï îñçøé, àå ìäúééòõ ìâáé àéåú åðéúåç îåøôåìåâé
ùì òáøéú áàîöòåúå, àðà ôðä/é ì<A HREF=mailto:danken\@gmail.com>ãï
÷ðéâñáøâ</A>.\nðùîç ì÷áì ôðéåú áðåùàéí èëðééí âí á<A HREF=mailto:hspell-devel\@lists.sourceforge.net>øùéîú äãéååø</A>.\n";
print "<P DIR=LTR>\n";
print "If you would like to use Hspell comercially, or consult about
Hebrew morphology with Hspell, please contact <A HREF=mailto:danken\@gmail.com>Dan Kenigsberg</A>.\n";
print "</P>\n";
printDonate();
print "</HTML>\n";
exit(0);
}
print "úåöàåú äáãé÷ä ùì \"$p\":<br>\n";
#print "<P><A HREF=$keywords[0]>".join(' ',@keywords)."</A><BR>\n";
my $hspell_param="";
$hspell_param.=" -l" if($ling);
$hspell_param.=" -c" if($corr);
$hspell_param.=" -H" if($inquis_he);
print "<PRE>\n";
my $res = open(HSPELL, "| hspell $hspell_param");
print HSPELL "$p\n";
close(HSPELL);
#print "hspell returned $?\n";
print "</PRE>\n";
#print "res is $res\n";
print "<BR><HR>\n";
print "àí îöàúí ùâéàä, àå âéìéúí îéìä ùçñøä áîéìåï ùì Hspell, àå ìëì äòøä àçøú,
àúí îåæîðéí ìôðåú ìãï ÷ðéâñáøâ áãåàì
<a href=mailto:danken\@gmail.com>danken\@gmail.com</a>.\n";
print "àí áøöåðëí ìúøåí îéìä ì־<LRM>Hspell, àðà ååãàå îäå äàéåú äðëåï ùìä áëúéá
çñø־äðé÷åã ò\"ô ëììé äà÷ãîéä ììùåï äòáøéú, úåê äñúééòåú áîéìåï äçáéá òìéëí.\n";
printDonate();
print "</HTML>\n";