Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Non-standard options to tags for CGI.pm

by merlyn (Sage)
on Jan 10, 2002 at 22:52 UTC ( [id://137814]=note: print w/replies, xml ) Need Help??


in reply to Non-standard options to tags for CGI.pm

A quick start would be to run the program, take the output, and use my html2cgi program to convert it to the equivalent CGI.pm-based program. You'll have to go back in and edit anything that was variable, but this should do 90% of the work for you.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Non-standard options to tags for CGI.pm

Replies are listed 'Best First'.
Re: Re: Non-standard options to tags for CGI.pm
by talexb (Chancellor) on Jan 10, 2002 at 23:57 UTC
    Very cool script. I did notice that either CGI.pm or html2cgi hiccup a bit with lists, whether or not the <li> tag is closed with a </li>.

    The following HTML chunk

    <html> <head> <title>There is no title</title> </head> <body> <ul> <li>First item <li>Second item </ul> </body> </html>
    becomes
    use CGI "-no_debug", ":html", "comment", "header"; print header, start_html("-title" => "There is no title"), ul ( ul ( li ( "First item ", ), "\n", li ( "Second item ", ), "\n", ), "\n", ), "\n", end_html, ;
    I have not run this back through CGI.pm to see the output, but it seems that something is adding an extra <ul> in there. (It adds an extra one for each <li> tag.)

    --t. alex

    "Excellent. Release the hounds." -- Monty Burns.

Re: Re: Non-standard options to tags for CGI.pm
by dragonchild (Archbishop) on Jan 11, 2002 at 00:25 UTC
    Cool script, but there's only one problem:
    scorpion:-> html2cgi.pl tucson.htm Subroutine HTML::TreeBuilder::comment redefined at html2cgi.pl line 11 +9. ## unknown head tag: <meta name="Excel Workbook Frameset"> ## unknown head tag: <meta content="text/html; charset=us-ascii" http- +equiv="Content-Type"> ## unknown head tag: <meta content="Excel.Sheet" name="ProgId"> ## unknown head tag: <meta content="Microsoft Excel 9" name="Generator +"> ## unknown head tag: <link href="tucson_files/filelist.xml" rel="File- +List"> ## unknown head tag: <comment>[if gte mso 9]&gt; &lt;xml&gt; &lt;o:DocumentProperties&gt; &lt;o:LastAuthor&gt;kinyoro&lt;/o:LastAuthor&gt; &lt;o:Created&gt;2001-06-25T12:34:28Z&lt;/o:Created&gt; &lt;o:LastSaved&gt;2001-06-25T12:34:28Z&lt;/o:LastSaved&gt; &lt;o:Version&gt;9.2720&lt;/o:Version&gt; &lt;/o:DocumentProperties&gt; &lt;o:OfficeDocumentSettings&gt; &lt;o:DownloadComponents/&gt; &lt;/o:OfficeDocumentSettings&gt; &lt;/xml&gt; &lt;![endif]</comment> ## unknown head tag: <link href="tucson_files/sheet001.htm" id="shLink +"> ## unknown head tag: <link href="tucson_files/sheet002.htm" id="shLink +"> ## unknown head tag: <link href="tucson_files/sheet003.htm" id="shLink +"> ## unknown head tag: <link id="shLink"> ## unknown head tag: <script language="JavaScript">
    Ummm... help?

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      Somewhere recently I ran across something about a tool that strips out junk from Microsoft Office generated HTML (all that 'mso...' stuff). Come to think of it, it was HTML Tidy, which comes as an integral part of HTML Kit, a freely downloadable tool.

      If you have no intention of ever converting these files (or the output of your CGI-based perl code) BACK to Excel, it might be a viable option to download the command-line version of HTML Tidy and run it from your script before html2cgi.pl.

      dmm

      You can give a man a fish and feed him for a day ...
      Or, you can
      teach him to fish and feed him for a lifetime
        HTML Tidy has gone open source and is now at Sourceforge! It is being refactored into a C library and there is a new project to make it into an XS module. I expect a fruitful future for this wonderful program.

        It should work perfectly the first time! - toma

        Yah, but the problem is that I need to convert back to Excel. *sighs*

        ------
        We are the carpenters and bricklayers of the Information Age.

        Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://137814]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-18 00:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found