[HCoop-Help] unable to run doomtool
Zrajm C Akfohg
zrajm at klingonska.org
Mon Sep 29 16:28:01 EDT 2008
On Mon, Sep 29, 2008 at 12:16 PM, Davor Ocelic <docelic at hcoop.net> wrote:
>> Zrajm C Akfohg wrote:
> One thing that I see, though, Zrajm -- is why would you want to use
> SSI includes inside a CGI script in the first place?
Uhm? I'm trying to use SSI inside a normal html page, not inside the
output generated by a script. But maybe that is not what you were
referring to?
> If you want to do:
>
> <!--#include virtual="cgi-bin/x.cgi" -->
>
> Then why not make this yourself, in your script, instead of calling
> SSI #include directive?
What I'm doing is that I have a search "engine" (it searches a very
limited material, just a couple of Kb of text files). This search
engine is present in two forms; one a small little thingy which can be
included on any web page (on my site), and, two, a result page -- on
which the smaller version is also present (in case the user wants do
do a new search, or modify his old one).
The page looks like this:
http://klingonska.org/canon/
What I want to do is (with as little effort as possible) migrate this
thingy from my old server to hcoop. I would prefer it if I could just
use the script as-is, but if necessary I could do some rewrites.
> You can run x.cgi any way you want, with or without parameters, and
> ignore or collect its output into the calling script.
>
> Just an example, which assumes your original script is written in sh:
>
> #!/bin/sh
>
> echo "this is the original script"
> ...
> output=`~/cgi-bin/x.cgi arg1 arg2`
> ...
> echo "output is $output"
I thought of doing it like that. Thing is though my script would look like this:
#!/bin/sh
cat <<EOF
yadda yadda yadda
pagepagepage
lots of text & html
EOF
echo `~/cgi-bin/x.cgi arg1 arg2`
cat <<EOF
yadda yadda yadda
pagepagepage
lots of MORE text & html
EOF
With all the work being done by a single line of code embedded inside
lots and lots of HTML. Not pretty to maintain (not to mention that my
syntax highlighter will highlight it in sh-mode, while all I would do
in this "script" it fiddle and change the hTML every now and then).
I.e. it just seems ugly and suboptimal.
Yes, I could work around it by having this script use a template
instead and just edit the template when I need to change the content
of the page. But since the SSI is only used on one or two pages I
would be bound to forget that I've done that, and then inadvertently
break stuff in the future.
Besides, all I want to do is just to move an already existing page.
Not to have to rethink the entire thing (I want to do that too -- but
that's a project for later, when I have time, maybe a month or a year
from now).
Does that answer you question? Or did I interpret the question wrong?
/zrajm
--
Zrajm C Akfohg Mobil: 076-211 50 43 E-post: zrajm at klingonska.org
Villav.33, 2tr Telefon: 018-500 911 http://zrajm.klingonska.org/
Upsala, Sweden ICQ-nummer: 16769663 voDleH Hol DajatlhlaH'a' je?
More information about the HCoop-Help
mailing list