Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How to turn this command line tool
http://www.theofel.de/oss/makehtml.html to web application?

Edit by BazB: retitle from "coomand line tool"

  • Comment on How do I make a Web interface for the 'makehtml' command line tool?

Replies are listed 'Best First'.
Re: How do I make a Web interface for the 'makehtml' command line tool?
by amw1 (Friar) on Dec 20, 2004 at 20:19 UTC
    Ovid has an excellent web programming with perl tutorial. That should get you started with writing a CGI to control another program. Since it sounds like you may be interacting with the shell pay attention to lesson 3.
Re: How do I make a Web interface for the 'makehtml' command line tool?
by jfroebe (Parson) on Dec 20, 2004 at 19:59 UTC

    Hi,

    A quick look at the tool and from what I gather, makehtml takes a template file and produces html code. What I'm unsure of is what you mean by turning makehtml into a web application. Do you mean to rewrite it in mod_perl or equiv or just run the makehtml script from within modperl/cgi?

    IMHO, one of the other html template libraries would be easier (mason, etc.)

    Jason L. Froebe

    Team Sybase member

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

      I meant run it as cgi script on website, and use web based interface to set options, run, etc. There are need be template file?

        That's what the documentation for makehtml says.

        Basically what you want to do is use a web interface to set the options then execute makehtml with those options. Quite simple really (atleast in pseudo code).

        Use checkbox's to enable/disable individual options. If any of the options require a value, then use a textfield with the checkbox. Your largest problem would be to decide whether to send the parameters verbatim to makehtml script and handle the errors it produces or to validate the parameters (and combinations thereof) before sending it to makehtml.

        Jason L. Froebe

        Team Sybase member

        No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1