HTML::WikiConverter::WebApp - Web interface to HTML::WikiConverter
Inside the index.cgi instance script (which is included with this distribution):
#!/usr/bin/perl use HTML::WikiConverter::WebApp; my %config = ( template_path => '/path/to/web/templates', ); HTML::WikiConverter::WebApp->new( PARAMS => \%config )->run;
Refer to the INSTALL file for installation instructions.
This application accepts a number of query parameters to control its behavior. The most basic is the run mode parameter,
m. This application can be in one of two run modes:
"convert". (These correspond to the
output_page() methods, respectively.)
"new" causes a new page to be displayed, while
"convert" displays the results of html-to-wiki conversion.
Additional query parameters can be passed independent of run mode:
Any installed dialect, eg
Base URL to be used for converting relative links to absolute ones.
Template for wiki URLs. When scanning the HTML source, if a URL (as in an
a href or
img src attribute value) is found matching this template, it will be treated to a link to a wiki article/image. Consult "ATTRIBUTES" in HTML::WikiConverter for more information.
Note that this is a bit less flexible than using the
wiki_uri attribute directly in HTML::WikiConverter. That attribute allows multiple templates, allows coderefs, and regexps, etc. This option only accepts a single scalar representing a very simple wiki URL template.
If enabled, an additional textarea containing the parsed HTML will be displayed.
If enabled, unsafe HTML entities ("<", ">", and "&") will be encoded using HTML::Entities.
"xml". Determines the type of output displayed by this application.
Sets up the app for CGI::Application.
Corresponds to the
new run mode. Returns a blank form. If arguments are available on the CGI query string, these are used as default values for the form fields.
Corresponds to the
convert run mode. Same as
new_page() but returns the wiki markup for the provided html as well.
Loads the specified HTML::Template template.
Error-catching method called by CGI::Application if a run mode fails for any reason. Displays a basic form with a styled error message up top.
David J. Iberri,
<diberri at cpan.org>
Please report any bugs or feature requests to
bug-html-wikiconverter at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-WikiConverter. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright (c) David J. Iberri, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.