| 1 |
<HTML> |
| 2 |
<HEAD> |
| 3 |
<TITLE>html2perlstream 1.10</TITLE> |
| 4 |
</HEAD> |
| 5 |
<BODY |
| 6 |
bgcolor="#FFFFFF" link="#CC3366" vlink="#993366" alink="#FF6666"> |
| 7 |
<FONT FACE="sans-serif" SIZE=-1><A HREF="http://www.zeegee.com" TARGET="_top"><IMG SRC="icons/zeegee.gif" ALT="ZeeGee Software" ALIGN="RIGHT" BORDER="0"></A><A NAME="__TOP__"><H1>html2perlstream 1.10</H1> |
| 8 |
</A><UL> |
| 9 |
<LI> <A NAME="menu:NAME"><A HREF="#NAME">NAME</A></A> |
| 10 |
<LI> <A NAME="menu:SYNOPSIS"><A HREF="#SYNOPSIS">SYNOPSIS</A></A> |
| 11 |
<LI> <A NAME="menu:DESCRIPTION"><A HREF="#DESCRIPTION">DESCRIPTION</A></A> |
| 12 |
<LI> <A NAME="menu:OPTIONS"><A HREF="#OPTIONS">OPTIONS</A></A> |
| 13 |
<LI> <A NAME="menu:REQUIRES"><A HREF="#REQUIRES">REQUIRES</A></A> |
| 14 |
<LI> <A NAME="menu:VERSION"><A HREF="#VERSION">VERSION</A></A> |
| 15 |
<LI> <A NAME="menu:AUTHOR"><A HREF="#AUTHOR">AUTHOR</A></A> |
| 16 |
</UL> |
| 17 |
|
| 18 |
|
| 19 |
<P><HR> |
| 20 |
<A NAME="NAME"><H2><A HREF="#__TOP__"><IMG SRC="icons/h1bullet.gif" ALT="Top" BORDER="0"></A> NAME</H2></A> |
| 21 |
|
| 22 |
|
| 23 |
<P>html2perlstream - convert an HTML document to Perl code for that document |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
<P><HR> |
| 28 |
<A NAME="SYNOPSIS"><H2><A HREF="#__TOP__"><IMG SRC="icons/h1bullet.gif" ALT="Top" BORDER="0"></A> SYNOPSIS</H2></A> |
| 29 |
|
| 30 |
<FONT SIZE=3 FACE="courier"><PRE> |
| 31 |
html2perlstream |
| 32 |
html2perlstream [options] - |
| 33 |
html2perlstream [options] file.html .. file.html |
| 34 |
</PRE></FONT> |
| 35 |
|
| 36 |
|
| 37 |
<P><HR> |
| 38 |
<A NAME="DESCRIPTION"><H2><A HREF="#__TOP__"><IMG SRC="icons/h1bullet.gif" ALT="Top" BORDER="0"></A> DESCRIPTION</H2></A> |
| 39 |
|
| 40 |
|
| 41 |
<P>Takes an HTML file, and produces from it a Perl script that will |
| 42 |
generate that HTML using the <A HREF="HTML/Stream.pm.html">HTML::Stream</A> module. |
| 43 |
|
| 44 |
|
| 45 |
<P>For usage, just say: |
| 46 |
|
| 47 |
<FONT SIZE=3 FACE="courier"><PRE> |
| 48 |
html2perlstream |
| 49 |
</PRE></FONT> |
| 50 |
|
| 51 |
<P>The normal form is: |
| 52 |
|
| 53 |
<FONT SIZE=3 FACE="courier"><PRE> |
| 54 |
html2perlstream [-options] [files] |
| 55 |
</PRE></FONT> |
| 56 |
|
| 57 |
<P>Any named HTML input file <I><FILE>file.html</FILE></I> will cause output script |
| 58 |
<I><FILE>file.html.pl</FILE></I> to be generated. To read from the standard input, |
| 59 |
specify '-', like this: |
| 60 |
|
| 61 |
<FONT SIZE=3 FACE="courier"><PRE> |
| 62 |
html2perlstream - < test.html |
| 63 |
</PRE></FONT> |
| 64 |
|
| 65 |
<P>If reading from the standard input, the output Perl code goes to the |
| 66 |
standard output. So if you want to run it right away to see the output, |
| 67 |
just do this: |
| 68 |
|
| 69 |
<FONT SIZE=3 FACE="courier"><PRE> |
| 70 |
html2perlstream - < test.html | perl |
| 71 |
</PRE></FONT> |
| 72 |
|
| 73 |
|
| 74 |
<P><HR> |
| 75 |
<A NAME="OPTIONS"><H2><A HREF="#__TOP__"><IMG SRC="icons/h1bullet.gif" ALT="Top" BORDER="0"></A> OPTIONS</H2></A> |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
<DL> |
| 80 |
<P><DT><B><A NAME="item:-d"><B>-d</B></A></B></DT> |
| 81 |
<DD> |
| 82 |
Automatically load and run the output Perl file, then do a diff on |
| 83 |
that and the input file (you must input from a file and output to a |
| 84 |
file in order to use this). |
| 85 |
|
| 86 |
<FONT SIZE=3 FACE="courier"><PRE> |
| 87 |
html2perlstream -w -d testin/test.html |
| 88 |
</PRE></FONT> |
| 89 |
|
| 90 |
<P>You'll get fewer differences if you build the code with <CODE>-w</CODE>. |
| 91 |
|
| 92 |
<P><DT><B><A NAME="item:-w"><B>-w</B></A></B></DT> |
| 93 |
<DD> |
| 94 |
Try to generate code which will output all whitespace between tags verbatim. |
| 95 |
The default code only outputs whitespace if it is believed to be |
| 96 |
needed; e.g., if we are inside a <CODE>PRE</CODE> environment. |
| 97 |
|
| 98 |
</DL> |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
<P><HR> |
| 103 |
<A NAME="REQUIRES"><H2><A HREF="#__TOP__"><IMG SRC="icons/h1bullet.gif" ALT="Top" BORDER="0"></A> REQUIRES</H2></A> |
| 104 |
|
| 105 |
|
| 106 |
<P>To run this, you need: |
| 107 |
|
| 108 |
<FONT SIZE=3 FACE="courier"><PRE> |
| 109 |
HTML::Entities |
| 110 |
HTML::Parser |
| 111 |
</PRE></FONT> |
| 112 |
|
| 113 |
|
| 114 |
<P><HR> |
| 115 |
<A NAME="VERSION"><H2><A HREF="#__TOP__"><IMG SRC="icons/h1bullet.gif" ALT="Top" BORDER="0"></A> VERSION</H2></A> |
| 116 |
|
| 117 |
|
| 118 |
<P>$Id: html2perlstream,v 1.10 2001/08/17 00:50:00 eryq Exp $ |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
<P><HR> |
| 123 |
<A NAME="AUTHOR"><H2><A HREF="#__TOP__"><IMG SRC="icons/h1bullet.gif" ALT="Top" BORDER="0"></A> AUTHOR</H2></A> |
| 124 |
|
| 125 |
|
| 126 |
<P>Eryq, 11 Jan 1997, <I><FILE><A HREF="mailto:[email protected]">[email protected]</A></FILE></I> or thereabouts. |
| 127 |
|
| 128 |
|
| 129 |
<P>Thanks (independently) to Tony Cebzanov and John Buckman for suggesting |
| 130 |
that I write a tool like this. |
| 131 |
|
| 132 |
<P><HR> |
| 133 |
<ADDRESS><FONT SIZE=-1> |
| 134 |
Generated Mon Aug 20 16:34:04 2001 by cvu_pod2html |
| 135 |
</FONT></ADDRESS> |
| 136 |
</FONT></BODY> |
| 137 |
</HTML> |