Justin Mason

NAME

Text::EtText::EtText2HTML - convert from the simple EtText editable-text format into HTML

SYNOPSIS

  my $t = new Text::EtText::EtText2HTML;
  print $t->text2html ($text);

or

  my $t = new Text::EtText::EtText2HTML;
  print $t->text2html ();               # from STDIN

DESCRIPTION

ettext2html will convert a text file in the EtText editable-text format into HTML.

For more information on the EtText format, check the WebMake documentation on the web at http://webmake.taint.org/ .

METHODS

$f = new Text::EtText::EtText2HTML

Constructs a new Text::EtText::EtText2HTML object.

$f->set_option ($optname, $optval);

Set an EtText option. (Options can also be set on the WebMake object itself, or from inside the WebMake file.) Currently supported options are:

EtTextOneCharMarkup (default: 0)

Allow one-character sets of asterisks etc. to mark up as strong, emphasis etc., instead of the default two-character markup.

EtTextOldLinkStyle (default: 1)

Use the older EtText link-markup style, with quote characters and single square brackets. This is easy to type, but if you're using text from other people, it can easily destroy formatting; so the new link-markup style, with double square brackets, can be used instead.

EtTextBaseHref (default: '')

The base HREF to use for relative links. If set, all relative links in tags with HREF attributes will be rewritten as absolute links, making the output HTML independent of the URL tree structure.

EtTextHrefsRelativeToTop (default: 0)

Indicates that all EtText links are relative to the top of the WebMake document tree. This (obviously) is only relevant if you are using EtText in conjunction with WebMake, and WebMake sets it by default. If set, all relative links in tags with HREF attributes will be rewritten as relative to the ''top'' of the WebMake site, making the output HTML independent of the URL tree structure.

$html = $f->set_glossary ($glosobj)

Provide a glossary for shared link definitions, allowing link definitions to be shared and reused across multiple EtText files. $glosobj must implement the interface defined by Text::EtText::LinkGlossary.

See below for more information on this interface.

$html = $f->text2html( [$text] )

Convert text, either from the argument or from STDIN, into HTML.

MORE DOCUMENTATION

See also http://webmake.taint.org/ for more information.

SEE ALSO

webmake ettext2html ethtml2text HTML::WebMake Text::EtText::EtText2HTML Text::EtText::HTML2EtText Text::EtText::LinkGlossary Text::EtText::DefaultGlossary

AUTHOR

Justin Mason <jm /at/ jmason.org>

COPYRIGHT

WebMake is distributed under the terms of the GNU Public License.

AVAILABILITY

The latest version of this library is likely to be available from CPAN as well as:

  http://webmake.taint.org/