MKDoc-Text-Structured
view release on metacpan or search on metacpan
bin/text2xhtml view on Meta::CPAN
elsif ($arg->{'--entities-only'})
{ $html = MKDoc::Text::Structured::Inline::process_entities_only ($text); }
else
{ $html = MKDoc::Text::Structured::process ($text); }
unless ($arg->{'--body-only'} or $arg->{'--inline-only'} or $arg->{'--entities-only'})
{
print STDOUT qq(<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$title</title>
<meta name="generator" content="MKDoc::Text::Structured" />
$style</head>
<body>
$html
</body>
</html>);
bin/text2xhtml view on Meta::CPAN
=head1 Synopsis
text2xhtml --title 'Read Me' < README > readme.html
text2xhtml --body-only < disclaimer.txt > ssi/disclaimer.html
echo '(c) Bruno Postle -- 2005' | text2xhtml --entities-only > ssi/copy.html
=head1 DESCRIPTION
`text2xhtml' is a command-line utility program for converting simple plain text
into valid XHTML files or fragments. It uses the L<MKDoc::Text::Structured>
library to handle the conversion, so standard plain text formatting conventions
such as asterisks for bulleted lists, dashes to underline a headline and two
carriage returns to start a new paragraph are supported.
Lots of other standard 'email' type formatting is supported, see the
MKDoc::Text::Structured documentation for more details:
L<http://search.cpan.org/dist/MKDoc-Text-Structured>
=head1 Calling syntax
bin/text2xhtml view on Meta::CPAN
The I<-h> option will display a short usage summary.
=item -v
This option displays the version number of L<MKDoc::Text::Structured>
=item --external-stylesheet <path>
Use this option to specify an external stylesheet, this can be a relative path,
or an absolute URL. This option has no effect when producing XHTML fragments
with any of the C<--body-only>, C<--inline-only> or C<--entities-only> options.
=item --title <title>
Use this option to set the page title. If ommitted, the <title> tag is left
empty. This option has no effect when producing XHTML fragments with any of
the C<--body-only>, C<--inline-only> or C<--entities-only> options.
=item --body-only
Output the fragment of text normally found inside the <body> tag. This
fragment will include block level tags such as <p> and <ul>, but since it has
no enclosing tag is not well-formed XML.
=item --inline-only
lib/MKDoc/Text/Structured.pm view on Meta::CPAN
=head1 Hyperlinks
This module uses L<URI::Find> to locate URIs such as http://mkdoc.com/ and turn
them into clickable links.
Add rel="nofollow" attributes to <a> tags like so:
local $MKDoc::Text::Structured::Inline::NoFollow = 1;
Additionally, once the XHTML fragment is produced, you could use
L<MKDoc::XML::Tagger> to hyperlink it against a glossary of hyperlinks.
=head1 Smilies
Basic smilies such as :-) and :-( are wrapped in a CSS class:
<span class="smiley-happy">:-)</span>
<span class="smiley-sad">:-(</span>
=head1 Long Words
( run in 0.767 second using v1.01-cache-2.11-cpan-49f99fa48dc )